-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9538 from Jared234/4186_warning_duplicates_in_pla…
…ylist Handle duplicate streams in the "Add to playlist" dialog
- Loading branch information
Showing
7 changed files
with
121 additions
and
10 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
app/src/main/java/org/schabi/newpipe/database/playlist/PlaylistDuplicatesEntry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.schabi.newpipe.database.playlist; | ||
|
||
import androidx.room.ColumnInfo; | ||
|
||
/** | ||
* This class adds a field to {@link PlaylistMetadataEntry} that contains an integer representing | ||
* how many times a specific stream is already contained inside a local playlist. Used to be able | ||
* to grey out playlists which already contain the current stream in the playlist append dialog. | ||
* @see org.schabi.newpipe.local.playlist.LocalPlaylistManager#getPlaylistDuplicates(String) | ||
*/ | ||
public class PlaylistDuplicatesEntry extends PlaylistMetadataEntry { | ||
public static final String PLAYLIST_TIMES_STREAM_IS_CONTAINED = "timesStreamIsContained"; | ||
@ColumnInfo(name = PLAYLIST_TIMES_STREAM_IS_CONTAINED) | ||
public final long timesStreamIsContained; | ||
|
||
public PlaylistDuplicatesEntry(final long uid, | ||
final String name, | ||
final String thumbnailUrl, | ||
final long streamCount, | ||
final long timesStreamIsContained) { | ||
super(uid, name, thumbnailUrl, streamCount); | ||
this.timesStreamIsContained = timesStreamIsContained; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters