mirror of
https://framagit.org/veretcle/tootube.git
synced 2025-07-20 20:41:17 +02:00
fix: take last video
This commit is contained in:
@@ -37,7 +37,7 @@ pub struct PeerTubeVideoStreamingPlaylistsFilesResolution {
|
|||||||
|
|
||||||
/// This gets the last video uploaded to the PeerTube server
|
/// This gets the last video uploaded to the PeerTube server
|
||||||
pub fn get_latest_video(u: &str) -> Result<PeerTubeVideo, Box<dyn Error>> {
|
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>()?;
|
.json::<PeerTubeVideos>()?;
|
||||||
|
|
||||||
let vid = get_video_detail(u, &body.data[0].uuid)?;
|
let vid = get_video_detail(u, &body.data[0].uuid)?;
|
||||||
|
Reference in New Issue
Block a user