feat: Bulk added CLI support for tracks and album functionalities in Lidarr
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
use super::lidarr_data::LidarrData;
|
||||
use super::lidarr_data::{ActiveLidarrBlock, LidarrData};
|
||||
use crate::app::lidarr::lidarr_context_clues::{
|
||||
ALBUM_DETAILS_CONTEXT_CLUES, ALBUM_HISTORY_CONTEXT_CLUES, MANUAL_ALBUM_SEARCH_CONTEXT_CLUES,
|
||||
};
|
||||
use crate::models::lidarr_models::{LidarrHistoryItem, LidarrRelease, Track, TrackFile};
|
||||
use crate::models::servarr_data::modals::EditIndexerModal;
|
||||
use crate::models::servarr_models::Indexer;
|
||||
use crate::models::stateful_table::StatefulTable;
|
||||
use crate::models::{
|
||||
HorizontallyScrollableText,
|
||||
HorizontallyScrollableText, TabRoute, TabState,
|
||||
lidarr_models::{MonitorType, NewItemMonitorType},
|
||||
servarr_models::RootFolder,
|
||||
stateful_list::StatefulList,
|
||||
};
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "modals_tests.rs"]
|
||||
@@ -217,3 +221,45 @@ impl From<&LidarrData<'_>> for AddRootFolderModal {
|
||||
add_root_folder_modal
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg_attr(test, derive(Debug))]
|
||||
pub struct AlbumDetailsModal {
|
||||
pub tracks: StatefulTable<Track>,
|
||||
pub track_files: StatefulTable<TrackFile>,
|
||||
// pub track_details_modal: Option<EpisodeDetailsModal>,
|
||||
pub album_history: StatefulTable<LidarrHistoryItem>,
|
||||
pub album_releases: StatefulTable<LidarrRelease>,
|
||||
pub album_details_tabs: TabState,
|
||||
}
|
||||
|
||||
impl Default for AlbumDetailsModal {
|
||||
fn default() -> AlbumDetailsModal {
|
||||
AlbumDetailsModal {
|
||||
tracks: StatefulTable::default(),
|
||||
// TODO episode_details_modal: None,
|
||||
track_files: StatefulTable::default(),
|
||||
album_releases: StatefulTable::default(),
|
||||
album_history: StatefulTable::default(),
|
||||
album_details_tabs: TabState::new(vec![
|
||||
TabRoute {
|
||||
title: "Tracks".to_string(),
|
||||
route: ActiveLidarrBlock::AlbumDetails.into(),
|
||||
contextual_help: Some(&ALBUM_DETAILS_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
TabRoute {
|
||||
title: "History".to_string(),
|
||||
route: ActiveLidarrBlock::AlbumHistory.into(),
|
||||
contextual_help: Some(&ALBUM_HISTORY_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
TabRoute {
|
||||
title: "Manual Search".to_string(),
|
||||
route: ActiveLidarrBlock::ManualAlbumSearch.into(),
|
||||
contextual_help: Some(&MANUAL_ALBUM_SEARCH_CONTEXT_CLUES),
|
||||
config: None,
|
||||
},
|
||||
]),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user