StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
{
"formatVersion": 1,
"database": {
"version": 23,
"identityHash": "87d297c018c8c8eb14620c14e9003bb1",
"entities": [
{
"tableName": "providers",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `server_url` TEXT NOT NULL, `username` TEXT NOT NULL, `password` TEXT NOT NULL, `m3u_url` TEXT NOT NULL, `epg_url` TEXT NOT NULL, `is_active` INTEGER NOT NULL, `max_connections` INTEGER NOT NULL, `expiration_date` INTEGER, `api_version` TEXT, `allowed_output_formats_json` TEXT NOT NULL, `status` TEXT NOT NULL, `last_synced_at` INTEGER NOT NULL, `created_at` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "serverUrl",
"columnName": "server_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "username",
"columnName": "username",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "password",
"columnName": "password",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "m3uUrl",
"columnName": "m3u_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "epgUrl",
"columnName": "epg_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isActive",
"columnName": "is_active",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "maxConnections",
"columnName": "max_connections",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "expirationDate",
"columnName": "expiration_date",
"affinity": "INTEGER"
},
{
"fieldPath": "apiVersion",
"columnName": "api_version",
"affinity": "TEXT"
},
{
"fieldPath": "allowedOutputFormatsJson",
"columnName": "allowed_output_formats_json",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "status",
"columnName": "status",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastSyncedAt",
"columnName": "last_synced_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_providers_server_url_username",
"unique": true,
"columnNames": [
"server_url",
"username"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_providers_server_url_username` ON `${TABLE_NAME}` (`server_url`, `username`)"
}
]
},
{
"tableName": "channels",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `stream_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `logo_url` TEXT, `group_title` TEXT, `category_id` INTEGER, `category_name` TEXT, `stream_url` TEXT NOT NULL, `epg_channel_id` TEXT, `number` INTEGER NOT NULL, `catch_up_supported` INTEGER NOT NULL, `catch_up_days` INTEGER NOT NULL, `catchUpSource` TEXT, `provider_id` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `is_user_protected` INTEGER NOT NULL, `logical_group_id` TEXT NOT NULL, `error_count` INTEGER NOT NULL, `quality_options_json` TEXT, `sync_fingerprint` TEXT NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "streamId",
"columnName": "stream_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "logoUrl",
"columnName": "logo_url",
"affinity": "TEXT"
},
{
"fieldPath": "groupTitle",
"columnName": "group_title",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "epgChannelId",
"columnName": "epg_channel_id",
"affinity": "TEXT"
},
{
"fieldPath": "number",
"columnName": "number",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpSupported",
"columnName": "catch_up_supported",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpDays",
"columnName": "catch_up_days",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpSource",
"columnName": "catchUpSource",
"affinity": "TEXT"
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isUserProtected",
"columnName": "is_user_protected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "logicalGroupId",
"columnName": "logical_group_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "errorCount",
"columnName": "error_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "qualityOptionsJson",
"columnName": "quality_options_json",
"affinity": "TEXT"
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_channels_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channels_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_channels_provider_id_category_id",
"unique": false,
"columnNames": [
"provider_id",
"category_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channels_provider_id_category_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`)"
},
{
"name": "index_channels_provider_id_stream_id",
"unique": true,
"columnNames": [
"provider_id",
"stream_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_channels_provider_id_stream_id` ON `${TABLE_NAME}` (`provider_id`, `stream_id`)"
},
{
"name": "index_channels_logical_group_id",
"unique": false,
"columnNames": [
"logical_group_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channels_logical_group_id` ON `${TABLE_NAME}` (`logical_group_id`)"
},
{
"name": "index_channels_provider_id_category_id_logical_group_id",
"unique": false,
"columnNames": [
"provider_id",
"category_id",
"logical_group_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channels_provider_id_category_id_logical_group_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`, `logical_group_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "channel_preferences",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `channel_id` INTEGER NOT NULL, `aspect_ratio` TEXT, `updated_at` INTEGER NOT NULL, FOREIGN KEY(`channel_id`) REFERENCES `channels`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "channelId",
"columnName": "channel_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "aspectRatio",
"columnName": "aspect_ratio",
"affinity": "TEXT"
},
{
"fieldPath": "updatedAt",
"columnName": "updated_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_channel_preferences_channel_id",
"unique": true,
"columnNames": [
"channel_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_channel_preferences_channel_id` ON `${TABLE_NAME}` (`channel_id`)"
}
],
"foreignKeys": [
{
"table": "channels",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"channel_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "channels_fts",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`name` TEXT NOT NULL, content=`channels`)",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": []
},
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "simple",
"tokenizerArgs": [],
"contentTable": "channels",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_channels_fts_BEFORE_UPDATE BEFORE UPDATE ON `channels` BEGIN DELETE FROM `channels_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_channels_fts_BEFORE_DELETE BEFORE DELETE ON `channels` BEGIN DELETE FROM `channels_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_channels_fts_AFTER_UPDATE AFTER UPDATE ON `channels` BEGIN INSERT INTO `channels_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_channels_fts_AFTER_INSERT AFTER INSERT ON `channels` BEGIN INSERT INTO `channels_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END"
]
},
{
"tableName": "movies",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `stream_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `poster_url` TEXT, `backdrop_url` TEXT, `category_id` INTEGER, `category_name` TEXT, `stream_url` TEXT NOT NULL, `container_extension` TEXT, `plot` TEXT, `cast` TEXT, `director` TEXT, `genre` TEXT, `release_date` TEXT, `duration` TEXT, `duration_seconds` INTEGER NOT NULL, `rating` REAL NOT NULL, `year` TEXT, `tmdb_id` INTEGER, `youtube_trailer` TEXT, `provider_id` INTEGER NOT NULL, `watch_progress` INTEGER NOT NULL, `last_watched_at` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `is_user_protected` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "streamId",
"columnName": "stream_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "posterUrl",
"columnName": "poster_url",
"affinity": "TEXT"
},
{
"fieldPath": "backdropUrl",
"columnName": "backdrop_url",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "containerExtension",
"columnName": "container_extension",
"affinity": "TEXT"
},
{
"fieldPath": "plot",
"columnName": "plot",
"affinity": "TEXT"
},
{
"fieldPath": "cast",
"columnName": "cast",
"affinity": "TEXT"
},
{
"fieldPath": "director",
"columnName": "director",
"affinity": "TEXT"
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT"
},
{
"fieldPath": "releaseDate",
"columnName": "release_date",
"affinity": "TEXT"
},
{
"fieldPath": "duration",
"columnName": "duration",
"affinity": "TEXT"
},
{
"fieldPath": "durationSeconds",
"columnName": "duration_seconds",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "year",
"columnName": "year",
"affinity": "TEXT"
},
{
"fieldPath": "tmdbId",
"columnName": "tmdb_id",
"affinity": "INTEGER"
},
{
"fieldPath": "youtubeTrailer",
"columnName": "youtube_trailer",
"affinity": "TEXT"
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "watchProgress",
"columnName": "watch_progress",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastWatchedAt",
"columnName": "last_watched_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isUserProtected",
"columnName": "is_user_protected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_movies_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_movies_provider_id_category_id",
"unique": false,
"columnNames": [
"provider_id",
"category_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id_category_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`)"
},
{
"name": "index_movies_provider_id_stream_id",
"unique": true,
"columnNames": [
"provider_id",
"stream_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_movies_provider_id_stream_id` ON `${TABLE_NAME}` (`provider_id`, `stream_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "movies_fts",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`name` TEXT NOT NULL, content=`movies`)",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": []
},
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "simple",
"tokenizerArgs": [],
"contentTable": "movies",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_movies_fts_BEFORE_UPDATE BEFORE UPDATE ON `movies` BEGIN DELETE FROM `movies_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_movies_fts_BEFORE_DELETE BEFORE DELETE ON `movies` BEGIN DELETE FROM `movies_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_movies_fts_AFTER_UPDATE AFTER UPDATE ON `movies` BEGIN INSERT INTO `movies_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_movies_fts_AFTER_INSERT AFTER INSERT ON `movies` BEGIN INSERT INTO `movies_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END"
]
},
{
"tableName": "series",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `series_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `poster_url` TEXT, `backdrop_url` TEXT, `category_id` INTEGER, `category_name` TEXT, `plot` TEXT, `cast` TEXT, `director` TEXT, `genre` TEXT, `release_date` TEXT, `rating` REAL NOT NULL, `tmdb_id` INTEGER, `youtube_trailer` TEXT, `episode_run_time` TEXT, `last_modified` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `is_user_protected` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesId",
"columnName": "series_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "posterUrl",
"columnName": "poster_url",
"affinity": "TEXT"
},
{
"fieldPath": "backdropUrl",
"columnName": "backdrop_url",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "plot",
"columnName": "plot",
"affinity": "TEXT"
},
{
"fieldPath": "cast",
"columnName": "cast",
"affinity": "TEXT"
},
{
"fieldPath": "director",
"columnName": "director",
"affinity": "TEXT"
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT"
},
{
"fieldPath": "releaseDate",
"columnName": "release_date",
"affinity": "TEXT"
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "tmdbId",
"columnName": "tmdb_id",
"affinity": "INTEGER"
},
{
"fieldPath": "youtubeTrailer",
"columnName": "youtube_trailer",
"affinity": "TEXT"
},
{
"fieldPath": "episodeRunTime",
"columnName": "episode_run_time",
"affinity": "TEXT"
},
{
"fieldPath": "lastModified",
"columnName": "last_modified",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isUserProtected",
"columnName": "is_user_protected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_series_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_series_provider_id_category_id",
"unique": false,
"columnNames": [
"provider_id",
"category_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id_category_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`)"
},
{
"name": "index_series_provider_id_series_id",
"unique": true,
"columnNames": [
"provider_id",
"series_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_series_provider_id_series_id` ON `${TABLE_NAME}` (`provider_id`, `series_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "series_fts",
"createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`name` TEXT NOT NULL, content=`series`)",
"fields": [
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": []
},
"ftsVersion": "FTS4",
"ftsOptions": {
"tokenizer": "simple",
"tokenizerArgs": [],
"contentTable": "series",
"languageIdColumnName": "",
"matchInfo": "FTS4",
"notIndexedColumns": [],
"prefixSizes": [],
"preferredOrder": "ASC"
},
"contentSyncTriggers": [
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_series_fts_BEFORE_UPDATE BEFORE UPDATE ON `series` BEGIN DELETE FROM `series_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_series_fts_BEFORE_DELETE BEFORE DELETE ON `series` BEGIN DELETE FROM `series_fts` WHERE `docid`=OLD.`rowid`; END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_series_fts_AFTER_UPDATE AFTER UPDATE ON `series` BEGIN INSERT INTO `series_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END",
"CREATE TRIGGER IF NOT EXISTS room_fts_content_sync_series_fts_AFTER_INSERT AFTER INSERT ON `series` BEGIN INSERT INTO `series_fts`(`docid`, `name`) VALUES (NEW.`rowid`, NEW.`name`); END"
]
},
{
"tableName": "episodes",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `episode_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `episode_number` INTEGER NOT NULL, `season_number` INTEGER NOT NULL, `stream_url` TEXT NOT NULL, `container_extension` TEXT, `cover_url` TEXT, `plot` TEXT, `duration` TEXT, `duration_seconds` INTEGER NOT NULL, `rating` REAL NOT NULL, `release_date` TEXT, `series_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `watch_progress` INTEGER NOT NULL, `last_watched_at` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `is_user_protected` INTEGER NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`series_id`) REFERENCES `series`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "episodeId",
"columnName": "episode_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "episodeNumber",
"columnName": "episode_number",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seasonNumber",
"columnName": "season_number",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "containerExtension",
"columnName": "container_extension",
"affinity": "TEXT"
},
{
"fieldPath": "coverUrl",
"columnName": "cover_url",
"affinity": "TEXT"
},
{
"fieldPath": "plot",
"columnName": "plot",
"affinity": "TEXT"
},
{
"fieldPath": "duration",
"columnName": "duration",
"affinity": "TEXT"
},
{
"fieldPath": "durationSeconds",
"columnName": "duration_seconds",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "releaseDate",
"columnName": "release_date",
"affinity": "TEXT"
},
{
"fieldPath": "seriesId",
"columnName": "series_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "watchProgress",
"columnName": "watch_progress",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastWatchedAt",
"columnName": "last_watched_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isUserProtected",
"columnName": "is_user_protected",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_episodes_series_id",
"unique": false,
"columnNames": [
"series_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_episodes_series_id` ON `${TABLE_NAME}` (`series_id`)"
},
{
"name": "index_episodes_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_episodes_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_episodes_provider_id_episode_id",
"unique": true,
"columnNames": [
"provider_id",
"episode_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_episodes_provider_id_episode_id` ON `${TABLE_NAME}` (`provider_id`, `episode_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
},
{
"table": "series",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"series_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "categories",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `category_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `parent_id` INTEGER, `type` TEXT NOT NULL, `provider_id` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `is_user_protected` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentId",
"columnName": "parent_id",
"affinity": "INTEGER"
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isUserProtected",
"columnName": "is_user_protected",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_categories_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_categories_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_categories_provider_id_type",
"unique": false,
"columnNames": [
"provider_id",
"type"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_categories_provider_id_type` ON `${TABLE_NAME}` (`provider_id`, `type`)"
},
{
"name": "index_categories_provider_id_category_id_type",
"unique": true,
"columnNames": [
"provider_id",
"category_id",
"type"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_categories_provider_id_category_id_type` ON `${TABLE_NAME}` (`provider_id`, `category_id`, `type`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "channel_import_stage",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`session_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `stream_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `logo_url` TEXT, `group_title` TEXT, `category_id` INTEGER, `category_name` TEXT, `stream_url` TEXT NOT NULL, `epg_channel_id` TEXT, `number` INTEGER NOT NULL, `catch_up_supported` INTEGER NOT NULL, `catch_up_days` INTEGER NOT NULL, `catchUpSource` TEXT, `is_adult` INTEGER NOT NULL, `logical_group_id` TEXT NOT NULL, `error_count` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, PRIMARY KEY(`session_id`, `provider_id`, `stream_id`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "sessionId",
"columnName": "session_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "streamId",
"columnName": "stream_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "logoUrl",
"columnName": "logo_url",
"affinity": "TEXT"
},
{
"fieldPath": "groupTitle",
"columnName": "group_title",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "epgChannelId",
"columnName": "epg_channel_id",
"affinity": "TEXT"
},
{
"fieldPath": "number",
"columnName": "number",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpSupported",
"columnName": "catch_up_supported",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpDays",
"columnName": "catch_up_days",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "catchUpSource",
"columnName": "catchUpSource",
"affinity": "TEXT"
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "logicalGroupId",
"columnName": "logical_group_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "errorCount",
"columnName": "error_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"session_id",
"provider_id",
"stream_id"
]
},
"indices": [
{
"name": "index_channel_import_stage_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channel_import_stage_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_channel_import_stage_session_id_provider_id",
"unique": false,
"columnNames": [
"session_id",
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_channel_import_stage_session_id_provider_id` ON `${TABLE_NAME}` (`session_id`, `provider_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "movie_import_stage",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`session_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `stream_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `poster_url` TEXT, `backdrop_url` TEXT, `category_id` INTEGER, `category_name` TEXT, `stream_url` TEXT NOT NULL, `container_extension` TEXT, `plot` TEXT, `cast` TEXT, `director` TEXT, `genre` TEXT, `release_date` TEXT, `duration` TEXT, `duration_seconds` INTEGER NOT NULL, `rating` REAL NOT NULL, `year` TEXT, `tmdb_id` INTEGER, `youtube_trailer` TEXT, `is_adult` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, PRIMARY KEY(`session_id`, `provider_id`, `stream_id`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "sessionId",
"columnName": "session_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "streamId",
"columnName": "stream_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "posterUrl",
"columnName": "poster_url",
"affinity": "TEXT"
},
{
"fieldPath": "backdropUrl",
"columnName": "backdrop_url",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "containerExtension",
"columnName": "container_extension",
"affinity": "TEXT"
},
{
"fieldPath": "plot",
"columnName": "plot",
"affinity": "TEXT"
},
{
"fieldPath": "cast",
"columnName": "cast",
"affinity": "TEXT"
},
{
"fieldPath": "director",
"columnName": "director",
"affinity": "TEXT"
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT"
},
{
"fieldPath": "releaseDate",
"columnName": "release_date",
"affinity": "TEXT"
},
{
"fieldPath": "duration",
"columnName": "duration",
"affinity": "TEXT"
},
{
"fieldPath": "durationSeconds",
"columnName": "duration_seconds",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "year",
"columnName": "year",
"affinity": "TEXT"
},
{
"fieldPath": "tmdbId",
"columnName": "tmdb_id",
"affinity": "INTEGER"
},
{
"fieldPath": "youtubeTrailer",
"columnName": "youtube_trailer",
"affinity": "TEXT"
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"session_id",
"provider_id",
"stream_id"
]
},
"indices": [
{
"name": "index_movie_import_stage_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_movie_import_stage_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_movie_import_stage_session_id_provider_id",
"unique": false,
"columnNames": [
"session_id",
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_movie_import_stage_session_id_provider_id` ON `${TABLE_NAME}` (`session_id`, `provider_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "series_import_stage",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`session_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `series_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `poster_url` TEXT, `backdrop_url` TEXT, `category_id` INTEGER, `category_name` TEXT, `plot` TEXT, `cast` TEXT, `director` TEXT, `genre` TEXT, `release_date` TEXT, `rating` REAL NOT NULL, `tmdb_id` INTEGER, `youtube_trailer` TEXT, `episode_run_time` TEXT, `last_modified` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, PRIMARY KEY(`session_id`, `provider_id`, `series_id`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "sessionId",
"columnName": "session_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesId",
"columnName": "series_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "posterUrl",
"columnName": "poster_url",
"affinity": "TEXT"
},
{
"fieldPath": "backdropUrl",
"columnName": "backdrop_url",
"affinity": "TEXT"
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER"
},
{
"fieldPath": "categoryName",
"columnName": "category_name",
"affinity": "TEXT"
},
{
"fieldPath": "plot",
"columnName": "plot",
"affinity": "TEXT"
},
{
"fieldPath": "cast",
"columnName": "cast",
"affinity": "TEXT"
},
{
"fieldPath": "director",
"columnName": "director",
"affinity": "TEXT"
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT"
},
{
"fieldPath": "releaseDate",
"columnName": "release_date",
"affinity": "TEXT"
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "tmdbId",
"columnName": "tmdb_id",
"affinity": "INTEGER"
},
{
"fieldPath": "youtubeTrailer",
"columnName": "youtube_trailer",
"affinity": "TEXT"
},
{
"fieldPath": "episodeRunTime",
"columnName": "episode_run_time",
"affinity": "TEXT"
},
{
"fieldPath": "lastModified",
"columnName": "last_modified",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"session_id",
"provider_id",
"series_id"
]
},
"indices": [
{
"name": "index_series_import_stage_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_series_import_stage_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_series_import_stage_session_id_provider_id",
"unique": false,
"columnNames": [
"session_id",
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_series_import_stage_session_id_provider_id` ON `${TABLE_NAME}` (`session_id`, `provider_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "category_import_stage",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`session_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `parent_id` INTEGER, `type` TEXT NOT NULL, `is_adult` INTEGER NOT NULL, `sync_fingerprint` TEXT NOT NULL, PRIMARY KEY(`session_id`, `provider_id`, `category_id`, `type`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "sessionId",
"columnName": "session_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "categoryId",
"columnName": "category_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "parentId",
"columnName": "parent_id",
"affinity": "INTEGER"
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isAdult",
"columnName": "is_adult",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "syncFingerprint",
"columnName": "sync_fingerprint",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"session_id",
"provider_id",
"category_id",
"type"
]
},
"indices": [
{
"name": "index_category_import_stage_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_category_import_stage_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_category_import_stage_session_id_provider_id",
"unique": false,
"columnNames": [
"session_id",
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_category_import_stage_session_id_provider_id` ON `${TABLE_NAME}` (`session_id`, `provider_id`)"
},
{
"name": "index_category_import_stage_provider_id_type",
"unique": false,
"columnNames": [
"provider_id",
"type"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_category_import_stage_provider_id_type` ON `${TABLE_NAME}` (`provider_id`, `type`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "programs",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `provider_id` INTEGER NOT NULL, `channel_id` TEXT NOT NULL, `title` TEXT NOT NULL, `description` TEXT NOT NULL, `start_time` INTEGER NOT NULL, `end_time` INTEGER NOT NULL, `lang` TEXT NOT NULL, `rating` TEXT, `image_url` TEXT, `genre` TEXT, `category` TEXT, `has_archive` INTEGER NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "channelId",
"columnName": "channel_id",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "description",
"columnName": "description",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "startTime",
"columnName": "start_time",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "endTime",
"columnName": "end_time",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lang",
"columnName": "lang",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "rating",
"columnName": "rating",
"affinity": "TEXT"
},
{
"fieldPath": "imageUrl",
"columnName": "image_url",
"affinity": "TEXT"
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT"
},
{
"fieldPath": "category",
"columnName": "category",
"affinity": "TEXT"
},
{
"fieldPath": "hasArchive",
"columnName": "has_archive",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_programs_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_programs_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
},
{
"name": "index_programs_provider_id_channel_id",
"unique": false,
"columnNames": [
"provider_id",
"channel_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_programs_provider_id_channel_id` ON `${TABLE_NAME}` (`provider_id`, `channel_id`)"
},
{
"name": "index_programs_provider_id_start_time_end_time",
"unique": false,
"columnNames": [
"provider_id",
"start_time",
"end_time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_programs_provider_id_start_time_end_time` ON `${TABLE_NAME}` (`provider_id`, `start_time`, `end_time`)"
},
{
"name": "index_programs_start_time",
"unique": false,
"columnNames": [
"start_time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_programs_start_time` ON `${TABLE_NAME}` (`start_time`)"
},
{
"name": "index_programs_provider_id_channel_id_start_time",
"unique": false,
"columnNames": [
"provider_id",
"channel_id",
"start_time"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_programs_provider_id_channel_id_start_time` ON `${TABLE_NAME}` (`provider_id`, `channel_id`, `start_time`)"
},
{
"name": "index_programs_provider_id_channel_id_start_time_end_time",
"unique": true,
"columnNames": [
"provider_id",
"channel_id",
"start_time",
"end_time"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_programs_provider_id_channel_id_start_time_end_time` ON `${TABLE_NAME}` (`provider_id`, `channel_id`, `start_time`, `end_time`)"
}
]
},
{
"tableName": "favorites",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `content_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `position` INTEGER NOT NULL, `group_id` INTEGER, `added_at` INTEGER NOT NULL, FOREIGN KEY(`group_id`) REFERENCES `virtual_groups`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "contentId",
"columnName": "content_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "contentType",
"columnName": "content_type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "position",
"columnName": "position",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "groupId",
"columnName": "group_id",
"affinity": "INTEGER"
},
{
"fieldPath": "addedAt",
"columnName": "added_at",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_favorites_content_id_content_type_group_id",
"unique": true,
"columnNames": [
"content_id",
"content_type",
"group_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_favorites_content_id_content_type_group_id` ON `${TABLE_NAME}` (`content_id`, `content_type`, `group_id`)"
},
{
"name": "index_favorites_content_type_group_id",
"unique": false,
"columnNames": [
"content_type",
"group_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_favorites_content_type_group_id` ON `${TABLE_NAME}` (`content_type`, `group_id`)"
},
{
"name": "index_favorites_group_id_position",
"unique": false,
"columnNames": [
"group_id",
"position"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_favorites_group_id_position` ON `${TABLE_NAME}` (`group_id`, `position`)"
}
],
"foreignKeys": [
{
"table": "virtual_groups",
"onDelete": "SET NULL",
"onUpdate": "NO ACTION",
"columns": [
"group_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "virtual_groups",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `icon_emoji` TEXT, `position` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `content_type` TEXT NOT NULL)",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "iconEmoji",
"columnName": "icon_emoji",
"affinity": "TEXT"
},
{
"fieldPath": "position",
"columnName": "position",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "createdAt",
"columnName": "created_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "contentType",
"columnName": "content_type",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_virtual_groups_position",
"unique": false,
"columnNames": [
"position"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_virtual_groups_position` ON `${TABLE_NAME}` (`position`)"
},
{
"name": "index_virtual_groups_content_type",
"unique": false,
"columnNames": [
"content_type"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_virtual_groups_content_type` ON `${TABLE_NAME}` (`content_type`)"
}
]
},
{
"tableName": "playback_history",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `content_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `provider_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `poster_url` TEXT, `stream_url` TEXT NOT NULL, `resume_position_ms` INTEGER NOT NULL, `total_duration_ms` INTEGER NOT NULL, `last_watched_at` INTEGER NOT NULL, `watch_count` INTEGER NOT NULL, `watched_status` TEXT NOT NULL, `series_id` INTEGER, `season_number` INTEGER, `episode_number` INTEGER, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "contentId",
"columnName": "content_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "contentType",
"columnName": "content_type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "title",
"columnName": "title",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "posterUrl",
"columnName": "poster_url",
"affinity": "TEXT"
},
{
"fieldPath": "streamUrl",
"columnName": "stream_url",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "resumePositionMs",
"columnName": "resume_position_ms",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "totalDurationMs",
"columnName": "total_duration_ms",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastWatchedAt",
"columnName": "last_watched_at",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "watchCount",
"columnName": "watch_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "watchedStatus",
"columnName": "watched_status",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "seriesId",
"columnName": "series_id",
"affinity": "INTEGER"
},
{
"fieldPath": "seasonNumber",
"columnName": "season_number",
"affinity": "INTEGER"
},
{
"fieldPath": "episodeNumber",
"columnName": "episode_number",
"affinity": "INTEGER"
}
],
"primaryKey": {
"autoGenerate": true,
"columnNames": [
"id"
]
},
"indices": [
{
"name": "index_playback_history_content_id_content_type_provider_id",
"unique": true,
"columnNames": [
"content_id",
"content_type",
"provider_id"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_playback_history_content_id_content_type_provider_id` ON `${TABLE_NAME}` (`content_id`, `content_type`, `provider_id`)"
},
{
"name": "index_playback_history_last_watched_at",
"unique": false,
"columnNames": [
"last_watched_at"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_playback_history_last_watched_at` ON `${TABLE_NAME}` (`last_watched_at`)"
},
{
"name": "index_playback_history_provider_id",
"unique": false,
"columnNames": [
"provider_id"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_playback_history_provider_id` ON `${TABLE_NAME}` (`provider_id`)"
}
],
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
},
{
"tableName": "sync_metadata",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `last_live_sync` INTEGER NOT NULL, `last_movie_sync` INTEGER NOT NULL, `last_series_sync` INTEGER NOT NULL, `last_epg_sync` INTEGER NOT NULL, `last_movie_attempt` INTEGER NOT NULL, `last_movie_success` INTEGER NOT NULL, `last_movie_partial` INTEGER NOT NULL, `live_count` INTEGER NOT NULL, `movie_count` INTEGER NOT NULL, `series_count` INTEGER NOT NULL, `epg_count` INTEGER NOT NULL, `last_sync_status` TEXT NOT NULL, `movie_sync_mode` TEXT NOT NULL, `movie_warnings_count` INTEGER NOT NULL, `movie_catalog_stale` INTEGER NOT NULL, `live_avoid_full_until` INTEGER NOT NULL, `movie_avoid_full_until` INTEGER NOT NULL, `series_avoid_full_until` INTEGER NOT NULL, `live_sequential_failures_remembered` INTEGER NOT NULL, `live_healthy_sync_streak` INTEGER NOT NULL, `movie_parallel_failures_remembered` INTEGER NOT NULL, `movie_healthy_sync_streak` INTEGER NOT NULL, `series_sequential_failures_remembered` INTEGER NOT NULL, `series_healthy_sync_streak` INTEGER NOT NULL, PRIMARY KEY(`provider_id`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "providerId",
"columnName": "provider_id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastLiveSync",
"columnName": "last_live_sync",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastMovieSync",
"columnName": "last_movie_sync",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastSeriesSync",
"columnName": "last_series_sync",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastEpgSync",
"columnName": "last_epg_sync",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastMovieAttempt",
"columnName": "last_movie_attempt",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastMovieSuccess",
"columnName": "last_movie_success",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastMoviePartial",
"columnName": "last_movie_partial",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "liveCount",
"columnName": "live_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "movieCount",
"columnName": "movie_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesCount",
"columnName": "series_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "epgCount",
"columnName": "epg_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "lastSyncStatus",
"columnName": "last_sync_status",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "movieSyncMode",
"columnName": "movie_sync_mode",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "movieWarningsCount",
"columnName": "movie_warnings_count",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "movieCatalogStale",
"columnName": "movie_catalog_stale",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "liveAvoidFullUntil",
"columnName": "live_avoid_full_until",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "movieAvoidFullUntil",
"columnName": "movie_avoid_full_until",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesAvoidFullUntil",
"columnName": "series_avoid_full_until",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "liveSequentialFailuresRemembered",
"columnName": "live_sequential_failures_remembered",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "liveHealthySyncStreak",
"columnName": "live_healthy_sync_streak",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "movieParallelFailuresRemembered",
"columnName": "movie_parallel_failures_remembered",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "movieHealthySyncStreak",
"columnName": "movie_healthy_sync_streak",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesSequentialFailuresRemembered",
"columnName": "series_sequential_failures_remembered",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "seriesHealthySyncStreak",
"columnName": "series_healthy_sync_streak",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"provider_id"
]
},
"foreignKeys": [
{
"table": "providers",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"provider_id"
],
"referencedColumns": [
"id"
]
}
]
}
],
"setupQueries": [
"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, '87d297c018c8c8eb14620c14e9003bb1')"
]
}
}