Integrate browse API into TUI MB daemon #230

Merged
wojtek merged 15 commits from 160---provide-a-keyboard-shortcut-to-pull-all-release-groups-of-an-artist into main 2024-10-06 15:32:46 +02:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 246f35e715 - Show all commits

View File

@ -24,7 +24,7 @@ impl GetInfoMeta for AlbumMeta {
trait GetInfo {
type InfoType;
fn into_info(&self, info: Self::InfoType) -> InfoOption<Self::InfoType>;
fn get_info(&self, info: Self::InfoType) -> InfoOption<Self::InfoType>;
}
enum InfoOption<T> {
@ -35,7 +35,7 @@ enum InfoOption<T> {
impl GetInfo for MatchOption<ArtistMeta> {
type InfoType = ArtistInfo;
fn into_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
fn get_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
match self {
MatchOption::Some(option) => info.musicbrainz = option.entity.info.musicbrainz.clone(),
MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid,
@ -48,7 +48,7 @@ impl GetInfo for MatchOption<ArtistMeta> {
impl GetInfo for MatchOption<AlbumMeta> {
type InfoType = AlbumInfo;
fn into_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
fn get_info(&self, mut info: Self::InfoType) -> InfoOption<Self::InfoType> {
match self {
MatchOption::Some(option) => info = option.entity.info.clone(),
MatchOption::CannotHaveMbid => info.musicbrainz = MbRefOption::CannotHaveMbid,
@ -71,7 +71,7 @@ where
type InfoType = T::InfoType;
fn extract_info(&self, index: usize, info: Self::InfoType) -> InfoOption<Self::InfoType> {
self.get(index).unwrap().into_info(info)
self.get(index).unwrap().get_info(info)
}
}

View File

@ -231,7 +231,7 @@ impl JobInstance {
if let Some(params) = self.requests.front() {
let result_sender = &mut self.result_sender;
let paging = &mut self.paging;
Self::execute(musicbrainz, result_sender, event_sender, &params, paging)?;
Self::execute(musicbrainz, result_sender, event_sender, params, paging)?;
};
if self.paging.is_none() {