Skip to content

Commit 5eabcb5

Browse files
Stypoxhaggaie
andcommitted
Add getThumbnailUrl() to PlaylistLocalItem interface
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
1 parent 690b40d commit 5eabcb5

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistLocalItem.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.schabi.newpipe.database.playlist;
22

3+
import androidx.annotation.Nullable;
4+
35
import org.schabi.newpipe.database.LocalItem;
46

57
public interface PlaylistLocalItem extends LocalItem {
@@ -10,4 +12,7 @@ public interface PlaylistLocalItem extends LocalItem {
1012
long getUid();
1113

1214
void setDisplayIndex(long displayIndex);
15+
16+
@Nullable
17+
String getThumbnailUrl();
1318
}

app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistMetadataEntry.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_THUMBNAIL_STREAM_ID;
1010
import static org.schabi.newpipe.database.playlist.model.PlaylistEntity.PLAYLIST_THUMBNAIL_URL;
1111

12+
import androidx.annotation.Nullable;
13+
1214
public class PlaylistMetadataEntry implements PlaylistLocalItem {
1315
public static final String PLAYLIST_STREAM_COUNT = "streamCount";
1416

@@ -71,4 +73,10 @@ public long getUid() {
7173
public void setDisplayIndex(final long displayIndex) {
7274
this.displayIndex = displayIndex;
7375
}
76+
77+
@Nullable
78+
@Override
79+
public String getThumbnailUrl() {
80+
return thumbnailUrl;
81+
}
7482
}

app/src/main/java/org/schabi/newpipe/database/playlist/model/PlaylistRemoteEntity.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.text.TextUtils;
44

5+
import androidx.annotation.Nullable;
56
import androidx.room.ColumnInfo;
67
import androidx.room.Entity;
78
import androidx.room.Ignore;
@@ -134,6 +135,8 @@ public void setName(final String name) {
134135
this.name = name;
135136
}
136137

138+
@Nullable
139+
@Override
137140
public String getThumbnailUrl() {
138141
return thumbnailUrl;
139142
}

0 commit comments

Comments
 (0)