much simpler, "uploader" will never change on a playlist

This commit is contained in:
Peter Hindes 2019-10-14 14:56:04 -06:00
parent bd2b32bfbc
commit 3794002c7b
1 changed files with 2 additions and 11 deletions

View File

@ -74,19 +74,10 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem {
@Ignore @Ignore
public boolean isIdenticalTo(final PlaylistInfo info) { public boolean isIdenticalTo(final PlaylistInfo info) {
boolean returnMe; return getServiceId() == info.getServiceId() && getName().equals(info.getName()) &&
if (!TextUtils.isEmpty(getUploader())) { // If the playlist has an uploader
returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) &&
getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) &&
getThumbnailUrl().equals(info.getThumbnailUrl()) &&
getUploader().equals(info.getUploaderName());
} else { // Else ignore uploader
returnMe = getServiceId() == info.getServiceId() && getName().equals(info.getName()) &&
getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) && getStreamCount() == info.getStreamCount() && getUrl().equals(info.getUrl()) &&
getThumbnailUrl().equals(info.getThumbnailUrl()); getThumbnailUrl().equals(info.getThumbnailUrl());
} }
return returnMe;
}
public long getUid() { public long getUid() {
return uid; return uid;