fixes and cleanup
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user