fixes and cleanup

This commit is contained in:
Simon
2026-03-05 18:18:48 +00:00
parent 76fd5a4f4f
commit 2627505ade
49 changed files with 3245 additions and 1376 deletions

View File

@@ -252,7 +252,8 @@ impl ChaturbateProvider {
let mut title = video_segment
.get("room_subject")
.and_then(|v| v.as_str())
.map(String::from).unwrap_or("".to_string());
.map(String::from)
.unwrap_or("".to_string());
// html decode
title = decode(title.as_bytes()).to_string().unwrap_or(title);
let id = username.clone();
@@ -262,7 +263,11 @@ impl ChaturbateProvider {
.unwrap_or(&serde_json::Value::String("".to_string()))
.as_str()
.unwrap_or("")
.split("?").collect::<Vec<&str>>().get(0).copied().unwrap_or_default()
.split("?")
.collect::<Vec<&str>>()
.get(0)
.copied()
.unwrap_or_default()
.to_string();
let views = video_segment
.get("viewers")