mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 01:03:00 +00:00 
			
		
		
		
	Add getThumbnailUrl() to PlaylistLocalItem interface
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
This commit is contained in:
		@@ -1,5 +1,7 @@
 | 
			
		||||
package org.schabi.newpipe.database.playlist;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
 | 
			
		||||
import org.schabi.newpipe.database.LocalItem;
 | 
			
		||||
 | 
			
		||||
public interface PlaylistLocalItem extends LocalItem {
 | 
			
		||||
@@ -10,4 +12,7 @@ public interface PlaylistLocalItem extends LocalItem {
 | 
			
		||||
    long getUid();
 | 
			
		||||
 | 
			
		||||
    void setDisplayIndex(long displayIndex);
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    String getThumbnailUrl();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -9,6 +9,8 @@ import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST
 | 
			
		||||
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_THUMBNAIL_STREAM_ID;
 | 
			
		||||
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_THUMBNAIL_URL;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
 | 
			
		||||
public class PlaylistMetadataEntry implements PlaylistLocalItem {
 | 
			
		||||
    public static final String PLAYLIST_STREAM_COUNT = "streamCount";
 | 
			
		||||
 | 
			
		||||
@@ -71,4 +73,10 @@ public class PlaylistMetadataEntry implements PlaylistLocalItem {
 | 
			
		||||
    public void setDisplayIndex(final long displayIndex) {
 | 
			
		||||
        this.displayIndex = displayIndex;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getThumbnailUrl() {
 | 
			
		||||
        return thumbnailUrl;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -2,6 +2,7 @@ package org.schabi.newpipe.database.playlist.model;
 | 
			
		||||
 | 
			
		||||
import android.text.TextUtils;
 | 
			
		||||
 | 
			
		||||
import androidx.annotation.Nullable;
 | 
			
		||||
import androidx.room.ColumnInfo;
 | 
			
		||||
import androidx.room.Entity;
 | 
			
		||||
import androidx.room.Ignore;
 | 
			
		||||
@@ -134,6 +135,8 @@ public class PlaylistRemoteEntity implements PlaylistLocalItem {
 | 
			
		||||
        this.name = name;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Nullable
 | 
			
		||||
    @Override
 | 
			
		||||
    public String getThumbnailUrl() {
 | 
			
		||||
        return thumbnailUrl;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user