Fixed volume

This commit is contained in:
2023-10-08 09:20:53 -04:00
parent 6d30eb468b
commit edbf47cf53
4 changed files with 27 additions and 14 deletions

View File

@@ -21,7 +21,7 @@ ARG TARGETPLATFORM
RUN apt-get update && apt-get install -y curl tar xz-utils && \
if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
echo "amd64" && false; \
echo "Unsupported platform: amd64" && false; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux_armv7l > yt-dlp && \
chmod +x yt-dlp; \
@@ -34,7 +34,6 @@ RUN apt-get update && apt-get install -y curl tar xz-utils && \
curl -L https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linuxarm64-gpl.tar.xz > ffmpeg.tar.xz && \
tar -xJf ffmpeg.tar.xz --wildcards */bin/ffmpeg --transform='s/^.*\///' && rm ffmpeg.tar.xz; \
elif [ "$TARGETPLATFORM" = "linux/x86_64" ]; then \
echo "Unsupported platform: $TARGETPLATFORM" && \
curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp_linux > yt-dlp && \
chmod +x yt-dlp && \
curl -L https://github.com/yt-dlp/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-linux64-gpl.tar.xz > ffmpeg.tar.xz && \

View File

@@ -272,13 +272,6 @@ async fn set_volume(path: web::Path<String>, volume: web::Json::<SetVolume>, dat
for (_, track_handle) in handler.queue().current_queue().iter().enumerate() {
let _ = track_handle.set_volume(bound_volume);
}
if let Err(err) = handler.queue().pause() {
warn!("Could not pause track: {:?}", err);
return ResponseError::error_response(&ServiceError {
status: 422,
message: err.to_string()
})
}
}
HttpResponse::Ok().finish()
@@ -295,5 +288,6 @@ pub fn init_routes(config: &mut web::ServiceConfig) {
.service(stop)
.service(resume)
.service(pause)
.service(set_volume)
);
}