Fixed library showing null
This commit is contained in:
parent
ad2de3a828
commit
87378fc79c
|
@ -1,7 +1,6 @@
|
||||||
package org.schabi.newpipe.database.playlist.model;
|
package org.schabi.newpipe.database.playlist.model;
|
||||||
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.room.ColumnInfo;
|
import androidx.room.ColumnInfo;
|
||||||
import androidx.room.Entity;
|
import androidx.room.Entity;
|
||||||
|
@ -9,7 +8,6 @@ import androidx.room.Ignore;
|
||||||
import androidx.room.Index;
|
import androidx.room.Index;
|
||||||
import androidx.room.PrimaryKey;
|
import androidx.room.PrimaryKey;
|
||||||
|
|
||||||
import org.schabi.newpipe.BuildConfig;
|
|
||||||
import org.schabi.newpipe.database.playlist.PlaylistLocalItem;
|
import org.schabi.newpipe.database.playlist.PlaylistLocalItem;
|
||||||
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
|
import org.schabi.newpipe.extractor.playlist.PlaylistInfo;
|
||||||
import org.schabi.newpipe.util.Constants;
|
import org.schabi.newpipe.util.Constants;
|
||||||
|
@ -76,21 +74,16 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem {
|
||||||
|
|
||||||
@Ignore
|
@Ignore
|
||||||
public boolean isIdenticalTo(final PlaylistInfo info) {
|
public boolean isIdenticalTo(final PlaylistInfo info) {
|
||||||
//String TAG = "isIdenticalTo";
|
|
||||||
//boolean DEBUG = !BuildConfig.BUILD_TYPE.equals("release");
|
|
||||||
/*
|
/*
|
||||||
* Returns boolean comparing the online playlist and the local copy.
|
* Returns boolean comparing the online playlist and the local copy.
|
||||||
* (False if info changed such as playlist name or track count)
|
* (False if info changed such as playlist name or track count)
|
||||||
*/
|
*/
|
||||||
//boolean returnMe = true;
|
|
||||||
return getServiceId() == info.getServiceId()
|
return getServiceId() == info.getServiceId()
|
||||||
&& getStreamCount() == info.getStreamCount()
|
&& getStreamCount() == info.getStreamCount()
|
||||||
&& TextUtils.equals(getName(), info.getName())
|
&& TextUtils.equals(getName(), info.getName())
|
||||||
&& TextUtils.equals(getUrl(), info.getUrl())
|
&& TextUtils.equals(getUrl(), info.getUrl())
|
||||||
&& TextUtils.equals(getThumbnailUrl(), info.getThumbnailUrl())
|
&& TextUtils.equals(getThumbnailUrl(), info.getThumbnailUrl())
|
||||||
&& TextUtils.equals(getUploader(), info.getUploaderName());
|
&& TextUtils.equals(getUploader(), info.getUploaderName());
|
||||||
//if (DEBUG) Log.d(TAG, TAG+"() called with result: returnMe = "+returnMe);
|
|
||||||
//return returnMe;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getUid() {
|
public long getUid() {
|
||||||
|
|
|
@ -28,8 +28,13 @@ public class RemotePlaylistItemHolder extends PlaylistItemHolder {
|
||||||
|
|
||||||
itemTitleView.setText(item.getName());
|
itemTitleView.setText(item.getName());
|
||||||
itemStreamCountView.setText(String.valueOf(item.getStreamCount()));
|
itemStreamCountView.setText(String.valueOf(item.getStreamCount()));
|
||||||
|
// Here is where the uploader name is set in the bookmarked playlists library
|
||||||
itemUploaderView.setText(Localization.concatenateStrings(item.getUploader(),
|
itemUploaderView.setText(Localization.concatenateStrings(item.getUploader(),
|
||||||
NewPipe.getNameOfService(item.getServiceId())));
|
NewPipe.getNameOfService(item.getServiceId())));
|
||||||
|
if (item.getUploader() == null) {
|
||||||
|
itemUploaderView.setText(NewPipe.getNameOfService(item.getServiceId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
itemBuilder.displayImage(item.getThumbnailUrl(), itemThumbnailView,
|
itemBuilder.displayImage(item.getThumbnailUrl(), itemThumbnailView,
|
||||||
ImageDisplayConstants.DISPLAY_PLAYLIST_OPTIONS);
|
ImageDisplayConstants.DISPLAY_PLAYLIST_OPTIONS);
|
||||||
|
|
Loading…
Reference in New Issue