Work-around lack of album-artist in mtp
This commit is contained in:
8
TODO
8
TODO
@@ -29,3 +29,11 @@
|
||||
- PlayQueue - slow with over 2000 entries, due to sort-filter-proxy??
|
||||
|
||||
- icecast?
|
||||
|
||||
- libMTP album artist usage.
|
||||
- libMTP does not provide an album artist tag.
|
||||
- song.cpp has a heck to see if this.albumartist=other.album artist, so that when
|
||||
library is frefreshed the file is in the correct place.
|
||||
- mtpdevice.cpp will remove albumartist from 'Song' entries copied to it, so that
|
||||
these are placed in the correct part of the model.
|
||||
- If libMPT is 'fixed' then the above can be rmeoved.
|
||||
@@ -151,8 +151,8 @@ void MtpConnection::updateLibrary()
|
||||
}
|
||||
s.album=track->album;
|
||||
s.artist=track->artist;
|
||||
s.albumartist=s.artist; // libMTP does not support album artist :-(
|
||||
// Use LIBMTP_Get_File_To_File_Descriptor to pass to TagLib!!!
|
||||
// TODO: ALBUMARTIST: Read from 'track' when libMTP supports album artist!
|
||||
s.albumartist=s.artist;
|
||||
s.year=QString::fromUtf8(track->date).mid(0, 4).toUInt();
|
||||
s.title=track->title;
|
||||
s.genre=track->genre;
|
||||
@@ -495,7 +495,9 @@ void MtpDevice::addSong(const Song &s, bool overwrite)
|
||||
return;
|
||||
}
|
||||
qWarning() << "EMIT PUT SONG";
|
||||
|
||||
currentSong=s;
|
||||
// TODO: ALBUMARTIST: Remove when libMPT supports album artist!
|
||||
currentSong.albumartist=currentSong.artist;
|
||||
emit putSong(s);
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,10 @@ Song & Song::operator=(const Song &s)
|
||||
|
||||
bool Song::operator==(const Song &o) const
|
||||
{
|
||||
return file == o.file;
|
||||
// When transfferring off an MPT device we will not have AlbumArtist, as libMTP does not handle this.
|
||||
// But, MPD does, so if the labum artist is different - then treat as a new file.
|
||||
// TODO: ALBUMARTIST: This check can be removed when libMTP supports album artist.
|
||||
return file == o.file && albumartist==o.albumartist;
|
||||
}
|
||||
|
||||
bool Song::operator<(const Song &o) const
|
||||
|
||||
Reference in New Issue
Block a user