fix + add transcode
This commit is contained in:
parent
76e2641008
commit
95a2a71f25
6 changed files with 50 additions and 4 deletions
|
@ -23,3 +23,9 @@ pub async fn track_audio_route(track_id: &str, lib: &State<Libary>) -> Option<Na
|
|||
.await
|
||||
.ok()
|
||||
}
|
||||
|
||||
#[get("/track/<track_id>/audio/opus128")]
|
||||
pub async fn track_audio_opus128_route(track_id: &str, lib: &State<Libary>) -> Option<NamedFile> {
|
||||
let track = lib.get_track_by_id(track_id).await?;
|
||||
NamedFile::open(track.get_opus(128)).await.ok()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue