some little fixes

This commit is contained in:
euzu
2024-12-29 11:36:44 +01:00
parent 47f18ed867
commit 6873e51ef0
4 changed files with 9 additions and 10 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ CMD ["-s", "-p", "/config"]
# Final container
FROM alpine:latest as alpine-final
RUN apk add --no-cache bash curl
RUN apk add --no-cache bash curl ca-certificates tini
WORKDIR /app
@@ -57,5 +57,5 @@ COPY --from=node-build /app/build web
# config should be mounted as volume
# COPY ./config config
ENTRYPOINT ["/app/m3u-filter"]
ENTRYPOINT ["/sbin/tini", "--", "/app/m3u-filter"]
CMD ["-s", "-p", "/app/config"]
+2 -2
View File
@@ -15,7 +15,7 @@ CMD ["./m3u-filter", "-s", "-p", "/config"]
# Alpine Final container
FROM alpine:latest as alpine-final
RUN apk add --no-cache bash curl strace tcpdump bind-tools nano
RUN apk add --no-cache bash curl strace tcpdump bind-tools nano ca-certificates tini
WORKDIR /app
@@ -24,5 +24,5 @@ COPY ./web ./web
# config should be mounted as volume
# COPY ./config ./config
ENTRYPOINT ["/app/m3u-filter"]
ENTRYPOINT ["/sbin/tini", "--", "/app/m3u-filter"]
CMD ["-s", "-p", "/app/config"]
+2 -2
View File
@@ -151,13 +151,13 @@ async fn playlist(
req: web::Json<PlaylistRequest>,
app_state: web::Data<AppState>,
) -> HttpResponse {
return if let Some(input_id) = req.input_id {
if let Some(input_id) = req.input_id {
get_playlist(app_state.config.get_input_by_id(input_id), &app_state.config).await
} else {
let url = req.url.as_deref().unwrap_or("");
let input = create_config_input_for_url(url);
get_playlist(Some(&input), &app_state.config).await
};
}
}
async fn config(
+3 -4
View File
@@ -492,8 +492,7 @@ fn xtream_create_content_stream(xtream_iter: impl Iterator<Item=String>) -> impl
format!(",{line}")
};
Ok::<Bytes, String>(Bytes::from(line))
}))
.chain(stream::once(async { Ok::<Bytes, String>(Bytes::from("]")) })))
})).chain(stream::once(async { Ok::<Bytes, String>(Bytes::from("]")) })))
}
@@ -544,8 +543,8 @@ pub fn xtream_api_register(cfg: &mut web::ServiceConfig) {
("/series", xtream_player_api_series_stream)]);
register_xtream_api_timeshift!(cfg, [
"/timeshift/{username}/{password}/{duration}/{start}/{stream_id}",
"/timeshift.php",
"/streaming/timeshift.php"]);
"/timeshift.php",
"/streaming/timeshift.php"]);
/* TODO
cfg.service(web::resource("/hlsr/{token}/{username}/{password}/{channel}/{hash}/{chunk}").route(web::get().to(xtream_player_api_hlsr_stream)));
cfg.service(web::resource("/hls/{token}/{chunk}").route(web::get().to(xtream_player_api_hls_stream)));