feat(network): Support for fetching all episode files for a given series

This commit is contained in:
2024-12-10 16:22:02 -07:00
parent f3b7f155b7
commit 75c4fcbb9e
8 changed files with 237 additions and 7 deletions
+16 -1
View File
@@ -11,7 +11,7 @@ mod tests {
},
sonarr_models::{
AddSeriesSearchResult, BlocklistItem, BlocklistResponse, DownloadRecord, DownloadsResponse,
Episode, IndexerSettings, Series, SeriesMonitor, SeriesStatus, SeriesType,
Episode, EpisodeFile, IndexerSettings, Series, SeriesMonitor, SeriesStatus, SeriesType,
SonarrHistoryEventType, SonarrHistoryItem, SonarrRelease, SonarrSerdeable, SonarrTask,
SonarrTaskName, SystemStatus,
},
@@ -236,6 +236,21 @@ mod tests {
assert_eq!(sonarr_serdeable, SonarrSerdeable::Episodes(episodes));
}
#[test]
fn test_sonarr_serdeable_from_episode_files() {
let episode_files = vec![EpisodeFile {
id: 1,
..EpisodeFile::default()
}];
let sonarr_serdeable: SonarrSerdeable = episode_files.clone().into();
assert_eq!(
sonarr_serdeable,
SonarrSerdeable::EpisodeFiles(episode_files)
);
}
#[test]
fn test_sonarr_serdeable_from_host_config() {
let host_config = HostConfig {