From 3c2bbf68f05f1224c93383a7b776d12b23278b0b Mon Sep 17 00:00:00 2001 From: VC Date: Thu, 5 Oct 2023 09:37:17 +0200 Subject: [PATCH] fix: take last video --- src/peertube.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peertube.rs b/src/peertube.rs index 78c94a0..ca945f4 100644 --- a/src/peertube.rs +++ b/src/peertube.rs @@ -37,7 +37,7 @@ pub struct PeerTubeVideoStreamingPlaylistsFilesResolution { /// This gets the last video uploaded to the PeerTube server pub fn get_latest_video(u: &str) -> Result> { - let body = reqwest::blocking::get(format!("{}/api/v1/videos?count=1&sort=publishedAt", u))? + let body = reqwest::blocking::get(format!("{}/api/v1/videos?count=1&sort=-publishedAt", u))? .json::()?; let vid = get_video_detail(u, &body.data[0].uuid)?;