From 8bdfdae1aa99213f00f0445447423a9592db783f Mon Sep 17 00:00:00 2001 From: VC Date: Tue, 3 Oct 2023 15:46:07 +0200 Subject: [PATCH] feat: reverse publishAt sort --- 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)?;