various bugfixes

This commit is contained in:
Simon
2026-01-13 18:13:51 +00:00
parent aaff7d00c6
commit 34992242b7
21 changed files with 243 additions and 289 deletions

View File

@@ -3,7 +3,6 @@ use crate::api::ClientVersion;
use crate::providers::Provider;
use crate::util::cache::VideoCache;
use crate::util::parse_abbreviated_number;
use crate::util::time::parse_time_to_seconds;
use crate::videos::{ServerOptions, VideoItem};
use crate::{status::*, util};
use async_trait::async_trait;
@@ -311,7 +310,7 @@ impl BeegProvider {
};
let id = file.get("id").and_then(|v| v.as_i64()).unwrap_or(0).to_string();
let title = video
let title = file
.get("data")
.and_then(|v| v.get(0))
.and_then(|v| v.get("cd_value"))
@@ -321,8 +320,7 @@ impl BeegProvider {
let duration = file
.get("fl_duration")
.and_then(|v| v.as_str())
.and_then(|s| parse_time_to_seconds(s))
.and_then(|v| v.as_u64())
.unwrap_or(0);
let views = video
@@ -378,7 +376,7 @@ impl Provider for BeegProvider {
})
}
fn get_channel(&self, clientversion: ClientVersion) -> Channel {
self.build_channel(clientversion)
fn get_channel(&self, clientversion: ClientVersion) -> Option<Channel> {
Some(self.build_channel(clientversion))
}
}