mirror of
https://github.com/euzu/tuliprox.git
synced 2026-10-20 06:42:20 +02:00
Feature/some fixes (#627)
* Staged input enabled * Show default values in config * tmdb release date fix
This commit is contained in:
@@ -15,7 +15,8 @@ pub async fn download_library_playlist(_client: &reqwest::Client, app_config: &A
|
||||
if !library_config.enabled { return (vec![], vec![]); }
|
||||
|
||||
let storage_path = config.metadata_update.as_ref()
|
||||
.map_or_else(|| std::path::PathBuf::from(shared::utils::default_metadata_path()), |m| std::path::PathBuf::from(&m.cache_path));
|
||||
.map_or_else(|| std::path::PathBuf::from(shared::utils::default_metadata_path()), |m| std::path::PathBuf::from(&m.cache_path))
|
||||
.join("library");
|
||||
let mut metadata_iter = MetadataAsyncIter::new(&storage_path).await;
|
||||
let mut group_movies = PlaylistGroup {
|
||||
id: 0,
|
||||
|
||||
@@ -728,10 +728,15 @@ pub async fn update_vod_metadata(
|
||||
properties.tmdb = m.tmdb_id();
|
||||
properties_updated = true;
|
||||
}
|
||||
if properties.details.is_none() {
|
||||
properties.details = Some(VideoStreamDetailProperties::default());
|
||||
}
|
||||
if let Some(details) = properties.details.as_mut() {
|
||||
if details.release_date.is_none() {
|
||||
details.release_date = m.year().map(|y| format!("{y}-01-01").into());
|
||||
properties_updated = true;
|
||||
if let Some(year) = m.year() {
|
||||
details.release_date = Some(format!("{year}-01-01").into());
|
||||
properties_updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if properties_updated {
|
||||
|
||||
Reference in New Issue
Block a user