Make uploader_url column nullable

This commit is contained in:
ktprograms 2021-08-14 17:48:35 +08:00
parent bd0427c79f
commit 21bcadeecb
4 changed files with 8 additions and 8 deletions

View file

@ -165,7 +165,7 @@ public final class Migrations {
@Override
public void migrate(@NonNull final SupportSQLiteDatabase database) {
database.execSQL(
"ALTER TABLE streams ADD COLUMN uploader_url TEXT NOT NULL default ''"
"ALTER TABLE streams ADD COLUMN uploader_url TEXT"
);
}
};

View file

@ -27,7 +27,7 @@ data class PlaylistStreamEntry(
val item = StreamInfoItem(streamEntity.serviceId, streamEntity.url, streamEntity.title, streamEntity.streamType)
item.duration = streamEntity.duration
item.uploaderName = streamEntity.uploader
item.uploaderUrl = streamEntity.uploaderUrl
item.uploaderUrl = streamEntity.uploaderUrl ?: ""
item.thumbnailUrl = streamEntity.thumbnailUrl
return item

View file

@ -47,7 +47,7 @@ data class StreamEntity(
var uploader: String,
@ColumnInfo(name = STREAM_UPLOADER_URL)
var uploaderUrl: String,
var uploaderUrl: String? = null,
@ColumnInfo(name = STREAM_THUMBNAIL_URL)
var thumbnailUrl: String? = null,