fix: take last video

This commit is contained in:
VC
2023-10-05 09:37:17 +02:00
parent f2a38ed506
commit 3c2bbf68f0

View File

@@ -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<PeerTubeVideo, Box<dyn Error>> {
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::<PeerTubeVideos>()?;
let vid = get_video_detail(u, &body.data[0].uuid)?;