1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-10-24 11:57:38 +00:00

Add uploader_url column to StreamEntity

This commit is contained in:
ktprograms
2021-08-11 16:26:13 +08:00
parent a536311d56
commit 759a078ce0
8 changed files with 743 additions and 9 deletions

View File

@@ -45,7 +45,8 @@ class LocalPlaylistManagerTest {
fun createPlaylist() {
val stream = StreamEntity(
serviceId = 1, url = "https://newpipe.net/", title = "title",
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader"
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader",
uploaderUrl = "https://newpipe.net/"
)
val result = manager.createPlaylist("name", listOf(stream))
@@ -69,12 +70,14 @@ class LocalPlaylistManagerTest {
fun createPlaylist_nonExistentStreamsAreUpserted() {
val stream = StreamEntity(
serviceId = 1, url = "https://newpipe.net/", title = "title",
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader"
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader",
uploaderUrl = "https://newpipe.net/"
)
database.streamDAO().insert(stream)
val upserted = StreamEntity(
serviceId = 1, url = "https://newpipe.net/2", title = "title2",
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader"
streamType = StreamType.VIDEO_STREAM, duration = 1, uploader = "uploader",
uploaderUrl = "https://newpipe.net/"
)
val result = manager.createPlaylist("name", listOf(stream, upserted))