mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-29 05:21:20 +01:00
Make uploader_url column nullable
This commit is contained in:
parent
bd0427c79f
commit
21bcadeecb
@ -2,7 +2,7 @@
|
|||||||
"formatVersion": 1,
|
"formatVersion": 1,
|
||||||
"database": {
|
"database": {
|
||||||
"version": 4,
|
"version": 4,
|
||||||
"identityHash": "1dbb09d1ec0ce142bb07bc108ac58275",
|
"identityHash": "d8070091972a7011bce18aed62f80b90",
|
||||||
"entities": [
|
"entities": [
|
||||||
{
|
{
|
||||||
"tableName": "subscriptions",
|
"tableName": "subscriptions",
|
||||||
@ -119,7 +119,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"tableName": "streams",
|
"tableName": "streams",
|
||||||
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `service_id` INTEGER NOT NULL, `url` TEXT NOT NULL, `title` TEXT NOT NULL, `stream_type` TEXT NOT NULL, `duration` INTEGER NOT NULL, `uploader` TEXT NOT NULL, `uploader_url` TEXT NOT NULL, `thumbnail_url` TEXT, `view_count` INTEGER, `textual_upload_date` TEXT, `upload_date` INTEGER, `is_upload_date_approximation` INTEGER)",
|
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `service_id` INTEGER NOT NULL, `url` TEXT NOT NULL, `title` TEXT NOT NULL, `stream_type` TEXT NOT NULL, `duration` INTEGER NOT NULL, `uploader` TEXT NOT NULL, `uploader_url` TEXT, `thumbnail_url` TEXT, `view_count` INTEGER, `textual_upload_date` TEXT, `upload_date` INTEGER, `is_upload_date_approximation` INTEGER)",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldPath": "uid",
|
"fieldPath": "uid",
|
||||||
@ -164,10 +164,10 @@
|
|||||||
"notNull": true
|
"notNull": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldPath": "uploader_url",
|
"fieldPath": "uploaderUrl",
|
||||||
"columnName": "uploader_url",
|
"columnName": "uploader_url",
|
||||||
"affinity": "TEXT",
|
"affinity": "TEXT",
|
||||||
"notNull": true
|
"notNull": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldPath": "thumbnailUrl",
|
"fieldPath": "thumbnailUrl",
|
||||||
@ -707,7 +707,7 @@
|
|||||||
"views": [],
|
"views": [],
|
||||||
"setupQueries": [
|
"setupQueries": [
|
||||||
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
|
||||||
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '1dbb09d1ec0ce142bb07bc108ac58275')"
|
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd8070091972a7011bce18aed62f80b90')"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -165,7 +165,7 @@ public final class Migrations {
|
|||||||
@Override
|
@Override
|
||||||
public void migrate(@NonNull final SupportSQLiteDatabase database) {
|
public void migrate(@NonNull final SupportSQLiteDatabase database) {
|
||||||
database.execSQL(
|
database.execSQL(
|
||||||
"ALTER TABLE streams ADD COLUMN uploader_url TEXT NOT NULL default ''"
|
"ALTER TABLE streams ADD COLUMN uploader_url TEXT"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -27,7 +27,7 @@ data class PlaylistStreamEntry(
|
|||||||
val item = StreamInfoItem(streamEntity.serviceId, streamEntity.url, streamEntity.title, streamEntity.streamType)
|
val item = StreamInfoItem(streamEntity.serviceId, streamEntity.url, streamEntity.title, streamEntity.streamType)
|
||||||
item.duration = streamEntity.duration
|
item.duration = streamEntity.duration
|
||||||
item.uploaderName = streamEntity.uploader
|
item.uploaderName = streamEntity.uploader
|
||||||
item.uploaderUrl = streamEntity.uploaderUrl
|
item.uploaderUrl = streamEntity.uploaderUrl ?: ""
|
||||||
item.thumbnailUrl = streamEntity.thumbnailUrl
|
item.thumbnailUrl = streamEntity.thumbnailUrl
|
||||||
|
|
||||||
return item
|
return item
|
||||||
|
@ -47,7 +47,7 @@ data class StreamEntity(
|
|||||||
var uploader: String,
|
var uploader: String,
|
||||||
|
|
||||||
@ColumnInfo(name = STREAM_UPLOADER_URL)
|
@ColumnInfo(name = STREAM_UPLOADER_URL)
|
||||||
var uploaderUrl: String,
|
var uploaderUrl: String? = null,
|
||||||
|
|
||||||
@ColumnInfo(name = STREAM_THUMBNAIL_URL)
|
@ColumnInfo(name = STREAM_THUMBNAIL_URL)
|
||||||
var thumbnailUrl: String? = null,
|
var thumbnailUrl: String? = null,
|
||||||
|
Loading…
Reference in New Issue
Block a user