Integrate browse API into TUI MB daemon #230
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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, ¶ms, paging)?;
|
||||
Self::execute(musicbrainz, result_sender, event_sender, params, paging)?;
|
||||
};
|
||||
|
||||
if self.paging.is_none() {
|
||||
|
Loading…
Reference in New Issue
Block a user