Full popup description functionality
This commit is contained in:
@@ -10,20 +10,20 @@ pub async fn parse_response<T: DeserializeOwned>(response: Response) -> Result<T
|
||||
|
||||
pub fn get_movie_status(
|
||||
has_file: bool,
|
||||
downloads_vec: &Vec<DownloadRecord>,
|
||||
downloads_vec: &[DownloadRecord],
|
||||
movie_id: Number,
|
||||
) -> String {
|
||||
if !has_file {
|
||||
if let Some(download) = downloads_vec
|
||||
.iter()
|
||||
.find(|&download| download.movie_id == movie_id)
|
||||
.find(|&download| download.movie_id.as_u64().unwrap() == movie_id.as_u64().unwrap())
|
||||
{
|
||||
if download.status == "downloading" {
|
||||
return "Downloading".to_owned();
|
||||
}
|
||||
|
||||
return "Missing".to_owned();
|
||||
}
|
||||
|
||||
return "Missing".to_owned();
|
||||
}
|
||||
|
||||
"Downloaded".to_owned()
|
||||
|
||||
Reference in New Issue
Block a user