StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.
Kotlin iptv-player
feat: Implement catch-up support with M3U URL generation and database migration
David Nashashebffbbf388da
diff --git a/data/schemas/com.streamvault.data.local.StreamVaultDatabase/90.json b/data/schemas/com.streamvault.data.local.StreamVaultDatabase/90.jsonnew file mode 100644index 00000000..950d4369--- /dev/null+++ b/data/schemas/com.streamvault.data.local.StreamVaultDatabase/90.json@@ -0,0 +1,7532 @@+{+ "formatVersion": 1,+ "database": {+ "version": 90,+ "identityHash": "784a23e07a41e42401481f91f71ac763",+ "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, `is_active` INTEGER 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": "isActive",+ "columnName": "is_active",+ "affinity": "INTEGER",+ "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_type",+ "unique": false,+ "columnNames": [+ "type"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_providers_type` ON `${TABLE_NAME}` (`type`)"+ },+ {+ "name": "index_providers_is_active",+ "unique": false,+ "columnNames": [+ "is_active"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_providers_is_active` ON `${TABLE_NAME}` (`is_active`)"+ }+ ]+ },+ {+ "tableName": "provider_configs",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `type` TEXT NOT NULL, `schema_version` INTEGER NOT NULL, `configuration_generation` INTEGER NOT NULL, `identity_key` TEXT NOT NULL, `encrypted_config_json` TEXT NOT NULL, `guide_source_policy` TEXT NOT NULL, `channel_logo_source_policy` TEXT NOT NULL, `updated_at` 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": "type",+ "columnName": "type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "schemaVersion",+ "columnName": "schema_version",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "configurationGeneration",+ "columnName": "configuration_generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "identityKey",+ "columnName": "identity_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "encryptedConfigJson",+ "columnName": "encrypted_config_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "guideSourcePolicy",+ "columnName": "guide_source_policy",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "channelLogoSourcePolicy",+ "columnName": "channel_logo_source_policy",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id"+ ]+ },+ "indices": [+ {+ "name": "index_provider_configs_provider_id",+ "unique": true,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_provider_configs_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_provider_configs_identity_key",+ "unique": true,+ "columnNames": [+ "identity_key"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_provider_configs_identity_key` ON `${TABLE_NAME}` (`identity_key`)"+ },+ {+ "name": "index_provider_configs_type",+ "unique": false,+ "columnNames": [+ "type"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_configs_type` ON `${TABLE_NAME}` (`type`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "provider_account_runtime",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `max_connections` INTEGER NOT NULL, `expiration_date` INTEGER, `api_version` TEXT, `allowed_output_formats_json` TEXT NOT NULL, `catalog_layout` TEXT NOT NULL, `catalog_layout_detection_version` INTEGER NOT NULL, `observed_at` 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": "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": "catalogLayout",+ "columnName": "catalog_layout",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "catalogLayoutDetectionVersion",+ "columnName": "catalog_layout_detection_version",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "observedAt",+ "columnName": "observed_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id"+ ]+ },+ "indices": [+ {+ "name": "index_provider_account_runtime_provider_id",+ "unique": true,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_provider_account_runtime_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "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, `playback_metadata_json` TEXT, `sync_fingerprint` TEXT NOT NULL, `catch_up_type` TEXT, `catch_up_correction_seconds` INTEGER 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": "playbackMetadataJson",+ "columnName": "playback_metadata_json",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncFingerprint",+ "columnName": "sync_fingerprint",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "catchUpType",+ "columnName": "catch_up_type",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "catchUpCorrectionSeconds",+ "columnName": "catch_up_correction_seconds",+ "affinity": "INTEGER",+ "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, `audio_video_offset_ms` INTEGER, `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": "audioVideoOffsetMs",+ "columnName": "audio_video_offset_ms",+ "affinity": "INTEGER"+ },+ {+ "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": "playback_quality_preferences",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `scope_type` TEXT NOT NULL, `scope_key` TEXT NOT NULL, `identity_version` INTEGER NOT NULL DEFAULT 1, `height_override` TEXT NOT NULL, `max_video_height` INTEGER, `bitrate_override` TEXT NOT NULL, `max_video_bitrate_bps` INTEGER, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `scope_type`, `scope_key`), 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": "scopeType",+ "columnName": "scope_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "scopeKey",+ "columnName": "scope_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "identityVersion",+ "columnName": "identity_version",+ "affinity": "INTEGER",+ "notNull": true,+ "defaultValue": "1"+ },+ {+ "fieldPath": "heightOverride",+ "columnName": "height_override",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "maxVideoHeight",+ "columnName": "max_video_height",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "bitrateOverride",+ "columnName": "bitrate_override",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "maxVideoBitrateBps",+ "columnName": "max_video_bitrate_bps",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "scope_type",+ "scope_key"+ ]+ },+ "indices": [+ {+ "name": "index_playback_quality_preferences_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_quality_preferences_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "channels_fts",+ "createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`name` TEXT NOT NULL, tokenize=unicode61 `remove_diacritics=1`, content=`channels`)",+ "fields": [+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": []+ },+ "ftsVersion": "FTS4",+ "ftsOptions": {+ "tokenizer": "unicode61",+ "tokenizerArgs": [+ "remove_diacritics=1"+ ],+ "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, `watch_count` 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, `added_at` INTEGER NOT NULL, `cache_state` TEXT NOT NULL, `detail_hydrated_at` INTEGER NOT NULL, `remote_stale_at` INTEGER NOT NULL, `playback_metadata_json` TEXT, 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": "watchCount",+ "columnName": "watch_count",+ "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+ },+ {+ "fieldPath": "addedAt",+ "columnName": "added_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "cacheState",+ "columnName": "cache_state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "detailHydratedAt",+ "columnName": "detail_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "remoteStaleAt",+ "columnName": "remote_stale_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "playbackMetadataJson",+ "columnName": "playback_metadata_json",+ "affinity": "TEXT"+ }+ ],+ "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`)"+ },+ {+ "name": "index_movies_provider_id_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id_name_id` ON `${TABLE_NAME}` (`provider_id`, `name`, `id`)"+ },+ {+ "name": "index_movies_provider_id_category_id_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "category_id",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id_category_id_name_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`, `name`, `id`)"+ },+ {+ "name": "index_movies_provider_id_rating_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "rating",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id_rating_name_id` ON `${TABLE_NAME}` (`provider_id`, `rating`, `name`, `id`)"+ },+ {+ "name": "index_movies_provider_id_added_at_release_date_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "added_at",+ "release_date",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_movies_provider_id_added_at_release_date_name_id` ON `${TABLE_NAME}` (`provider_id`, `added_at`, `release_date`, `name`, `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, tokenize=unicode61 `remove_diacritics=1`, content=`movies`)",+ "fields": [+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": []+ },+ "ftsVersion": "FTS4",+ "ftsOptions": {+ "tokenizer": "unicode61",+ "tokenizerArgs": [+ "remove_diacritics=1"+ ],+ "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, `provider_series_id` TEXT, `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, `cache_state` TEXT NOT NULL, `detail_hydrated_at` INTEGER NOT NULL, `remote_stale_at` INTEGER NOT NULL, `catalog_origin` TEXT NOT NULL, `episode_playback_template_url` TEXT, 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": "providerSeriesId",+ "columnName": "provider_series_id",+ "affinity": "TEXT"+ },+ {+ "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+ },+ {+ "fieldPath": "cacheState",+ "columnName": "cache_state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "detailHydratedAt",+ "columnName": "detail_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "remoteStaleAt",+ "columnName": "remote_stale_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "catalogOrigin",+ "columnName": "catalog_origin",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "episodePlaybackTemplateUrl",+ "columnName": "episode_playback_template_url",+ "affinity": "TEXT"+ }+ ],+ "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`)"+ },+ {+ "name": "index_series_provider_id_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id_name_id` ON `${TABLE_NAME}` (`provider_id`, `name`, `id`)"+ },+ {+ "name": "index_series_provider_id_category_id_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "category_id",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id_category_id_name_id` ON `${TABLE_NAME}` (`provider_id`, `category_id`, `name`, `id`)"+ },+ {+ "name": "index_series_provider_id_rating_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "rating",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id_rating_name_id` ON `${TABLE_NAME}` (`provider_id`, `rating`, `name`, `id`)"+ },+ {+ "name": "index_series_provider_id_last_modified_name_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "last_modified",+ "name",+ "id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_series_provider_id_last_modified_name_id` ON `${TABLE_NAME}` (`provider_id`, `last_modified`, `name`, `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, tokenize=unicode61 `remove_diacritics=1`, content=`series`)",+ "fields": [+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": []+ },+ "ftsVersion": "FTS4",+ "ftsOptions": {+ "tokenizer": "unicode61",+ "tokenizerArgs": [+ "remove_diacritics=1"+ ],+ "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_series_id_episode_id",+ "unique": true,+ "columnNames": [+ "provider_id",+ "series_id",+ "episode_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_episodes_provider_id_series_id_episode_id` ON `${TABLE_NAME}` (`provider_id`, `series_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, `provider_order` INTEGER NOT NULL DEFAULT 0, `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": "providerOrder",+ "columnName": "provider_order",+ "affinity": "INTEGER",+ "notNull": true,+ "defaultValue": "0"+ },+ {+ "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, `playback_metadata_json` TEXT, `sync_fingerprint` TEXT NOT NULL, `catch_up_type` TEXT, `catch_up_correction_seconds` INTEGER 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": "playbackMetadataJson",+ "columnName": "playback_metadata_json",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncFingerprint",+ "columnName": "sync_fingerprint",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "catchUpType",+ "columnName": "catch_up_type",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "catchUpCorrectionSeconds",+ "columnName": "catch_up_correction_seconds",+ "affinity": "INTEGER",+ "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, `playback_metadata_json` TEXT, `added_at` INTEGER 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+ },+ {+ "fieldPath": "playbackMetadataJson",+ "columnName": "playback_metadata_json",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "addedAt",+ "columnName": "added_at",+ "affinity": "INTEGER",+ "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, `provider_series_id` TEXT, `provider_series_key` TEXT 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`, `provider_series_key`), 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": "providerSeriesId",+ "columnName": "provider_series_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "providerSeriesKey",+ "columnName": "provider_series_key",+ "affinity": "TEXT",+ "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",+ "provider_series_key"+ ]+ },+ "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, `provider_order` INTEGER NOT NULL DEFAULT 0, `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": "providerOrder",+ "columnName": "provider_order",+ "affinity": "INTEGER",+ "notNull": true,+ "defaultValue": "0"+ },+ {+ "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_end_time_channel_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "end_time",+ "channel_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_programs_provider_id_end_time_channel_id` ON `${TABLE_NAME}` (`provider_id`, `end_time`, `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, `provider_id` INTEGER NOT NULL, `content_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `position` INTEGER NOT NULL, `group_id` INTEGER, `group_key` INTEGER NOT NULL, `added_at` INTEGER NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , 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": "providerId",+ "columnName": "provider_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": "groupKey",+ "columnName": "group_key",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "addedAt",+ "columnName": "added_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_favorites_provider_id_content_id_content_type_group_key",+ "unique": true,+ "columnNames": [+ "provider_id",+ "content_id",+ "content_type",+ "group_key"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_favorites_provider_id_content_id_content_type_group_key` ON `${TABLE_NAME}` (`provider_id`, `content_id`, `content_type`, `group_key`)"+ },+ {+ "name": "index_favorites_provider_id_content_type_group_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "group_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_favorites_provider_id_content_type_group_id` ON `${TABLE_NAME}` (`provider_id`, `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": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ },+ {+ "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, `provider_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `icon_emoji` TEXT, `position` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `content_type` 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": "providerId",+ "columnName": "provider_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_provider_id_content_type",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_virtual_groups_provider_id_content_type` ON `${TABLE_NAME}` (`provider_id`, `content_type`)"+ },+ {+ "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`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "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`)"+ },+ {+ "name": "index_playback_history_provider_id_content_type_content_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "content_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_history_provider_id_content_type_content_id` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `content_id`)"+ },+ {+ "name": "index_playback_history_provider_id_content_type_last_watched_at",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "last_watched_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_history_provider_id_content_type_last_watched_at` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `last_watched_at`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "tmdb_identity",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tmdb_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `canonical_provider_id` INTEGER NOT NULL, `first_seen_at` INTEGER NOT NULL, PRIMARY KEY(`tmdb_id`, `content_type`), FOREIGN KEY(`canonical_provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "tmdbId",+ "columnName": "tmdb_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "canonicalProviderId",+ "columnName": "canonical_provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "firstSeenAt",+ "columnName": "first_seen_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "tmdb_id",+ "content_type"+ ]+ },+ "indices": [+ {+ "name": "index_tmdb_identity_content_type",+ "unique": false,+ "columnNames": [+ "content_type"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_tmdb_identity_content_type` ON `${TABLE_NAME}` (`content_type`)"+ },+ {+ "name": "index_tmdb_identity_canonical_provider_id",+ "unique": false,+ "columnNames": [+ "canonical_provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_tmdb_identity_canonical_provider_id` ON `${TABLE_NAME}` (`canonical_provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "canonical_provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "search_history",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `query` TEXT NOT NULL, `content_scope` TEXT NOT NULL, `provider_id` INTEGER NOT NULL, `used_at` INTEGER NOT NULL, `use_count` INTEGER NOT NULL)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "query",+ "columnName": "query",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "contentScope",+ "columnName": "content_scope",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "usedAt",+ "columnName": "used_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "useCount",+ "columnName": "use_count",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_search_history_content_scope_provider_id_used_at",+ "unique": false,+ "columnNames": [+ "content_scope",+ "provider_id",+ "used_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_search_history_content_scope_provider_id_used_at` ON `${TABLE_NAME}` (`content_scope`, `provider_id`, `used_at`)"+ },+ {+ "name": "index_search_history_used_at",+ "unique": false,+ "columnNames": [+ "used_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_search_history_used_at` ON `${TABLE_NAME}` (`used_at`)"+ },+ {+ "name": "index_search_history_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_search_history_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_search_history_query_content_scope_provider_id",+ "unique": true,+ "columnNames": [+ "query",+ "content_scope",+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_history_query_content_scope_provider_id` ON `${TABLE_NAME}` (`query`, `content_scope`, `provider_id`)"+ }+ ]+ },+ {+ "tableName": "sync_metadata",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `last_live_sync` INTEGER NOT NULL, `last_live_success` INTEGER NOT NULL, `last_movie_sync` INTEGER NOT NULL, `last_series_sync` INTEGER NOT NULL, `last_series_success` INTEGER NOT NULL, `last_epg_sync` INTEGER NOT NULL, `last_epg_success` 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": "lastLiveSuccess",+ "columnName": "last_live_success",+ "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": "lastSeriesSuccess",+ "columnName": "last_series_success",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastEpgSync",+ "columnName": "last_epg_sync",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastEpgSuccess",+ "columnName": "last_epg_success",+ "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"+ ]+ }+ ]+ },+ {+ "tableName": "movie_category_hydration",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `last_hydrated_at` INTEGER NOT NULL, `item_count` INTEGER NOT NULL, `last_status` TEXT NOT NULL, `last_error` TEXT, `last_loaded_page` INTEGER NOT NULL, `last_attempted_page` INTEGER NOT NULL, `last_successful_page` INTEGER NOT NULL, `total_pages` INTEGER NOT NULL, `advertised_total_items` INTEGER, `advertised_total_pages` INTEGER, `is_complete` INTEGER NOT NULL, `page_size` INTEGER NOT NULL, `retry_after_ms` INTEGER NOT NULL, `failure_count` INTEGER NOT NULL, `retry_budget_remaining` INTEGER NOT NULL, `last_page_fingerprint` TEXT, PRIMARY KEY(`provider_id`, `category_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": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastHydratedAt",+ "columnName": "last_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "itemCount",+ "columnName": "item_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastStatus",+ "columnName": "last_status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastLoadedPage",+ "columnName": "last_loaded_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastAttemptedPage",+ "columnName": "last_attempted_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessfulPage",+ "columnName": "last_successful_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "totalPages",+ "columnName": "total_pages",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "advertisedTotalItems",+ "columnName": "advertised_total_items",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "advertisedTotalPages",+ "columnName": "advertised_total_pages",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "isComplete",+ "columnName": "is_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "pageSize",+ "columnName": "page_size",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryAfterMs",+ "columnName": "retry_after_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failureCount",+ "columnName": "failure_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryBudgetRemaining",+ "columnName": "retry_budget_remaining",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastPageFingerprint",+ "columnName": "last_page_fingerprint",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "category_id"+ ]+ },+ "indices": [+ {+ "name": "index_movie_category_hydration_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_movie_category_hydration_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "series_category_hydration",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `last_hydrated_at` INTEGER NOT NULL, `item_count` INTEGER NOT NULL, `last_status` TEXT NOT NULL, `last_error` TEXT, `last_loaded_page` INTEGER NOT NULL, `last_attempted_page` INTEGER NOT NULL, `last_successful_page` INTEGER NOT NULL, `total_pages` INTEGER NOT NULL, `advertised_total_items` INTEGER, `advertised_total_pages` INTEGER, `is_complete` INTEGER NOT NULL, `page_size` INTEGER NOT NULL, `retry_after_ms` INTEGER NOT NULL, `failure_count` INTEGER NOT NULL, `retry_budget_remaining` INTEGER NOT NULL, `last_page_fingerprint` TEXT, PRIMARY KEY(`provider_id`, `category_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": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastHydratedAt",+ "columnName": "last_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "itemCount",+ "columnName": "item_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastStatus",+ "columnName": "last_status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastLoadedPage",+ "columnName": "last_loaded_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastAttemptedPage",+ "columnName": "last_attempted_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessfulPage",+ "columnName": "last_successful_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "totalPages",+ "columnName": "total_pages",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "advertisedTotalItems",+ "columnName": "advertised_total_items",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "advertisedTotalPages",+ "columnName": "advertised_total_pages",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "isComplete",+ "columnName": "is_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "pageSize",+ "columnName": "page_size",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryAfterMs",+ "columnName": "retry_after_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failureCount",+ "columnName": "failure_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryBudgetRemaining",+ "columnName": "retry_budget_remaining",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastPageFingerprint",+ "columnName": "last_page_fingerprint",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "category_id"+ ]+ },+ "indices": [+ {+ "name": "index_series_category_hydration_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_series_category_hydration_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "vod_category_hydration",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `last_loaded_page` INTEGER NOT NULL, `last_attempted_page` INTEGER NOT NULL, `last_successful_page` INTEGER NOT NULL, `total_pages` INTEGER NOT NULL, `advertised_total_items` INTEGER, `advertised_total_pages` INTEGER, `page_size` INTEGER NOT NULL, `item_count` INTEGER NOT NULL, `is_complete` INTEGER NOT NULL, `has_movies` INTEGER NOT NULL, `has_series` INTEGER NOT NULL, `last_hydrated_at` INTEGER NOT NULL, `last_status` TEXT NOT NULL, `last_error` TEXT, `retry_after_ms` INTEGER NOT NULL, `failure_count` INTEGER NOT NULL, `retry_budget_remaining` INTEGER NOT NULL, `last_page_fingerprint` TEXT, PRIMARY KEY(`provider_id`, `category_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": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastLoadedPage",+ "columnName": "last_loaded_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastAttemptedPage",+ "columnName": "last_attempted_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessfulPage",+ "columnName": "last_successful_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "totalPages",+ "columnName": "total_pages",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "advertisedTotalItems",+ "columnName": "advertised_total_items",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "advertisedTotalPages",+ "columnName": "advertised_total_pages",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "pageSize",+ "columnName": "page_size",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "itemCount",+ "columnName": "item_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "isComplete",+ "columnName": "is_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "hasMovies",+ "columnName": "has_movies",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "hasSeries",+ "columnName": "has_series",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastHydratedAt",+ "columnName": "last_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastStatus",+ "columnName": "last_status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "retryAfterMs",+ "columnName": "retry_after_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failureCount",+ "columnName": "failure_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryBudgetRemaining",+ "columnName": "retry_budget_remaining",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastPageFingerprint",+ "columnName": "last_page_fingerprint",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "category_id"+ ]+ },+ "indices": [+ {+ "name": "index_vod_category_hydration_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_vod_category_hydration_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "vod_catalog_entries",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `raw_item_id` TEXT NOT NULL, `item_type` TEXT NOT NULL, `target_id` INTEGER NOT NULL, `raw_page` INTEGER NOT NULL, `raw_index` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `category_id`, `raw_item_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": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "rawItemId",+ "columnName": "raw_item_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "itemType",+ "columnName": "item_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "targetId",+ "columnName": "target_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "rawPage",+ "columnName": "raw_page",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "rawIndex",+ "columnName": "raw_index",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "category_id",+ "raw_item_id"+ ]+ },+ "indices": [+ {+ "name": "index_vod_catalog_entries_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_vod_catalog_entries_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_vod_catalog_entries_provider_id_category_id_raw_page_raw_index",+ "unique": false,+ "columnNames": [+ "provider_id",+ "category_id",+ "raw_page",+ "raw_index"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_vod_catalog_entries_provider_id_category_id_raw_page_raw_index` ON `${TABLE_NAME}` (`provider_id`, `category_id`, `raw_page`, `raw_index`)"+ },+ {+ "name": "index_vod_catalog_entries_provider_id_item_type_target_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "item_type",+ "target_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_vod_catalog_entries_provider_id_item_type_target_id` ON `${TABLE_NAME}` (`provider_id`, `item_type`, `target_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "epg_sources",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `url` TEXT NOT NULL, `enabled` INTEGER NOT NULL, `last_refresh_at` INTEGER NOT NULL, `last_success_at` INTEGER NOT NULL, `last_error` TEXT, `priority` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, `etag` TEXT, `last_modified_header` TEXT, `timezone_policy` TEXT NOT NULL, `timezone_id` TEXT)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "url",+ "columnName": "url",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastRefreshAt",+ "columnName": "last_refresh_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessAt",+ "columnName": "last_success_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "etag",+ "columnName": "etag",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastModifiedHeader",+ "columnName": "last_modified_header",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "timezonePolicy",+ "columnName": "timezone_policy",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "timezoneId",+ "columnName": "timezone_id",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_epg_sources_url",+ "unique": true,+ "columnNames": [+ "url"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_epg_sources_url` ON `${TABLE_NAME}` (`url`)"+ }+ ]+ },+ {+ "tableName": "provider_epg_sources",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `provider_id` INTEGER NOT NULL, `epg_source_id` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`epg_source_id`) REFERENCES `epg_sources`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "epgSourceId",+ "columnName": "epg_source_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_provider_epg_sources_provider_id_epg_source_id",+ "unique": true,+ "columnNames": [+ "provider_id",+ "epg_source_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_provider_epg_sources_provider_id_epg_source_id` ON `${TABLE_NAME}` (`provider_id`, `epg_source_id`)"+ },+ {+ "name": "index_provider_epg_sources_epg_source_id",+ "unique": false,+ "columnNames": [+ "epg_source_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_epg_sources_epg_source_id` ON `${TABLE_NAME}` (`epg_source_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ },+ {+ "table": "epg_sources",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "epg_source_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "epg_channels",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `epg_source_id` INTEGER NOT NULL, `xmltv_channel_id` TEXT NOT NULL, `display_name` TEXT NOT NULL, `normalized_name` TEXT NOT NULL, `icon_url` TEXT, FOREIGN KEY(`epg_source_id`) REFERENCES `epg_sources`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "epgSourceId",+ "columnName": "epg_source_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "xmltvChannelId",+ "columnName": "xmltv_channel_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "displayName",+ "columnName": "display_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "normalizedName",+ "columnName": "normalized_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "iconUrl",+ "columnName": "icon_url",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_epg_channels_epg_source_id_xmltv_channel_id",+ "unique": true,+ "columnNames": [+ "epg_source_id",+ "xmltv_channel_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_epg_channels_epg_source_id_xmltv_channel_id` ON `${TABLE_NAME}` (`epg_source_id`, `xmltv_channel_id`)"+ },+ {+ "name": "index_epg_channels_epg_source_id",+ "unique": false,+ "columnNames": [+ "epg_source_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_epg_channels_epg_source_id` ON `${TABLE_NAME}` (`epg_source_id`)"+ },+ {+ "name": "index_epg_channels_normalized_name",+ "unique": false,+ "columnNames": [+ "normalized_name"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_epg_channels_normalized_name` ON `${TABLE_NAME}` (`normalized_name`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "epg_sources",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "epg_source_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "epg_programmes",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `epg_source_id` INTEGER NOT NULL, `xmltv_channel_id` TEXT NOT NULL, `start_time` INTEGER NOT NULL, `end_time` INTEGER NOT NULL, `title` TEXT NOT NULL, `subtitle` TEXT, `description` TEXT NOT NULL, `category` TEXT, `lang` TEXT NOT NULL, `rating` TEXT, `image_url` TEXT, `episode_info` TEXT, FOREIGN KEY(`epg_source_id`) REFERENCES `epg_sources`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "epgSourceId",+ "columnName": "epg_source_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "xmltvChannelId",+ "columnName": "xmltv_channel_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "startTime",+ "columnName": "start_time",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "endTime",+ "columnName": "end_time",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "title",+ "columnName": "title",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "subtitle",+ "columnName": "subtitle",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "description",+ "columnName": "description",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "category",+ "columnName": "category",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lang",+ "columnName": "lang",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "rating",+ "columnName": "rating",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "imageUrl",+ "columnName": "image_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "episodeInfo",+ "columnName": "episode_info",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_epg_programmes_epg_source_id_xmltv_channel_id_start_time",+ "unique": false,+ "columnNames": [+ "epg_source_id",+ "xmltv_channel_id",+ "start_time"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_epg_programmes_epg_source_id_xmltv_channel_id_start_time` ON `${TABLE_NAME}` (`epg_source_id`, `xmltv_channel_id`, `start_time`)"+ },+ {+ "name": "index_epg_programmes_epg_source_id_xmltv_channel_id_start_time_end_time",+ "unique": true,+ "columnNames": [+ "epg_source_id",+ "xmltv_channel_id",+ "start_time",+ "end_time"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_epg_programmes_epg_source_id_xmltv_channel_id_start_time_end_time` ON `${TABLE_NAME}` (`epg_source_id`, `xmltv_channel_id`, `start_time`, `end_time`)"+ },+ {+ "name": "index_epg_programmes_epg_source_id",+ "unique": false,+ "columnNames": [+ "epg_source_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_epg_programmes_epg_source_id` ON `${TABLE_NAME}` (`epg_source_id`)"+ },+ {+ "name": "index_epg_programmes_start_time",+ "unique": false,+ "columnNames": [+ "start_time"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_epg_programmes_start_time` ON `${TABLE_NAME}` (`start_time`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "epg_sources",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "epg_source_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "channel_epg_mappings",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `provider_channel_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `source_type` TEXT NOT NULL, `epg_source_id` INTEGER, `xmltv_channel_id` TEXT, `match_type` TEXT, `confidence` REAL NOT NULL, `matched_at` INTEGER NOT NULL, `failed_attempts` INTEGER NOT NULL, `source` TEXT, `is_manual_override` INTEGER NOT NULL, `updated_at` INTEGER 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": "providerChannelId",+ "columnName": "provider_channel_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "sourceType",+ "columnName": "source_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "epgSourceId",+ "columnName": "epg_source_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "xmltvChannelId",+ "columnName": "xmltv_channel_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "matchType",+ "columnName": "match_type",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "confidence",+ "columnName": "confidence",+ "affinity": "REAL",+ "notNull": true+ },+ {+ "fieldPath": "matchedAt",+ "columnName": "matched_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failedAttempts",+ "columnName": "failed_attempts",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "source",+ "columnName": "source",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "isManualOverride",+ "columnName": "is_manual_override",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_channel_epg_mappings_provider_id_provider_channel_id",+ "unique": true,+ "columnNames": [+ "provider_id",+ "provider_channel_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_channel_epg_mappings_provider_id_provider_channel_id` ON `${TABLE_NAME}` (`provider_id`, `provider_channel_id`)"+ },+ {+ "name": "index_channel_epg_mappings_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_channel_epg_mappings_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "combined_m3u_profiles",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT NOT NULL, `enabled` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ }+ },+ {+ "tableName": "combined_m3u_profile_members",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `profile_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `enabled` INTEGER NOT NULL, FOREIGN KEY(`profile_id`) REFERENCES `combined_m3u_profiles`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "profileId",+ "columnName": "profile_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_combined_m3u_profile_members_profile_id",+ "unique": false,+ "columnNames": [+ "profile_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_combined_m3u_profile_members_profile_id` ON `${TABLE_NAME}` (`profile_id`)"+ },+ {+ "name": "index_combined_m3u_profile_members_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_combined_m3u_profile_members_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_combined_m3u_profile_members_profile_id_provider_id",+ "unique": true,+ "columnNames": [+ "profile_id",+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_combined_m3u_profile_members_profile_id_provider_id` ON `${TABLE_NAME}` (`profile_id`, `provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "combined_m3u_profiles",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "profile_id"+ ],+ "referencedColumns": [+ "id"+ ]+ },+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "recording_schedules",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `provider_id` INTEGER NOT NULL, `channel_id` INTEGER NOT NULL, `channel_name` TEXT NOT NULL, `stream_url` TEXT NOT NULL, `program_title` TEXT, `requested_start_ms` INTEGER NOT NULL, `requested_end_ms` INTEGER NOT NULL, `recurrence` TEXT NOT NULL, `recurring_rule_id` TEXT, `enabled` INTEGER NOT NULL, `is_manual` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER 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": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "channelId",+ "columnName": "channel_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "channelName",+ "columnName": "channel_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "streamUrl",+ "columnName": "stream_url",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "programTitle",+ "columnName": "program_title",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "requestedStartMs",+ "columnName": "requested_start_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "requestedEndMs",+ "columnName": "requested_end_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "recurrence",+ "columnName": "recurrence",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "recurringRuleId",+ "columnName": "recurring_rule_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "isManual",+ "columnName": "is_manual",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_recording_schedules_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_schedules_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_recording_schedules_enabled_requested_start_ms",+ "unique": false,+ "columnNames": [+ "enabled",+ "requested_start_ms"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_schedules_enabled_requested_start_ms` ON `${TABLE_NAME}` (`enabled`, `requested_start_ms`)"+ },+ {+ "name": "index_recording_schedules_recurring_rule_id",+ "unique": false,+ "columnNames": [+ "recurring_rule_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_schedules_recurring_rule_id` ON `${TABLE_NAME}` (`recurring_rule_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "recording_runs",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `schedule_id` INTEGER NOT NULL, `provider_id` INTEGER NOT NULL, `channel_id` INTEGER NOT NULL, `channel_name` TEXT NOT NULL, `stream_url` TEXT NOT NULL, `program_title` TEXT, `scheduled_start_ms` INTEGER NOT NULL, `scheduled_end_ms` INTEGER NOT NULL, `recurrence` TEXT NOT NULL, `recurring_rule_id` TEXT, `status` TEXT NOT NULL, `source_type` TEXT NOT NULL, `resolved_url` TEXT, `headers_json` TEXT NOT NULL, `user_agent` TEXT, `network_profile_json` TEXT NOT NULL DEFAULT '{}', `expiration_time` INTEGER, `provider_label` TEXT, `output_uri` TEXT, `output_display_path` TEXT, `output_credentials_encrypted` TEXT, `bytes_written` INTEGER NOT NULL, `average_throughput_bps` INTEGER NOT NULL, `retry_count` INTEGER NOT NULL, `last_progress_at_ms` INTEGER, `failure_category` TEXT NOT NULL, `failure_reason` TEXT, `terminal_at_ms` INTEGER, `started_at_ms` INTEGER, `ended_at_ms` INTEGER, `schedule_enabled` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `alarm_start_at_ms` INTEGER, `alarm_stop_at_ms` INTEGER, `exact_alarm_armed` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`id`), FOREIGN KEY(`schedule_id`) REFERENCES `recording_schedules`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "scheduleId",+ "columnName": "schedule_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "channelId",+ "columnName": "channel_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "channelName",+ "columnName": "channel_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "streamUrl",+ "columnName": "stream_url",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "programTitle",+ "columnName": "program_title",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "scheduledStartMs",+ "columnName": "scheduled_start_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "scheduledEndMs",+ "columnName": "scheduled_end_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "recurrence",+ "columnName": "recurrence",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "recurringRuleId",+ "columnName": "recurring_rule_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "status",+ "columnName": "status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "sourceType",+ "columnName": "source_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "resolvedUrl",+ "columnName": "resolved_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "headersJson",+ "columnName": "headers_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "userAgent",+ "columnName": "user_agent",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "networkProfileJson",+ "columnName": "network_profile_json",+ "affinity": "TEXT",+ "notNull": true,+ "defaultValue": "'{}'"+ },+ {+ "fieldPath": "expirationTime",+ "columnName": "expiration_time",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "providerLabel",+ "columnName": "provider_label",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputUri",+ "columnName": "output_uri",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputDisplayPath",+ "columnName": "output_display_path",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputCredentialsEncrypted",+ "columnName": "output_credentials_encrypted",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "bytesWritten",+ "columnName": "bytes_written",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "averageThroughputBytesPerSecond",+ "columnName": "average_throughput_bps",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryCount",+ "columnName": "retry_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastProgressAtMs",+ "columnName": "last_progress_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "failureCategory",+ "columnName": "failure_category",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "failureReason",+ "columnName": "failure_reason",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "terminalAtMs",+ "columnName": "terminal_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "startedAtMs",+ "columnName": "started_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "endedAtMs",+ "columnName": "ended_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "scheduleEnabled",+ "columnName": "schedule_enabled",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "alarmStartAtMs",+ "columnName": "alarm_start_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "alarmStopAtMs",+ "columnName": "alarm_stop_at_ms",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "exactAlarmArmed",+ "columnName": "exact_alarm_armed",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_recording_runs_schedule_id",+ "unique": false,+ "columnNames": [+ "schedule_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_runs_schedule_id` ON `${TABLE_NAME}` (`schedule_id`)"+ },+ {+ "name": "index_recording_runs_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_runs_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_recording_runs_status_scheduled_start_ms",+ "unique": false,+ "columnNames": [+ "status",+ "scheduled_start_ms"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_runs_status_scheduled_start_ms` ON `${TABLE_NAME}` (`status`, `scheduled_start_ms`)"+ },+ {+ "name": "index_recording_runs_alarm_start_at_ms",+ "unique": false,+ "columnNames": [+ "alarm_start_at_ms"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_runs_alarm_start_at_ms` ON `${TABLE_NAME}` (`alarm_start_at_ms`)"+ },+ {+ "name": "index_recording_runs_alarm_stop_at_ms",+ "unique": false,+ "columnNames": [+ "alarm_stop_at_ms"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_recording_runs_alarm_stop_at_ms` ON `${TABLE_NAME}` (`alarm_stop_at_ms`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "recording_schedules",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "schedule_id"+ ],+ "referencedColumns": [+ "id"+ ]+ },+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "program_reminders",+ "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, `channel_name` TEXT NOT NULL, `program_title` TEXT NOT NULL, `program_start_time` INTEGER NOT NULL, `remind_at` INTEGER NOT NULL, `lead_time_minutes` INTEGER NOT NULL, `is_dismissed` INTEGER NOT NULL, `notified_at` INTEGER, `exact_alarm_armed` INTEGER NOT NULL, `delivery_state` TEXT NOT NULL, `delivery_attempt_token` TEXT, `delivery_attempted_at` INTEGER, `delivery_attempt_count` INTEGER NOT NULL, `delivery_failure_reason` TEXT, `created_at` INTEGER 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": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "channelId",+ "columnName": "channel_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "channelName",+ "columnName": "channel_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "programTitle",+ "columnName": "program_title",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "programStartTime",+ "columnName": "program_start_time",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "remindAt",+ "columnName": "remind_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "leadTimeMinutes",+ "columnName": "lead_time_minutes",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "isDismissed",+ "columnName": "is_dismissed",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "notifiedAt",+ "columnName": "notified_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "exactAlarmArmed",+ "columnName": "exact_alarm_armed",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "deliveryState",+ "columnName": "delivery_state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "deliveryAttemptToken",+ "columnName": "delivery_attempt_token",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "deliveryAttemptedAt",+ "columnName": "delivery_attempted_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "deliveryAttemptCount",+ "columnName": "delivery_attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "deliveryFailureReason",+ "columnName": "delivery_failure_reason",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_program_reminders_provider_id_remind_at",+ "unique": false,+ "columnNames": [+ "provider_id",+ "remind_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_program_reminders_provider_id_remind_at` ON `${TABLE_NAME}` (`provider_id`, `remind_at`)"+ },+ {+ "name": "index_program_reminders_is_dismissed_notified_at_remind_at",+ "unique": false,+ "columnNames": [+ "is_dismissed",+ "notified_at",+ "remind_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_program_reminders_is_dismissed_notified_at_remind_at` ON `${TABLE_NAME}` (`is_dismissed`, `notified_at`, `remind_at`)"+ },+ {+ "name": "index_program_reminders_provider_id_channel_id_program_start_time",+ "unique": false,+ "columnNames": [+ "provider_id",+ "channel_id",+ "program_start_time"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_program_reminders_provider_id_channel_id_program_start_time` ON `${TABLE_NAME}` (`provider_id`, `channel_id`, `program_start_time`)"+ },+ {+ "name": "index_program_reminders_provider_id_channel_id_program_title_program_start_time",+ "unique": true,+ "columnNames": [+ "provider_id",+ "channel_id",+ "program_title",+ "program_start_time"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_program_reminders_provider_id_channel_id_program_title_program_start_time` ON `${TABLE_NAME}` (`provider_id`, `channel_id`, `program_title`, `program_start_time`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "recording_storage",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tree_uri` TEXT, `smb_url` TEXT, `smb_credentials_encrypted` TEXT, `display_name` TEXT, `output_directory` TEXT, `available_bytes` INTEGER, `is_writable` INTEGER NOT NULL, `file_name_pattern` TEXT NOT NULL, `retention_days` INTEGER, `max_simultaneous_recordings` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`id`))",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "treeUri",+ "columnName": "tree_uri",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "smbUrl",+ "columnName": "smb_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "smbCredentialsEncrypted",+ "columnName": "smb_credentials_encrypted",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "displayName",+ "columnName": "display_name",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputDirectory",+ "columnName": "output_directory",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "availableBytes",+ "columnName": "available_bytes",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "isWritable",+ "columnName": "is_writable",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "fileNamePattern",+ "columnName": "file_name_pattern",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "retentionDays",+ "columnName": "retention_days",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "maxSimultaneousRecordings",+ "columnName": "max_simultaneous_recordings",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "id"+ ]+ }+ },+ {+ "tableName": "playback_compatibility_records",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `device_fingerprint` TEXT NOT NULL, `device_model` TEXT NOT NULL, `android_sdk` INTEGER NOT NULL, `stream_type` TEXT NOT NULL, `video_mime_type` TEXT NOT NULL, `resolution_bucket` TEXT NOT NULL, `decoder_name` TEXT NOT NULL, `surface_type` TEXT NOT NULL, `failure_type` TEXT NOT NULL, `last_failed_at` INTEGER NOT NULL, `last_succeeded_at` INTEGER NOT NULL, `failure_count` INTEGER NOT NULL, `success_count` INTEGER NOT NULL)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "deviceFingerprint",+ "columnName": "device_fingerprint",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "deviceModel",+ "columnName": "device_model",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "androidSdk",+ "columnName": "android_sdk",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "streamType",+ "columnName": "stream_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "videoMimeType",+ "columnName": "video_mime_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "resolutionBucket",+ "columnName": "resolution_bucket",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "decoderName",+ "columnName": "decoder_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "surfaceType",+ "columnName": "surface_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "failureType",+ "columnName": "failure_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "lastFailedAt",+ "columnName": "last_failed_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSucceededAt",+ "columnName": "last_succeeded_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failureCount",+ "columnName": "failure_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "successCount",+ "columnName": "success_count",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_playback_compatibility_records_device_fingerprint_stream_type_video_mime_type_resolution_bucket_decoder_name_surface_type",+ "unique": true,+ "columnNames": [+ "device_fingerprint",+ "stream_type",+ "video_mime_type",+ "resolution_bucket",+ "decoder_name",+ "surface_type"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_playback_compatibility_records_device_fingerprint_stream_type_video_mime_type_resolution_bucket_decoder_name_surface_type` ON `${TABLE_NAME}` (`device_fingerprint`, `stream_type`, `video_mime_type`, `resolution_bucket`, `decoder_name`, `surface_type`)"+ },+ {+ "name": "index_playback_compatibility_records_device_fingerprint_stream_type_video_mime_type_resolution_bucket",+ "unique": false,+ "columnNames": [+ "device_fingerprint",+ "stream_type",+ "video_mime_type",+ "resolution_bucket"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_compatibility_records_device_fingerprint_stream_type_video_mime_type_resolution_bucket` ON `${TABLE_NAME}` (`device_fingerprint`, `stream_type`, `video_mime_type`, `resolution_bucket`)"+ },+ {+ "name": "index_playback_compatibility_records_last_failed_at",+ "unique": false,+ "columnNames": [+ "last_failed_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_compatibility_records_last_failed_at` ON `${TABLE_NAME}` (`last_failed_at`)"+ },+ {+ "name": "index_playback_compatibility_records_last_succeeded_at",+ "unique": false,+ "columnNames": [+ "last_succeeded_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playback_compatibility_records_last_succeeded_at` ON `${TABLE_NAME}` (`last_succeeded_at`)"+ }+ ]+ },+ {+ "tableName": "xtream_content_index",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `remote_id` TEXT NOT NULL, `local_content_id` INTEGER, `name` TEXT NOT NULL, `category_id` INTEGER, `category_name` TEXT, `image_url` TEXT, `container_extension` TEXT, `rating` REAL NOT NULL, `added_at` INTEGER NOT NULL, `remote_updated_at` INTEGER NOT NULL, `is_adult` INTEGER NOT NULL, `indexed_at` INTEGER NOT NULL, `detail_hydrated_at` INTEGER NOT NULL, `stale_state` TEXT NOT NULL, `error_state` TEXT, `sync_fingerprint` TEXT NOT NULL, PRIMARY KEY(`provider_id`, `content_type`, `remote_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": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "remoteId",+ "columnName": "remote_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "localContentId",+ "columnName": "local_content_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "categoryName",+ "columnName": "category_name",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "imageUrl",+ "columnName": "image_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "containerExtension",+ "columnName": "container_extension",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "rating",+ "columnName": "rating",+ "affinity": "REAL",+ "notNull": true+ },+ {+ "fieldPath": "addedAt",+ "columnName": "added_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "remoteUpdatedAt",+ "columnName": "remote_updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "isAdult",+ "columnName": "is_adult",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "indexedAt",+ "columnName": "indexed_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "detailHydratedAt",+ "columnName": "detail_hydrated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "staleState",+ "columnName": "stale_state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "errorState",+ "columnName": "error_state",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncFingerprint",+ "columnName": "sync_fingerprint",+ "affinity": "TEXT",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "remote_id"+ ]+ },+ "indices": [+ {+ "name": "index_xtream_content_index_provider_id_content_type",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_provider_id_content_type` ON `${TABLE_NAME}` (`provider_id`, `content_type`)"+ },+ {+ "name": "index_xtream_content_index_provider_id_content_type_category_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "category_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_provider_id_content_type_category_id` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `category_id`)"+ },+ {+ "name": "index_xtream_content_index_provider_id_content_type_name",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "name"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_provider_id_content_type_name` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `name`)"+ },+ {+ "name": "index_xtream_content_index_provider_id_content_type_local_content_id",+ "unique": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "local_content_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_provider_id_content_type_local_content_id` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `local_content_id`)"+ },+ {+ "name": "index_xtream_content_index_provider_id_indexed_at",+ "unique": false,+ "columnNames": [+ "provider_id",+ "indexed_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_provider_id_indexed_at` ON `${TABLE_NAME}` (`provider_id`, `indexed_at`)"+ },+ {+ "name": "index_xtream_content_index_stale_state",+ "unique": false,+ "columnNames": [+ "stale_state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_content_index_stale_state` ON `${TABLE_NAME}` (`stale_state`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "xtream_index_jobs",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `section` TEXT NOT NULL, `state` TEXT NOT NULL, `total_categories` INTEGER NOT NULL, `completed_categories` INTEGER NOT NULL, `next_category_index` INTEGER NOT NULL, `failed_categories` INTEGER NOT NULL, `indexed_rows` INTEGER NOT NULL, `skipped_malformed_rows` INTEGER NOT NULL, `deleted_pruned_rows` INTEGER NOT NULL, `priority_category_id` INTEGER, `priority_requested_at` INTEGER NOT NULL, `last_error` TEXT, `last_attempt_at` INTEGER NOT NULL, `last_success_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `section`), 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": "section",+ "columnName": "section",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "totalCategories",+ "columnName": "total_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedCategories",+ "columnName": "completed_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "nextCategoryIndex",+ "columnName": "next_category_index",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failedCategories",+ "columnName": "failed_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "indexedRows",+ "columnName": "indexed_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "skippedMalformedRows",+ "columnName": "skipped_malformed_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "deletedPrunedRows",+ "columnName": "deleted_pruned_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "priorityCategoryId",+ "columnName": "priority_category_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "priorityRequestedAt",+ "columnName": "priority_requested_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastAttemptAt",+ "columnName": "last_attempt_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessAt",+ "columnName": "last_success_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "section"+ ]+ },+ "indices": [+ {+ "name": "index_xtream_index_jobs_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_index_jobs_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_xtream_index_jobs_section",+ "unique": false,+ "columnNames": [+ "section"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_index_jobs_section` ON `${TABLE_NAME}` (`section`)"+ },+ {+ "name": "index_xtream_index_jobs_state",+ "unique": false,+ "columnNames": [+ "state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_index_jobs_state` ON `${TABLE_NAME}` (`state`)"+ },+ {+ "name": "index_xtream_index_jobs_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_index_jobs_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "xtream_live_onboarding_state",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `provider_type` TEXT NOT NULL, `content_type` TEXT NOT NULL, `phase` TEXT NOT NULL, `staged_session_id` INTEGER, `import_strategy` TEXT, `next_category_index` INTEGER NOT NULL, `accepted_row_count` INTEGER NOT NULL, `staged_flush_count` INTEGER NOT NULL, `sealed_session_id` INTEGER, `sealed_row_count` INTEGER NOT NULL DEFAULT 0, `sealed_configuration_generation` INTEGER, `sealed_mapping_profile` TEXT, `sync_profile_tier` TEXT, `sync_profile_batch_size` INTEGER NOT NULL, `sync_profile_strategy` TEXT, `sync_profile_low_memory` INTEGER NOT NULL, `sync_profile_memory_class_mb` INTEGER NOT NULL, `sync_profile_available_mem_mb` INTEGER NOT NULL, `last_error` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, `completed_at` INTEGER, 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": "providerType",+ "columnName": "provider_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "phase",+ "columnName": "phase",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "stagedSessionId",+ "columnName": "staged_session_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "importStrategy",+ "columnName": "import_strategy",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "nextCategoryIndex",+ "columnName": "next_category_index",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "acceptedRowCount",+ "columnName": "accepted_row_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "stagedFlushCount",+ "columnName": "staged_flush_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "sealedSessionId",+ "columnName": "sealed_session_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "sealedRowCount",+ "columnName": "sealed_row_count",+ "affinity": "INTEGER",+ "notNull": true,+ "defaultValue": "0"+ },+ {+ "fieldPath": "sealedConfigurationGeneration",+ "columnName": "sealed_configuration_generation",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "sealedMappingProfile",+ "columnName": "sealed_mapping_profile",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncProfileTier",+ "columnName": "sync_profile_tier",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncProfileBatchSize",+ "columnName": "sync_profile_batch_size",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "syncProfileStrategy",+ "columnName": "sync_profile_strategy",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "syncProfileLowMemory",+ "columnName": "sync_profile_low_memory",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "syncProfileMemoryClassMb",+ "columnName": "sync_profile_memory_class_mb",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "syncProfileAvailableMemMb",+ "columnName": "sync_profile_available_mem_mb",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedAt",+ "columnName": "completed_at",+ "affinity": "INTEGER"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id"+ ]+ },+ "indices": [+ {+ "name": "index_xtream_live_onboarding_state_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_live_onboarding_state_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_xtream_live_onboarding_state_phase",+ "unique": false,+ "columnNames": [+ "phase"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_live_onboarding_state_phase` ON `${TABLE_NAME}` (`phase`)"+ },+ {+ "name": "index_xtream_live_onboarding_state_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_live_onboarding_state_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ },+ {+ "name": "index_xtream_live_onboarding_state_staged_session_id",+ "unique": false,+ "columnNames": [+ "staged_session_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_xtream_live_onboarding_state_staged_session_id` ON `${TABLE_NAME}` (`staged_session_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stalker_index_jobs",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `section` TEXT NOT NULL, `state` TEXT NOT NULL, `total_categories` INTEGER NOT NULL, `completed_categories` INTEGER NOT NULL, `next_category_index` INTEGER NOT NULL, `failed_categories` INTEGER NOT NULL, `indexed_rows` INTEGER NOT NULL, `skipped_malformed_rows` INTEGER NOT NULL, `deleted_pruned_rows` INTEGER NOT NULL, `last_error` TEXT, `last_attempt_at` INTEGER NOT NULL, `last_success_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `section`), 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": "section",+ "columnName": "section",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "totalCategories",+ "columnName": "total_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedCategories",+ "columnName": "completed_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "nextCategoryIndex",+ "columnName": "next_category_index",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failedCategories",+ "columnName": "failed_categories",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "indexedRows",+ "columnName": "indexed_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "skippedMalformedRows",+ "columnName": "skipped_malformed_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "deletedPrunedRows",+ "columnName": "deleted_pruned_rows",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastAttemptAt",+ "columnName": "last_attempt_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastSuccessAt",+ "columnName": "last_success_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "section"+ ]+ },+ "indices": [+ {+ "name": "index_stalker_index_jobs_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_index_jobs_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_stalker_index_jobs_state",+ "unique": false,+ "columnNames": [+ "state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_index_jobs_state` ON `${TABLE_NAME}` (`state`)"+ },+ {+ "name": "index_stalker_index_jobs_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_index_jobs_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stalker_live_category_retries",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `category_id` INTEGER NOT NULL, `category_name` TEXT NOT NULL, `configuration_generation` INTEGER NOT NULL, `attempt_count` INTEGER NOT NULL, `last_attempt_at` INTEGER NOT NULL, `last_error` TEXT, PRIMARY KEY(`provider_id`, `category_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": "categoryId",+ "columnName": "category_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "categoryName",+ "columnName": "category_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "configurationGeneration",+ "columnName": "configuration_generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "attemptCount",+ "columnName": "attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastAttemptAt",+ "columnName": "last_attempt_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "category_id"+ ]+ },+ "indices": [+ {+ "name": "index_stalker_live_category_retries_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_live_category_retries_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stalker_portal_state",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `working_endpoint` TEXT, `bootstrap_recipe` TEXT, `bulk_live_supported` INTEGER, `bulk_live_category_fidelity` INTEGER, `movie_wildcard_supported` INTEGER, `series_wildcard_supported` INTEGER, `epg_supported` INTEGER, `safe_metadata_concurrency` INTEGER NOT NULL, `stress_cooldown_until` INTEGER NOT NULL, `endpoint_health_json` TEXT NOT NULL, `endpoint_failed_until` INTEGER NOT NULL, `validated_at` INTEGER NOT NULL, `schema_version` INTEGER NOT NULL, `configuration_generation` INTEGER NOT NULL, `learning_json` TEXT NOT NULL, `observation_source` TEXT NOT NULL, `observed_at` 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": "workingEndpoint",+ "columnName": "working_endpoint",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "bootstrapRecipe",+ "columnName": "bootstrap_recipe",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "bulkLiveSupported",+ "columnName": "bulk_live_supported",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "bulkLiveCategoryFidelity",+ "columnName": "bulk_live_category_fidelity",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "movieWildcardSupported",+ "columnName": "movie_wildcard_supported",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "seriesWildcardSupported",+ "columnName": "series_wildcard_supported",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "epgSupported",+ "columnName": "epg_supported",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "safeMetadataConcurrency",+ "columnName": "safe_metadata_concurrency",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "stressCooldownUntil",+ "columnName": "stress_cooldown_until",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "endpointHealthJson",+ "columnName": "endpoint_health_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "endpointFailedUntil",+ "columnName": "endpoint_failed_until",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "validatedAt",+ "columnName": "validated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "schemaVersion",+ "columnName": "schema_version",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "configurationGeneration",+ "columnName": "configuration_generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "learningJson",+ "columnName": "learning_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "observationSource",+ "columnName": "observation_source",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "observedAt",+ "columnName": "observed_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id"+ ]+ },+ "indices": [+ {+ "name": "index_stalker_portal_state_provider_id",+ "unique": true,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_stalker_portal_state_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stalker_remote_identities",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `raw_id` TEXT NOT NULL, `surrogate_id` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `content_type`, `raw_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": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "rawId",+ "columnName": "raw_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "surrogateId",+ "columnName": "surrogate_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "content_type",+ "raw_id"+ ]+ },+ "indices": [+ {+ "name": "index_stalker_remote_identities_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_remote_identities_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_stalker_remote_identities_provider_id_content_type_surrogate_id",+ "unique": true,+ "columnNames": [+ "provider_id",+ "content_type",+ "surrogate_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_stalker_remote_identities_provider_id_content_type_surrogate_id` ON `${TABLE_NAME}` (`provider_id`, `content_type`, `surrogate_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stalker_discovery_staging",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`discovery_id` TEXT NOT NULL, `provider_id` INTEGER, `configuration_generation` INTEGER NOT NULL, `sanitized_summary` TEXT NOT NULL, `categories_json` TEXT NOT NULL, `channels_json` TEXT NOT NULL, `created_at` INTEGER NOT NULL, PRIMARY KEY(`discovery_id`))",+ "fields": [+ {+ "fieldPath": "discoveryId",+ "columnName": "discovery_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "configurationGeneration",+ "columnName": "configuration_generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "sanitizedSummary",+ "columnName": "sanitized_summary",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "categoriesJson",+ "columnName": "categories_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "channelsJson",+ "columnName": "channels_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "discovery_id"+ ]+ },+ "indices": [+ {+ "name": "index_stalker_discovery_staging_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_discovery_staging_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_stalker_discovery_staging_created_at",+ "unique": false,+ "columnNames": [+ "created_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_stalker_discovery_staging_created_at` ON `${TABLE_NAME}` (`created_at`)"+ }+ ]+ },+ {+ "tableName": "downloads",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `provider_id` INTEGER NOT NULL, `content_type` TEXT NOT NULL, `content_id` INTEGER NOT NULL, `content_name` TEXT NOT NULL, `stream_url` TEXT NOT NULL, `source_type` TEXT NOT NULL DEFAULT 'PROVIDER', `request_headers_json` TEXT NOT NULL DEFAULT '{}', `source_stream_url` TEXT, `source_stream_id` INTEGER, `container_extension` TEXT, `poster_url` TEXT, `output_uri` TEXT, `output_display_path` TEXT, `status` TEXT NOT NULL, `bytes_written` INTEGER NOT NULL, `total_bytes` INTEGER, `supports_resume` INTEGER NOT NULL, `retry_count` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `completed_at` INTEGER, `failure_reason` TEXT, `owner_id` TEXT, `owner_epoch` INTEGER NOT NULL, `heartbeat_at` INTEGER, `series_id` INTEGER, `season_number` INTEGER, `episode_number` INTEGER, PRIMARY KEY(`id`))",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "contentId",+ "columnName": "content_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "contentName",+ "columnName": "content_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "streamUrl",+ "columnName": "stream_url",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "sourceType",+ "columnName": "source_type",+ "affinity": "TEXT",+ "notNull": true,+ "defaultValue": "'PROVIDER'"+ },+ {+ "fieldPath": "requestHeadersJson",+ "columnName": "request_headers_json",+ "affinity": "TEXT",+ "notNull": true,+ "defaultValue": "'{}'"+ },+ {+ "fieldPath": "sourceStreamUrl",+ "columnName": "source_stream_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "sourceStreamId",+ "columnName": "source_stream_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "containerExtension",+ "columnName": "container_extension",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "posterUrl",+ "columnName": "poster_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputUri",+ "columnName": "output_uri",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "outputDisplayPath",+ "columnName": "output_display_path",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "status",+ "columnName": "status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "bytesWritten",+ "columnName": "bytes_written",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "totalBytes",+ "columnName": "total_bytes",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "supportsResume",+ "columnName": "supports_resume",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "retryCount",+ "columnName": "retry_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedAt",+ "columnName": "completed_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "failureReason",+ "columnName": "failure_reason",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "ownerId",+ "columnName": "owner_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "ownerEpoch",+ "columnName": "owner_epoch",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "heartbeatAt",+ "columnName": "heartbeat_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "seriesId",+ "columnName": "series_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "seasonNumber",+ "columnName": "season_number",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "episodeNumber",+ "columnName": "episode_number",+ "affinity": "INTEGER"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_downloads_status",+ "unique": false,+ "columnNames": [+ "status"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_downloads_status` ON `${TABLE_NAME}` (`status`)"+ },+ {+ "name": "index_downloads_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_downloads_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_downloads_content_type_content_id",+ "unique": false,+ "columnNames": [+ "content_type",+ "content_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_downloads_content_type_content_id` ON `${TABLE_NAME}` (`content_type`, `content_id`)"+ }+ ]+ },+ {+ "tableName": "provider_deletion_cleanup",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `provider_id` INTEGER NOT NULL, `action` TEXT NOT NULL, `target_id` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `attempt_count` INTEGER NOT NULL, `last_error` TEXT)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "action",+ "columnName": "action",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "targetId",+ "columnName": "target_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "attemptCount",+ "columnName": "attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_provider_deletion_cleanup_provider_id_action_target_id",+ "unique": true,+ "columnNames": [+ "provider_id",+ "action",+ "target_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_provider_deletion_cleanup_provider_id_action_target_id` ON `${TABLE_NAME}` (`provider_id`, `action`, `target_id`)"+ }+ ]+ },+ {+ "tableName": "plugin_provider_ownership",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`package_name` TEXT NOT NULL, `service_class_name` TEXT NOT NULL, `manifest_id` TEXT NOT NULL, `provider_id` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, PRIMARY KEY(`package_name`, `service_class_name`, `manifest_id`), FOREIGN KEY(`provider_id`) REFERENCES `providers`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "packageName",+ "columnName": "package_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "serviceClassName",+ "columnName": "service_class_name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "manifestId",+ "columnName": "manifest_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "providerId",+ "columnName": "provider_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "package_name",+ "service_class_name",+ "manifest_id"+ ]+ },+ "indices": [+ {+ "name": "index_plugin_provider_ownership_provider_id",+ "unique": true,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_plugin_provider_ownership_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "provider_config_revisions",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `revision` INTEGER NOT NULL, `config_json` TEXT NOT NULL, `state` TEXT NOT NULL, `attempt_count` INTEGER NOT NULL, `last_error` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `revision`), 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": "revision",+ "columnName": "revision",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "configJson",+ "columnName": "config_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "attemptCount",+ "columnName": "attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "revision"+ ]+ },+ "indices": [+ {+ "name": "index_provider_config_revisions_provider_id_state",+ "unique": false,+ "columnNames": [+ "provider_id",+ "state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_config_revisions_provider_id_state` ON `${TABLE_NAME}` (`provider_id`, `state`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "backup_restore_checkpoints",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`restore_key` TEXT NOT NULL, `room_complete` INTEGER NOT NULL, `preferences_complete` INTEGER NOT NULL, `presets_complete` INTEGER NOT NULL, `schedules_complete` INTEGER NOT NULL, `state` TEXT NOT NULL, `preference_snapshot_json` TEXT, `last_error` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`restore_key`))",+ "fields": [+ {+ "fieldPath": "restoreKey",+ "columnName": "restore_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "roomComplete",+ "columnName": "room_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "preferencesComplete",+ "columnName": "preferences_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "presetsComplete",+ "columnName": "presets_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "schedulesComplete",+ "columnName": "schedules_complete",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "preferenceSnapshotJson",+ "columnName": "preference_snapshot_json",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "restore_key"+ ]+ }+ },+ {+ "tableName": "backup_restore_jobs",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `restore_key` TEXT NOT NULL, `backup_version` INTEGER NOT NULL, `conflict_strategy` TEXT NOT NULL, `status` TEXT NOT NULL, `total_count` INTEGER NOT NULL, `pending_count` INTEGER NOT NULL, `applied_count` INTEGER NOT NULL, `unresolved_count` INTEGER NOT NULL, `failed_count` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`id`))",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "restoreKey",+ "columnName": "restore_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "backupVersion",+ "columnName": "backup_version",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "conflictStrategy",+ "columnName": "conflict_strategy",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "status",+ "columnName": "status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "totalCount",+ "columnName": "total_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "pendingCount",+ "columnName": "pending_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "appliedCount",+ "columnName": "applied_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "unresolvedCount",+ "columnName": "unresolved_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "failedCount",+ "columnName": "failed_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_backup_restore_jobs_restore_key",+ "unique": true,+ "columnNames": [+ "restore_key"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_backup_restore_jobs_restore_key` ON `${TABLE_NAME}` (`restore_key`)"+ },+ {+ "name": "index_backup_restore_jobs_status",+ "unique": false,+ "columnNames": [+ "status"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_backup_restore_jobs_status` ON `${TABLE_NAME}` (`status`)"+ },+ {+ "name": "index_backup_restore_jobs_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_backup_restore_jobs_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ }+ ]+ },+ {+ "tableName": "backup_restore_items",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `job_id` TEXT NOT NULL, `provider_identity_key` TEXT NOT NULL, `local_provider_id` INTEGER, `section` TEXT NOT NULL, `content_type` TEXT, `stable_reference_key` TEXT NOT NULL, `reference_json` TEXT NOT NULL, `payload_json` TEXT NOT NULL, `status` TEXT NOT NULL, `attempt_count` INTEGER NOT NULL, `last_error` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, FOREIGN KEY(`job_id`) REFERENCES `backup_restore_jobs`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "jobId",+ "columnName": "job_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "providerIdentityKey",+ "columnName": "provider_identity_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "localProviderId",+ "columnName": "local_provider_id",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "section",+ "columnName": "section",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "contentType",+ "columnName": "content_type",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "stableReferenceKey",+ "columnName": "stable_reference_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "referenceJson",+ "columnName": "reference_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "payloadJson",+ "columnName": "payload_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "status",+ "columnName": "status",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "attemptCount",+ "columnName": "attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastError",+ "columnName": "last_error",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_backup_restore_items_job_id",+ "unique": false,+ "columnNames": [+ "job_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_backup_restore_items_job_id` ON `${TABLE_NAME}` (`job_id`)"+ },+ {+ "name": "index_backup_restore_items_provider_identity_key_status",+ "unique": false,+ "columnNames": [+ "provider_identity_key",+ "status"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_backup_restore_items_provider_identity_key_status` ON `${TABLE_NAME}` (`provider_identity_key`, `status`)"+ },+ {+ "name": "index_backup_restore_items_job_id_status",+ "unique": false,+ "columnNames": [+ "job_id",+ "status"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_backup_restore_items_job_id_status` ON `${TABLE_NAME}` (`job_id`, `status`)"+ },+ {+ "name": "index_backup_restore_items_job_id_section_stable_reference_key",+ "unique": true,+ "columnNames": [+ "job_id",+ "section",+ "stable_reference_key"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_backup_restore_items_job_id_section_stable_reference_key` ON `${TABLE_NAME}` (`job_id`, `section`, `stable_reference_key`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "backup_restore_jobs",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "job_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "provider_workflows",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `generation` INTEGER NOT NULL, `state` TEXT NOT NULL, `reason` TEXT NOT NULL, `priority` INTEGER NOT NULL, `force` INTEGER NOT NULL, `current_phase` TEXT, `lease_token` TEXT, `lease_expires_at` INTEGER, `heartbeat_at` INTEGER, `progress_message` TEXT, `last_error_code` TEXT, `last_error_message` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, `completed_at` INTEGER, 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": "generation",+ "columnName": "generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "reason",+ "columnName": "reason",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "priority",+ "columnName": "priority",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "force",+ "columnName": "force",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "currentPhase",+ "columnName": "current_phase",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "leaseToken",+ "columnName": "lease_token",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "leaseExpiresAt",+ "columnName": "lease_expires_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "heartbeatAt",+ "columnName": "heartbeat_at",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "progressMessage",+ "columnName": "progress_message",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastErrorCode",+ "columnName": "last_error_code",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastErrorMessage",+ "columnName": "last_error_message",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedAt",+ "columnName": "completed_at",+ "affinity": "INTEGER"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id"+ ]+ },+ "indices": [+ {+ "name": "index_provider_workflows_state",+ "unique": false,+ "columnNames": [+ "state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflows_state` ON `${TABLE_NAME}` (`state`)"+ },+ {+ "name": "index_provider_workflows_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflows_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ },+ {+ "name": "index_provider_workflows_lease_expires_at",+ "unique": false,+ "columnNames": [+ "lease_expires_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflows_lease_expires_at` ON `${TABLE_NAME}` (`lease_expires_at`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "provider_workflow_phases",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `generation` INTEGER NOT NULL, `phase` TEXT NOT NULL, `state` TEXT NOT NULL, `attempt_count` INTEGER NOT NULL, `checkpoint` TEXT, `last_error_code` TEXT, `last_error_message` TEXT, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, `completed_at` INTEGER, PRIMARY KEY(`provider_id`, `generation`, `phase`), 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": "generation",+ "columnName": "generation",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "phase",+ "columnName": "phase",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "state",+ "columnName": "state",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "attemptCount",+ "columnName": "attempt_count",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "checkpoint",+ "columnName": "checkpoint",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastErrorCode",+ "columnName": "last_error_code",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "lastErrorMessage",+ "columnName": "last_error_message",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "completedAt",+ "columnName": "completed_at",+ "affinity": "INTEGER"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "generation",+ "phase"+ ]+ },+ "indices": [+ {+ "name": "index_provider_workflow_phases_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflow_phases_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ },+ {+ "name": "index_provider_workflow_phases_state",+ "unique": false,+ "columnNames": [+ "state"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflow_phases_state` ON `${TABLE_NAME}` (`state`)"+ },+ {+ "name": "index_provider_workflow_phases_updated_at",+ "unique": false,+ "columnNames": [+ "updated_at"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_provider_workflow_phases_updated_at` ON `${TABLE_NAME}` (`updated_at`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "m3u_classification_overrides",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `source_key` TEXT NOT NULL, `stream_id` INTEGER NOT NULL, `target_type` TEXT NOT NULL, `group_key` TEXT NOT NULL, `series_key` TEXT, `series_name` TEXT, `season_number` INTEGER, `episode_number` INTEGER, `episode_title` TEXT, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `source_key`), 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": "sourceKey",+ "columnName": "source_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "streamId",+ "columnName": "stream_id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "targetType",+ "columnName": "target_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "groupKey",+ "columnName": "group_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "seriesKey",+ "columnName": "series_key",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "seriesName",+ "columnName": "series_name",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "seasonNumber",+ "columnName": "season_number",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "episodeNumber",+ "columnName": "episode_number",+ "affinity": "INTEGER"+ },+ {+ "fieldPath": "episodeTitle",+ "columnName": "episode_title",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "source_key"+ ]+ },+ "indices": [+ {+ "name": "index_m3u_classification_overrides_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_m3u_classification_overrides_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "m3u_category_classification_rules",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`provider_id` INTEGER NOT NULL, `group_key` TEXT NOT NULL, `target_type` TEXT NOT NULL, `updated_at` INTEGER NOT NULL, PRIMARY KEY(`provider_id`, `group_key`), 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": "groupKey",+ "columnName": "group_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "targetType",+ "columnName": "target_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "provider_id",+ "group_key"+ ]+ },+ "indices": [+ {+ "name": "index_m3u_category_classification_rules_provider_id",+ "unique": false,+ "columnNames": [+ "provider_id"+ ],+ "orders": [],+ "createSql": "CREATE INDEX IF NOT EXISTS `index_m3u_category_classification_rules_provider_id` ON `${TABLE_NAME}` (`provider_id`)"+ }+ ],+ "foreignKeys": [+ {+ "table": "providers",+ "onDelete": "CASCADE",+ "onUpdate": "NO ACTION",+ "columns": [+ "provider_id"+ ],+ "referencedColumns": [+ "id"+ ]+ }+ ]+ },+ {+ "tableName": "stremio_addons",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `install_url` TEXT NOT NULL, `manifest_id` TEXT NOT NULL, `name` TEXT NOT NULL, `version` TEXT NOT NULL, `manifest_json` TEXT NOT NULL, `enabled` INTEGER NOT NULL, `sort_order` INTEGER NOT NULL, `catalog_settings_json` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `updated_at` INTEGER NOT NULL, `manifest_refreshed_at` INTEGER NOT NULL DEFAULT 0)",+ "fields": [+ {+ "fieldPath": "id",+ "columnName": "id",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "installUrl",+ "columnName": "install_url",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "manifestId",+ "columnName": "manifest_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "name",+ "columnName": "name",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "version",+ "columnName": "version",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "manifestJson",+ "columnName": "manifest_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "enabled",+ "columnName": "enabled",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "sortOrder",+ "columnName": "sort_order",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "catalogSettingsJson",+ "columnName": "catalog_settings_json",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "createdAt",+ "columnName": "created_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "updatedAt",+ "columnName": "updated_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "manifestRefreshedAt",+ "columnName": "manifest_refreshed_at",+ "affinity": "INTEGER",+ "notNull": true,+ "defaultValue": "0"+ }+ ],+ "primaryKey": {+ "autoGenerate": true,+ "columnNames": [+ "id"+ ]+ },+ "indices": [+ {+ "name": "index_stremio_addons_install_url",+ "unique": true,+ "columnNames": [+ "install_url"+ ],+ "orders": [],+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_stremio_addons_install_url` ON `${TABLE_NAME}` (`install_url`)"+ }+ ]+ },+ {+ "tableName": "stremio_playback_history",+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`content_key` TEXT NOT NULL, `media_type` TEXT NOT NULL, `exact_video_id` TEXT NOT NULL, `parent_series_id` TEXT, `title` TEXT NOT NULL, `poster_url` TEXT, `resume_position_ms` INTEGER NOT NULL, `total_duration_ms` INTEGER NOT NULL, `is_watched` INTEGER NOT NULL, `last_watched_at` INTEGER NOT NULL, `catalog_origin_key` TEXT NOT NULL, `stream_origin_key_hint` TEXT, PRIMARY KEY(`content_key`))",+ "fields": [+ {+ "fieldPath": "contentKey",+ "columnName": "content_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "mediaType",+ "columnName": "media_type",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "exactVideoId",+ "columnName": "exact_video_id",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "parentSeriesId",+ "columnName": "parent_series_id",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "title",+ "columnName": "title",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "posterUrl",+ "columnName": "poster_url",+ "affinity": "TEXT"+ },+ {+ "fieldPath": "resumePositionMs",+ "columnName": "resume_position_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "totalDurationMs",+ "columnName": "total_duration_ms",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "isWatched",+ "columnName": "is_watched",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "lastWatchedAt",+ "columnName": "last_watched_at",+ "affinity": "INTEGER",+ "notNull": true+ },+ {+ "fieldPath": "catalogOriginKey",+ "columnName": "catalog_origin_key",+ "affinity": "TEXT",+ "notNull": true+ },+ {+ "fieldPath": "streamOriginKeyHint",+ "columnName": "stream_origin_key_hint",+ "affinity": "TEXT"+ }+ ],+ "primaryKey": {+ "autoGenerate": false,+ "columnNames": [+ "content_key"+ ]+ }+ }+ ],+ "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, '784a23e07a41e42401481f91f71ac763')"+ ]+ }+}\ No newline at end of filediff --git a/data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.kt b/data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.ktindex dafa6bbe..4edbd379 100644--- a/data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.kt+++ b/data/src/androidTest/java/com/streamvault/data/local/StreamVaultDatabaseMigrationTest.kt@@ -51,6 +51,77 @@ class StreamVaultDatabaseMigrationTest {}}+ @Test+ fun migrate89To90_preservesCatalogRowsAndAddsCatchUpMetadataColumns() {+ val databaseName = "streamvault-migrate-89-90-catchup"+ val database = migrationTestHelper.createDatabase(databaseName, 89)+ database.execSQL(+ """+ INSERT INTO providers (id, name, type, is_active, status, last_synced_at, created_at)+ VALUES (901, 'Migration Provider', 'M3U', 1, 'ACTIVE', 0, 0)+ """.trimIndent()+ )+ database.execSQL(+ """+ INSERT INTO channels (+ stream_id, name, stream_url, number, catch_up_supported, catch_up_days,+ provider_id, is_adult, is_user_protected, logical_group_id, error_count, sync_fingerprint+ ) VALUES (902, 'Archive Channel', 'https://example.invalid/live.ts', 1, 1, 3,+ 901, 0, 0, '', 0, 'before-migration')+ """.trimIndent()+ )+ database.execSQL(+ """+ INSERT INTO channel_import_stage (+ session_id, provider_id, stream_id, name, stream_url, number,+ catch_up_supported, catch_up_days, is_adult, logical_group_id, error_count, sync_fingerprint+ ) VALUES (903, 901, 902, 'Archive Channel', 'https://example.invalid/live.ts', 1,+ 1, 3, 0, '', 0, 'before-migration')+ """.trimIndent()+ )+ database.close()++ val migrated = migrationTestHelper.runMigrationsAndValidate(+ databaseName,+ 90,+ true,+ StreamVaultDatabase.MIGRATION_89_90+ )++ migrated.query("SELECT name FROM providers WHERE id = 901").use { cursor ->+ assertEquals(true, cursor.moveToFirst())+ assertEquals("Migration Provider", cursor.getString(0))+ assertEquals(false, cursor.moveToNext())+ }++ migrated.query(+ "SELECT catch_up_type, catch_up_correction_seconds FROM channels WHERE stream_id = 902"+ ).use { cursor ->+ assertEquals(true, cursor.moveToFirst())+ assertEquals(null, cursor.getString(0))+ assertEquals(0, cursor.getInt(1))+ }+ migrated.query(+ "SELECT catch_up_type, catch_up_correction_seconds FROM channel_import_stage WHERE stream_id = 902"+ ).use { cursor ->+ assertEquals(true, cursor.moveToFirst())+ assertEquals(null, cursor.getString(0))+ assertEquals(0, cursor.getInt(1))+ }++ migrated.execSQL(+ "UPDATE channels SET catch_up_type = 'append', catch_up_correction_seconds = -14400 WHERE stream_id = 902"+ )+ migrated.query(+ "SELECT catch_up_type, catch_up_correction_seconds FROM channels WHERE stream_id = 902"+ ).use { cursor ->+ assertEquals(true, cursor.moveToFirst())+ assertEquals("append", cursor.getString(0))+ assertEquals(-14_400, cursor.getInt(1))+ }+ migrated.close()+ }+@Testfun migrate9To10_createsBackfillsAndMaintainsFtsTables() {migrationTestHelper.createDatabase(testDbName, 9).apply {diff --git a/data/src/main/java/com/streamvault/data/local/FeatureMigrationsV89To90.kt b/data/src/main/java/com/streamvault/data/local/FeatureMigrationsV89To90.ktnew file mode 100644index 00000000..f009ea6a--- /dev/null+++ b/data/src/main/java/com/streamvault/data/local/FeatureMigrationsV89To90.kt@@ -0,0 +1,20 @@+package com.streamvault.data.local++import androidx.room.migration.Migration+import androidx.sqlite.db.SupportSQLiteDatabase++/** Persists M3U catch-up mode and the channel-specific archive time correction. */+internal object FeatureMigrationsV89To90 {+ val MIGRATION_89_90 = object : Migration(89, 90) {+ override fun migrate(db: SupportSQLiteDatabase) {+ db.execSQL("ALTER TABLE channels ADD COLUMN catch_up_type TEXT")+ db.execSQL(+ "ALTER TABLE channels ADD COLUMN catch_up_correction_seconds INTEGER NOT NULL DEFAULT 0"+ )+ db.execSQL("ALTER TABLE channel_import_stage ADD COLUMN catch_up_type TEXT")+ db.execSQL(+ "ALTER TABLE channel_import_stage ADD COLUMN catch_up_correction_seconds INTEGER NOT NULL DEFAULT 0"+ )+ }+ }+}diff --git a/data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.kt b/data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.ktindex 0da458f8..e40f1f06 100644--- a/data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.kt+++ b/data/src/main/java/com/streamvault/data/local/StreamVaultDatabase.kt@@ -12,7 +12,7 @@ import org.json.JSONObjectimport java.net.URIimport java.security.MessageDigest-internal const val STREAM_VAULT_DATABASE_VERSION = 89+internal const val STREAM_VAULT_DATABASE_VERSION = 90@Database(entities = [@@ -225,5 +225,6 @@ abstract class StreamVaultDatabase : RoomDatabase() {val MIGRATION_86_87 = FeatureMigrationsV86To87.MIGRATION_86_87val MIGRATION_87_88 = FeatureMigrationsV87To88.MIGRATION_87_88val MIGRATION_88_89 = FeatureMigrationsV88To89.MIGRATION_88_89+ val MIGRATION_89_90 = FeatureMigrationsV89To90.MIGRATION_89_90}}diff --git a/data/src/main/java/com/streamvault/data/local/StreamVaultDatabaseMigrationRegistry.kt b/data/src/main/java/com/streamvault/data/local/StreamVaultDatabaseMigrationRegistry.ktindex e1c05099..46ee9862 100644--- a/data/src/main/java/com/streamvault/data/local/StreamVaultDatabaseMigrationRegistry.kt+++ b/data/src/main/java/com/streamvault/data/local/StreamVaultDatabaseMigrationRegistry.kt@@ -26,10 +26,11 @@ object StreamVaultDatabaseMigrationRegistry {val v86To87: List<Migration> = listOf(FeatureMigrationsV86To87.MIGRATION_86_87)val v87To88: List<Migration> = listOf(FeatureMigrationsV87To88.MIGRATION_87_88)val v88To89: List<Migration> = listOf(FeatureMigrationsV88To89.MIGRATION_88_89)+ val v89To90: List<Migration> = listOf(FeatureMigrationsV89To90.MIGRATION_89_90)val all: List<Migration> = (v1To24 + v24To49 + v49To75 + v75To76 + v76To77 + v77To78 + v78To79 + v79To80 +v80To81 + v81To82 + v82To83 + v83To84 + v84To85 + v85To86 + v86To87 + v87To88 +- v88To89+ v88To89 + v89To90).also(::validate)private fun validate(migrations: List<Migration>) {diff --git a/data/src/main/java/com/streamvault/data/local/dao/CatalogSyncDao.kt b/data/src/main/java/com/streamvault/data/local/dao/CatalogSyncDao.ktindex 091881d1..c0b1a94d 100644--- a/data/src/main/java/com/streamvault/data/local/dao/CatalogSyncDao.kt+++ b/data/src/main/java/com/streamvault/data/local/dao/CatalogSyncDao.kt@@ -348,6 +348,20 @@ interface CatalogSyncDao {AND stage.provider_id = :providerIdAND stage.stream_id = channels.stream_id),+ catch_up_type = (+ SELECT stage.catch_up_type+ FROM channel_import_stage AS stage+ WHERE stage.session_id = :sessionId+ AND stage.provider_id = :providerId+ AND stage.stream_id = channels.stream_id+ ),+ catch_up_correction_seconds = (+ SELECT stage.catch_up_correction_seconds+ FROM channel_import_stage AS stage+ WHERE stage.session_id = :sessionId+ AND stage.provider_id = :providerId+ AND stage.stream_id = channels.stream_id+ ),logical_group_id = (SELECT stage.logical_group_idFROM channel_import_stage AS stage@@ -411,6 +425,8 @@ interface CatalogSyncDao {catch_up_supported,catch_up_days,catchUpSource,+ catch_up_type,+ catch_up_correction_seconds,logical_group_id,error_count,provider_id,@@ -432,6 +448,8 @@ interface CatalogSyncDao {stage.catch_up_supported,stage.catch_up_days,stage.catchUpSource,+ stage.catch_up_type,+ stage.catch_up_correction_seconds,stage.logical_group_id,stage.error_count,stage.provider_id,diff --git a/data/src/main/java/com/streamvault/data/local/dao/Daos.kt b/data/src/main/java/com/streamvault/data/local/dao/Daos.ktindex 65c88e47..fe579df9 100644--- a/data/src/main/java/com/streamvault/data/local/dao/Daos.kt+++ b/data/src/main/java/com/streamvault/data/local/dao/Daos.kt@@ -90,6 +90,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -109,6 +110,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -128,6 +130,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -148,6 +151,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -168,6 +172,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -191,6 +196,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -210,6 +216,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -229,6 +236,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -253,6 +261,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -273,6 +282,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -293,6 +303,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -313,6 +324,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -336,6 +348,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -358,6 +371,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -383,6 +397,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -406,6 +421,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -441,6 +457,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -519,6 +536,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -537,6 +555,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,@@ -556,6 +575,7 @@ abstract class ChannelDao {"""SELECT c.id, c.stream_id, c.name, c.logo_url, c.group_title, c.category_id, c.category_name, c.stream_url,c.epg_channel_id, c.number, c.catch_up_supported, c.catch_up_days, c.catchUpSource,+ c.catch_up_type, c.catch_up_correction_seconds,c.provider_id,(SELECT guide_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS guide_source_policy,(SELECT channel_logo_source_policy FROM provider_configs WHERE provider_id = c.provider_id) AS channel_logo_source_policy,diff --git a/data/src/main/java/com/streamvault/data/local/entity/Entities.kt b/data/src/main/java/com/streamvault/data/local/entity/Entities.ktindex 37e14847..fd30c3e2 100644--- a/data/src/main/java/com/streamvault/data/local/entity/Entities.kt+++ b/data/src/main/java/com/streamvault/data/local/entity/Entities.kt@@ -236,7 +236,9 @@ data class ChannelEntity(@ColumnInfo(name = "error_count") val errorCount: Int = 0,@ColumnInfo(name = "quality_options_json") val qualityOptionsJson: String? = null,@ColumnInfo(name = "playback_metadata_json") val playbackMetadataJson: String? = null,- @ColumnInfo(name = "sync_fingerprint") val syncFingerprint: String = ""+ @ColumnInfo(name = "sync_fingerprint") val syncFingerprint: String = "",+ @ColumnInfo(name = "catch_up_type") val catchUpType: String? = null,+ @ColumnInfo(name = "catch_up_correction_seconds") val catchUpCorrectionSeconds: Int = 0)data class ChannelBrowseEntity(@@ -260,7 +262,9 @@ data class ChannelBrowseEntity(@ColumnInfo(name = "is_adult") val isAdult: Boolean = false,@ColumnInfo(name = "is_user_protected") val isUserProtected: Boolean = false,@ColumnInfo(name = "logical_group_id") val logicalGroupId: String = "",- @ColumnInfo(name = "error_count") val errorCount: Int = 0+ @ColumnInfo(name = "error_count") val errorCount: Int = 0,+ @ColumnInfo(name = "catch_up_type") val catchUpType: String? = null,+ @ColumnInfo(name = "catch_up_correction_seconds") val catchUpCorrectionSeconds: Int = 0)data class ChannelGuideLookupEntity(@@ -658,7 +662,9 @@ data class ChannelImportStageEntity(@ColumnInfo(name = "logical_group_id") val logicalGroupId: String = "",@ColumnInfo(name = "error_count") val errorCount: Int = 0,@ColumnInfo(name = "playback_metadata_json") val playbackMetadataJson: String? = null,- @ColumnInfo(name = "sync_fingerprint") val syncFingerprint: String = ""+ @ColumnInfo(name = "sync_fingerprint") val syncFingerprint: String = "",+ @ColumnInfo(name = "catch_up_type") val catchUpType: String? = null,+ @ColumnInfo(name = "catch_up_correction_seconds") val catchUpCorrectionSeconds: Int = 0)@Entity(diff --git a/data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt b/data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.ktindex f765a21f..fd6cd367 100644--- a/data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt+++ b/data/src/main/java/com/streamvault/data/manager/BackupManagerImpl.kt@@ -328,6 +328,7 @@ class BackupManagerImpl @Inject constructor(put("pinnedSubtitleLanguages", preferencesRepository.pinnedSubtitleLanguages.first().joinToString("\n"))put("playerLiveTranslationEnabled", preferencesRepository.playerLiveTranslationEnabled.first().toString())put("playerLiveTranslationEndpoint", preferencesRepository.playerLiveTranslationEndpoint.first())+ put("m3uCatchUpQueryFormat", preferencesRepository.m3uCatchUpQueryFormat.first())put("playerControlsTimeoutSeconds", preferencesRepository.playerControlsTimeoutSeconds.first().toString())put("playerLiveOverlayTimeoutSeconds", preferencesRepository.playerLiveOverlayTimeoutSeconds.first().toString())put("playerLiveClockEnabled", preferencesRepository.playerLiveClockEnabled.first().toString())@@ -3864,6 +3865,7 @@ class BackupManagerImpl @Inject constructor(put("pinnedSubtitleLanguages", preferencesRepository.pinnedSubtitleLanguages.first().joinToString("\n"))put("playerLiveTranslationEnabled", preferencesRepository.playerLiveTranslationEnabled.first().toString())put("playerLiveTranslationEndpoint", preferencesRepository.playerLiveTranslationEndpoint.first())+ put("m3uCatchUpQueryFormat", preferencesRepository.m3uCatchUpQueryFormat.first())put("playerControlsTimeoutSeconds", preferencesRepository.playerControlsTimeoutSeconds.first().toString())put("playerLiveOverlayTimeoutSeconds", preferencesRepository.playerLiveOverlayTimeoutSeconds.first().toString())put("playerLiveClockEnabled", preferencesRepository.playerLiveClockEnabled.first().toString())@@ -4651,6 +4653,7 @@ class BackupManagerImpl @Inject constructor(prefs["playerLiveTranslationEnabled"]?.toBooleanStrictOrNull()?.let { preferencesRepository.setPlayerLiveTranslationEnabled(it) }prefs["playerLiveTranslationEndpoint"]?.let { preferencesRepository.setPlayerLiveTranslationEndpoint(it) }+ prefs["m3uCatchUpQueryFormat"]?.let { preferencesRepository.setM3uCatchUpQueryFormat(it) }prefs["playerControlsTimeoutSeconds"]?.toIntOrNull()?.let { preferencesRepository.setPlayerControlsTimeoutSeconds(it) }prefs["playerLiveOverlayTimeoutSeconds"]?.toIntOrNull()diff --git a/data/src/main/java/com/streamvault/data/manager/PreferenceBackupRegistry.kt b/data/src/main/java/com/streamvault/data/manager/PreferenceBackupRegistry.ktindex 404cadf9..82d3a82c 100644--- a/data/src/main/java/com/streamvault/data/manager/PreferenceBackupRegistry.kt+++ b/data/src/main/java/com/streamvault/data/manager/PreferenceBackupRegistry.kt@@ -43,7 +43,7 @@ internal object PreferenceBackupRegistry {"player_vod_track_preferences", "player_subtitle_text_scale","player_subtitle_text_color", "player_subtitle_background_color", "pinned_subtitle_languages","player_live_translation_enabled",- "player_live_translation_endpoint", "player_controls_timeout_seconds",+ "player_live_translation_endpoint", "m3u_catch_up_query_format", "player_controls_timeout_seconds","player_live_overlay_timeout_seconds", "player_notice_timeout_seconds","player_live_clock_enabled", "player_live_clock_position", "player_live_clock_size","player_live_clock_font",@@ -129,7 +129,7 @@ internal object PreferenceBackupRegistry {"multiViewPerformanceMode", "multiViewCenterTwoSlotLayout", "multiViewRespectProviderConnectionLimit","preferredAudioLanguage", "playerVodTrackPreferences", "playerSubtitleTextScale", "playerSubtitleTextColor","playerSubtitleBackgroundColor", "pinnedSubtitleLanguages", "playerLiveTranslationEnabled",- "playerLiveTranslationEndpoint",+ "playerLiveTranslationEndpoint", "m3uCatchUpQueryFormat","playerControlsTimeoutSeconds", "playerLiveOverlayTimeoutSeconds", "playerNoticeTimeoutSeconds","playerLiveClockEnabled", "playerLiveClockPosition", "playerLiveClockSize", "playerLiveClockFont","playerDiagnosticsTimeoutSeconds", "playerWifiMaxVideoHeight", "playerEthernetMaxVideoHeight",diff --git a/data/src/main/java/com/streamvault/data/mapper/EntityMappers.kt b/data/src/main/java/com/streamvault/data/mapper/EntityMappers.ktindex 8d4ac0e2..ed84eaa9 100644--- a/data/src/main/java/com/streamvault/data/mapper/EntityMappers.kt+++ b/data/src/main/java/com/streamvault/data/mapper/EntityMappers.kt@@ -96,6 +96,8 @@ fun ChannelEntity.toDomain(): Channel {catchUpSupported = catchUpSupported,catchUpDays = catchUpDays,catchUpSource = catchUpSource,+ catchUpType = catchUpType,+ catchUpCorrectionSeconds = catchUpCorrectionSeconds,providerId = providerId,isAdult = isAdult,isUserProtected = isUserProtected,@@ -135,6 +137,8 @@ fun Channel.toEntity(): ChannelEntity {catchUpSupported = catchUpSupported,catchUpDays = catchUpDays,catchUpSource = catchUpSource.takeUnless { xtreamLiveToken != null },+ catchUpType = catchUpType.takeUnless { xtreamLiveToken != null },+ catchUpCorrectionSeconds = catchUpCorrectionSeconds,providerId = providerId,isAdult = isAdult,isUserProtected = isUserProtected,diff --git a/data/src/main/java/com/streamvault/data/parser/M3uParser.kt b/data/src/main/java/com/streamvault/data/parser/M3uParser.ktindex 268a08cd..68bf4f63 100644--- a/data/src/main/java/com/streamvault/data/parser/M3uParser.kt+++ b/data/src/main/java/com/streamvault/data/parser/M3uParser.kt@@ -31,7 +31,8 @@ class M3uParser {data class M3uHeader(val tvgUrls: List<String> = emptyList(),- val userAgent: String? = null+ val userAgent: String? = null,+ val catchUpCorrectionSeconds: Int = 0) {val tvgUrl: String? get() = tvgUrls.firstOrNull()}@@ -55,7 +56,9 @@ class M3uParser {val year: String? = null,val genre: String? = null,val durationSeconds: Int? = null,- val playbackMetadata: M3uPlaybackMetadata? = null+ val playbackMetadata: M3uPlaybackMetadata? = null,+ val catchUpType: String? = catchUp,+ val catchUpCorrectionSeconds: Int = 0)data class ParseResult(@@ -95,6 +98,7 @@ class M3uParser {pendingExtinf!!,line,header.userAgent,+ header.catchUpCorrectionSeconds,pendingPlaybackMetadata?.build())?.let(entries::add)pendingExtinf = null@@ -158,6 +162,7 @@ class M3uParser {pendingExtinf!!,line,header.userAgent,+ header.catchUpCorrectionSeconds,pendingPlaybackMetadata?.build())?.let { onEntry(it) }@@ -190,6 +195,8 @@ class M3uParser {catchUpSupported = entry.supportsCatchUp(),catchUpDays = entry.catchUpDays ?: 0,catchUpSource = entry.catchUpSource,+ catchUpType = entry.catchUpType,+ catchUpCorrectionSeconds = entry.catchUpCorrectionSeconds,providerId = providerId,logicalGroupId = ChannelNormalizer.getLogicalGroupId(entry.name, providerId))@@ -200,6 +207,7 @@ class M3uParser {extinf: ParsedExtinf,url: String,globalUserAgent: String?,+ globalCatchUpCorrectionSeconds: Int,playbackMetadata: M3uPlaybackMetadata?): M3uEntry? {if (url.isBlank() || extinf.name.isBlank()) return null@@ -213,8 +221,10 @@ class M3uParser {tvgChno = extinf.tvgChno?.toIntOrNull()?.takeIf { it in 1..99999 },tvgLanguage = extinf.tvgLanguage,tvgCountry = extinf.tvgCountry,- catchUp = extinf.catchUp,- catchUpDays = extinf.catchUpDays?.toIntOrNull()?.takeIf { it in 0..365 },+ catchUp = extinf.catchUp?.takeIf(String::isNotBlank)+ ?: extinf.catchUpType?.takeIf(String::isNotBlank),+ catchUpDays = extinf.catchUpDays?.toIntOrNull()?.takeIf { it in 0..365 }+ ?: extinf.timeshift?.toIntOrNull()?.takeIf { it in 0..365 },catchUpSource = extinf.catchUpSource,timeshift = extinf.timeshift,url = url,@@ -223,12 +233,25 @@ class M3uParser {year = extinf.year,genre = extinf.genre,durationSeconds = extinf.durationSeconds,- playbackMetadata = playbackMetadata+ playbackMetadata = playbackMetadata,+ catchUpType = (extinf.catchUp?.takeIf(String::isNotBlank) ?: extinf.catchUpType)+ ?.trim()+ ?.lowercase()+ ?.takeIf(String::isNotBlank)+ ?: extinf.timeshift?.takeIf(String::isNotBlank)?.let { "shift" },+ catchUpCorrectionSeconds = parseCatchUpCorrectionSeconds(extinf.catchUpCorrection)+ ?: globalCatchUpCorrectionSeconds)}private fun M3uEntry.supportsCatchUp(): Boolean {- return !catchUp.isNullOrBlank() || !catchUpSource.isNullOrBlank() || !timeshift.isNullOrBlank()+ return !catchUpType.isNullOrBlank() || !catchUpSource.isNullOrBlank() || !timeshift.isNullOrBlank()+ }++ private fun parseCatchUpCorrectionSeconds(value: String?): Int? {+ val hours = value?.trim()?.toDoubleOrNull() ?: return null+ if (!hours.isFinite()) return null+ return (hours.coerceIn(-12.0, 14.0) * 3_600.0).toInt()}private fun applyPendingDirective(extinf: ParsedExtinf, line: String): ParsedExtinf {@@ -250,8 +273,10 @@ class M3uParser {val tvgLanguage: String?,val tvgCountry: String?,val catchUp: String?,+ val catchUpType: String?,val catchUpDays: String?,val catchUpSource: String?,+ val catchUpCorrection: String?,val timeshift: String?,val userAgent: String?,val rating: String?,@@ -263,7 +288,8 @@ class M3uParser {val attributes = parseAttributes(line, line.indexOf(' '))return M3uHeader(tvgUrls = extractHeaderEpgUrls(attributes),- userAgent = attributes["user-agent"]+ userAgent = attributes["user-agent"],+ catchUpCorrectionSeconds = parseCatchUpCorrectionSeconds(attributes["catchup-correction"]) ?: 0)}@@ -398,8 +424,10 @@ class M3uParser {tvgLanguage = attributes["tvg-language"],tvgCountry = attributes["tvg-country"],catchUp = attributes["catchup"],+ catchUpType = attributes["catchup-type"],catchUpDays = attributes["catchup-days"],catchUpSource = attributes["catchup-source"],+ catchUpCorrection = attributes["catchup-correction"],timeshift = attributes["timeshift"],userAgent = attributes["user-agent"],rating = attributes["rating"],@@ -579,8 +607,10 @@ class M3uParser {"tvg-language","tvg-country","catchup",+ "catchup-type","catchup-days","catchup-source",+ "catchup-correction","timeshift","user-agent","rating",diff --git a/data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt b/data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.ktindex 8946cb88..881a97a7 100644--- a/data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt+++ b/data/src/main/java/com/streamvault/data/preferences/PreferencesRepository.kt@@ -59,6 +59,7 @@ import com.streamvault.domain.model.VodVariantObservationimport com.streamvault.domain.model.VodVariantPreferenceModeimport com.streamvault.domain.model.PlayerSurfaceModeimport com.streamvault.domain.model.PlayerBackButtonVisibility+import com.streamvault.domain.provider.DEFAULT_M3U_CATCH_UP_QUERY_FORMATimport com.streamvault.domain.settings.VodTrackPreferenceScopeimport com.streamvault.domain.settings.VodTrackPreferencesimport com.streamvault.domain.sports.provider.SportsEventSourceMode@@ -545,6 +546,7 @@ class PreferencesRepository @Inject constructor(val PLAYER_TIMESHIFT_ENABLED = booleanPreferencesKey("player_timeshift_enabled")val PLAYER_TIMESHIFT_DEPTH_MINUTES = intPreferencesKey("player_timeshift_depth_minutes")val PLAYER_TIMESHIFT_BACKEND = stringPreferencesKey("player_timeshift_backend")+ val M3U_CATCH_UP_QUERY_FORMAT = stringPreferencesKey("m3u_catch_up_query_format")val DEFAULT_STOP_PLAYBACK_TIMER_MINUTES = intPreferencesKey("default_stop_playback_timer_minutes")val DEFAULT_IDLE_STANDBY_TIMER_MINUTES = intPreferencesKey("default_idle_standby_timer_minutes")val LAST_SPEED_TEST_MEGABITS = stringPreferencesKey("last_speed_test_megabits")@@ -982,6 +984,10 @@ class PreferencesRepository @Inject constructor(parseTimeshiftBackendPreference(preferences[PreferencesKeys.PLAYER_TIMESHIFT_BACKEND])}+ override val m3uCatchUpQueryFormat: Flow<String> = context.dataStore.data.map { preferences ->+ preferences[PreferencesKeys.M3U_CATCH_UP_QUERY_FORMAT] ?: DEFAULT_M3U_CATCH_UP_QUERY_FORMAT+ }+override val defaultStopPlaybackTimerMinutes: Flow<Int> = context.dataStore.data.map { preferences ->sanitizePlaybackTimerMinutes(preferences[PreferencesKeys.DEFAULT_STOP_PLAYBACK_TIMER_MINUTES] ?: 0)}@@ -1835,6 +1841,18 @@ class PreferencesRepository @Inject constructor(}}+ override suspend fun setM3uCatchUpQueryFormat(format: String) {+ val normalized = format.trim().filterNot { it == '\r' || it == '\n' || it == '\t' }+ .take(8_192)+ context.dataStore.edit { preferences ->+ if (normalized.isBlank()) {+ preferences.remove(PreferencesKeys.M3U_CATCH_UP_QUERY_FORMAT)+ } else {+ preferences[PreferencesKeys.M3U_CATCH_UP_QUERY_FORMAT] = normalized+ }+ }+ }+override suspend fun setDefaultStopPlaybackTimerMinutes(minutes: Int) {context.dataStore.edit { preferences ->preferences[PreferencesKeys.DEFAULT_STOP_PLAYBACK_TIMER_MINUTES] = sanitizePlaybackTimerMinutes(minutes)diff --git a/data/src/main/java/com/streamvault/data/provider/ProductionProviderCapabilityFactories.kt b/data/src/main/java/com/streamvault/data/provider/ProductionProviderCapabilityFactories.ktindex 32fa58a7..527beae6 100644--- a/data/src/main/java/com/streamvault/data/provider/ProductionProviderCapabilityFactories.kt+++ b/data/src/main/java/com/streamvault/data/provider/ProductionProviderCapabilityFactories.kt@@ -359,7 +359,15 @@ private class M3uCapabilityAdapter(}override suspend fun buildCatchUpUrl(streamId: Long, start: Long, end: Long): String? = nulloverride suspend fun buildCatchUpUrls(request: CatchUpRequest): List<String> =- request.sourceCatchUpTemplate?.let { buildM3uCatchUpUrls(it, request.start, request.end) }.orEmpty()+ buildM3uCatchUpUrls(+ source = request.sourceCatchUpTemplate,+ streamUrl = request.sourceStreamUrl,+ catchUpType = request.sourceCatchUpType,+ start = request.start,+ end = request.end,+ correctionSeconds = request.catchUpCorrectionSeconds,+ fallbackTemplate = request.fallbackCatchUpTemplate+ )private companion object {const val GUIDE_LOOKBACK_MILLIS = 12L * 60L * 60L * 1000Ldiff --git a/data/src/main/java/com/streamvault/data/repository/ChannelRepositoryImpl.kt b/data/src/main/java/com/streamvault/data/repository/ChannelRepositoryImpl.ktindex c0b3dbe4..f7f1441e 100644--- a/data/src/main/java/com/streamvault/data/repository/ChannelRepositoryImpl.kt+++ b/data/src/main/java/com/streamvault/data/repository/ChannelRepositoryImpl.kt@@ -597,6 +597,8 @@ class ChannelRepositoryImpl @Inject constructor(catchUpSupported = selectedVariant.catchUpSupported,catchUpDays = selectedVariant.catchUpDays,catchUpSource = selectedVariant.catchUpSource,+ catchUpType = selectedVariant.catchUpType,+ catchUpCorrectionSeconds = selectedVariant.catchUpCorrectionSeconds,providerId = representative.providerId,isAdult = representative.isAdult,isUserProtected = representative.isUserProtected,@@ -902,6 +904,8 @@ class ChannelRepositoryImpl @Inject constructor(catchUpSupported = catchUpSupported,catchUpDays = catchUpDays,catchUpSource = catchUpSource,+ catchUpType = catchUpType,+ catchUpCorrectionSeconds = catchUpCorrectionSeconds,attributes = classification.attributes,observedQuality = observedQuality ?: LiveChannelObservedQuality())@@ -927,6 +931,8 @@ class ChannelRepositoryImpl @Inject constructor(catchUpSupported = catchUpSupported,catchUpDays = catchUpDays,catchUpSource = catchUpSource,+ catchUpType = catchUpType,+ catchUpCorrectionSeconds = catchUpCorrectionSeconds,providerId = providerId,isAdult = isAdult,isUserProtected = isUserProtected,diff --git a/data/src/main/java/com/streamvault/data/repository/M3uCatchUpUrlBuilder.kt b/data/src/main/java/com/streamvault/data/repository/M3uCatchUpUrlBuilder.ktnew file mode 100644index 00000000..c0b358b1--- /dev/null+++ b/data/src/main/java/com/streamvault/data/repository/M3uCatchUpUrlBuilder.kt@@ -0,0 +1,206 @@+package com.streamvault.data.repository++import java.net.URI+import java.time.Instant+import java.time.ZoneOffset+import java.time.format.DateTimeFormatter+import java.util.Locale+import com.streamvault.domain.provider.DEFAULT_M3U_CATCH_UP_QUERY_FORMAT++private val catchUpToken = Regex("\\$\\{([^{}]+)\\}|\\{([^{}]+)\\}")+private val compactJavaDateFormat = Regex("yyyyMMdd(?:HHmmss)?")++internal fun buildM3uCatchUpUrls(+ source: String?,+ streamUrl: String?,+ catchUpType: String?,+ start: Long,+ end: Long,+ correctionSeconds: Int,+ fallbackTemplate: String = DEFAULT_M3U_CATCH_UP_QUERY_FORMAT+): List<String> {+ if (start <= 0L || end <= start) return emptyList()+ val liveUrl = streamUrl?.trim().orEmpty()+ val template = source?.trim().orEmpty()+ val mode = catchUpType?.trim()?.lowercase(Locale.ROOT).orEmpty()+ if (template.hasCatchUpIdPlaceholder()) return emptyList()+ val now = System.currentTimeMillis() / 1_000L+ val correctedStart = start + correctionSeconds+ val correctedEnd = maxOf(correctedStart + 1L, end + correctionSeconds)+ val correctedNow = now + correctionSeconds++ val fullSource = template.takeIf(::hasUrlScheme)+ val candidate = when {+ fullSource != null -> expandCatchUpTemplate(+ fullSource,+ correctedStart,+ correctedEnd,+ correctedNow,+ correctionSeconds+ )+ template.isNotBlank() && liveUrl.isNotBlank() && mode in APPEND_MODES ->+ appendCatchUpSource(liveUrl, expandCatchUpTemplate(template, correctedStart, correctedEnd, correctedNow, correctionSeconds))+ mode in SHIFT_MODES && liveUrl.isNotBlank() -> {+ val shiftSource = template.ifBlank { "?utc={utc}&lutc={lutc}" }+ appendCatchUpSource(liveUrl, expandCatchUpTemplate(shiftSource, correctedStart, correctedEnd, correctedNow, correctionSeconds))+ }+ mode in APPEND_MODES && liveUrl.isNotBlank() -> {+ fallbackTemplate.takeIf(String::isNotBlank)?.let { queryFormat ->+ appendCatchUpSource(+ liveUrl,+ expandCatchUpTemplate(queryFormat, correctedStart, correctedEnd, correctedNow, correctionSeconds)+ )+ }+ }+ mode in FLUSSONIC_MODES && liveUrl.isNotBlank() ->+ buildFlussonicCatchUpUrl(liveUrl, correctedStart, now)+ mode in XTREAM_MODES && liveUrl.isNotBlank() ->+ buildXtreamCatchUpUrl(liveUrl, correctedStart, correctedEnd)+ else -> null+ }+ return listOfNotNull(candidate?.takeIf(String::isNotBlank)).distinct()+}++private fun String.hasCatchUpIdPlaceholder(): Boolean = catchUpToken.findAll(this).any { match ->+ (match.groups[1]?.value ?: match.groups[2]?.value).equals("catchup-id", ignoreCase = true)+}++private fun expandCatchUpTemplate(+ template: String,+ start: Long,+ end: Long,+ now: Long,+ correctionSeconds: Int+): String {+ val durationSeconds = (end - start).coerceAtLeast(1L)+ val durationMinutes = (durationSeconds / 60L).coerceAtLeast(1L)+ return catchUpToken.replace(template) { match ->+ val rawSpecifier = match.groups[1]?.value ?: match.groups[2]?.value.orEmpty()+ val specifier = rawSpecifier.trim()+ if (specifier == "YmdHis") {+ return@replace formatTimestamp(start, "yyyyMMddHHmmss")+ }+ if (specifier in setOf("Y", "m", "d", "H", "M", "S")) {+ return@replace formatTimestamp(start, specifier)+ }+ val name = specifier.substringBefore(':').lowercase(Locale.ROOT)+ val format = specifier.substringAfter(':', "")+ when (name) {+ "utc", "start" -> formatTimestamp(start, format)+ "utcend", "end" -> formatTimestamp(end, format)+ "lutc", "now", "timestamp" -> formatTimestamp(now, format)+ "duration" -> {+ val divisor = format.toLongOrNull()?.takeIf { it > 0L } ?: 1L+ (durationSeconds / divisor).toString()+ }+ "duration_seconds" -> durationSeconds.toString()+ "duration_minutes" -> durationMinutes.toString()+ "offset" -> {+ val divisor = format.toLongOrNull()?.takeIf { it > 0L } ?: 1L+ ((now - start).coerceAtLeast(0L) / divisor).toString()+ }+ else -> match.value+ }+ }+}++private fun formatTimestamp(epochSeconds: Long, format: String): String {+ if (format.isBlank()) return epochSeconds.toString()+ val date = Instant.ofEpochSecond(epochSeconds).atZone(ZoneOffset.UTC)+ if (compactJavaDateFormat.matches(format)) {+ return runCatching { date.format(DateTimeFormatter.ofPattern(format, Locale.ROOT)) }+ .getOrDefault(epochSeconds.toString())+ }+ return buildString(format.length) {+ format.forEach { character ->+ append(+ when (character) {+ 'Y' -> date.format(DateTimeFormatter.ofPattern("yyyy", Locale.ROOT))+ 'm' -> date.format(DateTimeFormatter.ofPattern("MM", Locale.ROOT))+ 'd' -> date.format(DateTimeFormatter.ofPattern("dd", Locale.ROOT))+ 'H' -> date.format(DateTimeFormatter.ofPattern("HH", Locale.ROOT))+ 'M' -> date.format(DateTimeFormatter.ofPattern("mm", Locale.ROOT))+ 'S' -> date.format(DateTimeFormatter.ofPattern("ss", Locale.ROOT))+ else -> character+ }+ )+ }+ }+}++private fun appendCatchUpSource(baseUrl: String, source: String): String {+ if (source.isBlank()) return baseUrl+ if (hasUrlScheme(source)) return source+ val fragmentIndex = baseUrl.indexOf('#')+ val base = if (fragmentIndex >= 0) baseUrl.substring(0, fragmentIndex) else baseUrl+ val fragment = if (fragmentIndex >= 0) baseUrl.substring(fragmentIndex) else ""+ val baseHasQuery = base.contains('?')+ val appended = when {+ source.startsWith('?') && baseHasQuery -> base + "&" + source.drop(1)+ source.startsWith('&') && baseHasQuery -> base + source+ source.startsWith('&') -> base + "?" + source.drop(1)+ source.startsWith('?') -> base + source+ baseHasQuery -> "$base&$source"+ else -> "$base?$source"+ }+ return appended + fragment+}++private fun buildFlussonicCatchUpUrl(liveUrl: String, start: Long, now: Long): String? {+ val uri = runCatching { URI(liveUrl) }.getOrNull() ?: return null+ if (uri.rawAuthority.isNullOrBlank()) return null+ val path = uri.rawPath?.takeIf(String::isNotBlank) ?: return null+ val lastSegment = path.substringAfterLast('/')+ val isHls = lastSegment.endsWith(".m3u8", ignoreCase = true)+ val extension = lastSegment.substringAfterLast('.', "ts").takeIf { it.isNotBlank() } ?: "ts"+ val streamPath = when {+ lastSegment.equals("index.m3u8", ignoreCase = true) -> path.substringBeforeLast('/')+ lastSegment.equals("index.ts", ignoreCase = true) -> path.substringBeforeLast('/')+ else -> path.substringBeforeLast('/').trimEnd('/') + "/" + lastSegment.substringBeforeLast('.', lastSegment)+ }.trimEnd('/')+ val archiveName = if (isHls) {+ "timeshift_rel-${(now - start).coerceAtLeast(0L)}.m3u8"+ } else {+ "timeshift_abs-$start.$extension"+ }+ return rebuildUri(uri, "$streamPath/$archiveName")+}++private fun buildXtreamCatchUpUrl(liveUrl: String, start: Long, end: Long): String? {+ val uri = runCatching { URI(liveUrl) }.getOrNull() ?: return null+ if (uri.rawAuthority.isNullOrBlank()) return null+ val pathSegments = uri.rawPath.orEmpty().split('/').filter(String::isNotBlank)+ if (pathSegments.size < 3) return null++ val liveIndex = pathSegments.indexOfLast { it.equals("live", ignoreCase = true) }+ val credentialIndex = if (liveIndex >= 0) liveIndex + 1 else pathSegments.size - 3+ if (credentialIndex < 0 || pathSegments.size - credentialIndex < 3) return null+ val username = pathSegments[credentialIndex]+ val password = pathSegments[credentialIndex + 1]+ val streamToken = pathSegments[credentialIndex + 2]+ val streamId = streamToken.substringBeforeLast('.', streamToken)+ if (streamId.isBlank()) return null+ val extension = streamToken.substringAfterLast('.', "ts").takeIf(String::isNotBlank) ?: "ts"+ val prefix = pathSegments.take(if (liveIndex >= 0) liveIndex else credentialIndex)+ val durationMinutes = ((end - start) / 60L).coerceAtLeast(1L)+ val startText = Instant.ofEpochSecond(start)+ .atZone(ZoneOffset.UTC)+ .format(DateTimeFormatter.ofPattern("yyyy-MM-dd:HH-mm", Locale.ROOT))+ val catchUpPath = (prefix + listOf("timeshift", username, password, durationMinutes.toString(), startText, "$streamId.$extension"))+ .joinToString(separator = "/", prefix = "/")+ return rebuildUri(uri, catchUpPath)+}++private fun rebuildUri(uri: URI, path: String): String = buildString {+ append(uri.scheme).append("://").append(uri.rawAuthority).append(path)+ uri.rawQuery?.let { append('?').append(it) }+ uri.rawFragment?.let { append('#').append(it) }+}++private fun hasUrlScheme(value: String): Boolean =+ Regex("^[A-Za-z][A-Za-z0-9+.-]*://").containsMatchIn(value)++private val APPEND_MODES = setOf("", "default", "append")+private val SHIFT_MODES = setOf("shift", "timeshift")+private val FLUSSONIC_MODES = setOf("fs", "flussonic")+private val XTREAM_MODES = setOf("xc", "xc60", "xtream", "xtream-codes")diff --git a/data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt b/data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.ktindex b5e99edb..38aaf0a6 100644--- a/data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt+++ b/data/src/main/java/com/streamvault/data/repository/ProviderRepositoryImpl.kt@@ -1941,7 +1941,10 @@ class ProviderRepositoryImpl @Inject constructor(start = start,end = end,sourceStreamUrl = channel?.streamUrl,- sourceCatchUpTemplate = channel?.catchUpSource+ sourceCatchUpTemplate = channel?.catchUpSource,+ sourceCatchUpType = channel?.catchUpType,+ catchUpCorrectionSeconds = channel?.catchUpCorrectionSeconds ?: 0,+ fallbackCatchUpTemplate = preferencesRepository.m3uCatchUpQueryFormat.first()))}@@ -2371,41 +2374,12 @@ private fun com.streamvault.data.remote.stalker.StalkerProviderProfile}internal fun buildM3uCatchUpUrls(source: String, start: Long, end: Long): List<String> {- val trimmedSource = source.trim()- if (trimmedSource.isBlank()) return emptyList()-- val durationSeconds = (end - start).coerceAtLeast(0L)- val durationMinutes = (durationSeconds / 60L).coerceAtLeast(1L)- val startDate = java.time.Instant.ofEpochSecond(start).atZone(java.time.ZoneOffset.UTC)- val endDate = java.time.Instant.ofEpochSecond(end).atZone(java.time.ZoneOffset.UTC)- val compactStart = startDate.format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))- val compactEnd = endDate.format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMddHHmmss"))-- val replacements = linkedMapOf(- "{start}" to start.toString(),- "{end}" to end.toString(),- "{duration}" to durationSeconds.toString(),- "{duration_seconds}" to durationSeconds.toString(),- "{duration_minutes}" to durationMinutes.toString(),- "{utc}" to start.toString(),- "{utcend}" to end.toString(),- "{lutc}" to end.toString(),- "{timestamp}" to start.toString(),- "{Y}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("yyyy")),- "{m}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("MM")),- "{d}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("dd")),- "{H}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("HH")),- "{M}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("mm")),- "{S}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("ss")),- "{Ymd}" to startDate.format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd")),- "{YmdHis}" to compactStart,- "{utc:yyyyMMddHHmmss}" to compactStart,- "{utcend:yyyyMMddHHmmss}" to compactEnd+ return buildM3uCatchUpUrls(+ source = source,+ streamUrl = null,+ catchUpType = "default",+ start = start,+ end = end,+ correctionSeconds = 0)-- val expanded = replacements.entries.fold(trimmedSource) { current, (placeholder, value) ->- current.replace(placeholder, value)- }-- return listOf(expanded).distinct()}diff --git a/data/src/main/java/com/streamvault/data/sync/SyncCatalogStore.kt b/data/src/main/java/com/streamvault/data/sync/SyncCatalogStore.ktindex 245d49d7..9b9a58f3 100644--- a/data/src/main/java/com/streamvault/data/sync/SyncCatalogStore.kt+++ b/data/src/main/java/com/streamvault/data/sync/SyncCatalogStore.kt@@ -861,6 +861,8 @@ internal class SyncCatalogStore(catchUpSupported = channel.catchUpSupported,catchUpDays = channel.catchUpDays,catchUpSource = channel.catchUpSource,+ catchUpType = channel.catchUpType,+ catchUpCorrectionSeconds = channel.catchUpCorrectionSeconds,isAdult = channel.isAdult,logicalGroupId = channel.logicalGroupId,errorCount = channel.errorCount,@@ -1138,6 +1140,8 @@ internal class SyncCatalogStore(channel.number.toString(),channel.catchUpSupported.toString(),channel.catchUpDays.toString(),+ channel.catchUpType.orEmpty(),+ channel.catchUpCorrectionSeconds.toString(),channel.isAdult.toString(),normalizeText(xtreamLiveToken.containerExtension),M3uPlaybackMetadataCodec.fingerprint(channel.playbackMetadataJson)@@ -1155,6 +1159,8 @@ internal class SyncCatalogStore(channel.catchUpSupported.toString(),channel.catchUpDays.toString(),normalizeUrl(channel.catchUpSource),+ channel.catchUpType.orEmpty(),+ channel.catchUpCorrectionSeconds.toString(),channel.isAdult.toString(),M3uPlaybackMetadataCodec.fingerprint(channel.playbackMetadataJson))diff --git a/data/src/main/java/com/streamvault/data/sync/SyncManagerM3uImporter.kt b/data/src/main/java/com/streamvault/data/sync/SyncManagerM3uImporter.ktindex 12f86c12..47974934 100644--- a/data/src/main/java/com/streamvault/data/sync/SyncManagerM3uImporter.kt+++ b/data/src/main/java/com/streamvault/data/sync/SyncManagerM3uImporter.kt@@ -39,6 +39,22 @@ private const val M3U_SERIES_RECONCILIATION_PAGE_SIZE = 2_048private const val M3U_MAX_SERIES_CATEGORY_QUERY_IDS = 900private const val M3U_IMPORTER_TAG = "SyncManagerM3u"+private fun sanitizeCatchUpSource(source: String?, catchUpType: String?): String? {+ val value = source?.trim().orEmpty()+ if (value.isEmpty() || value.length > 8_192) return null+ if (value.any { it == '\r' || it == '\n' || it == '\t' }) return null++ // Append-mode sources are query fragments, not standalone URLs. Preserve them after+ // validating that they cannot inject another scheme or a control separator.+ if (value.startsWith('?') || value.startsWith('&')) {+ val mode = catchUpType?.trim()?.lowercase().orEmpty()+ return value.takeIf { mode.isEmpty() || mode in setOf("default", "append", "shift", "timeshift") }+ }++ val validationValue = value.replace(Regex("\\$?\\{[^}]{1,64}}"), "catchup-token")+ return value.takeIf { UrlSecurityPolicy.isAllowedStreamEntryUrl(validationValue) }+}+internal class SyncManagerM3uImporter(private val m3uParser: M3uParser,private val okHttpClient: OkHttpClient,@@ -156,6 +172,7 @@ internal class SyncManagerM3uImporter(entry.tvgLanguage,entry.tvgCountry,entry.catchUp,+ entry.catchUpType,entry.catchUpSource,entry.timeshift,entry.url,@@ -188,7 +205,7 @@ internal class SyncManagerM3uImporter(}val safeLogoUrl = UrlSecurityPolicy.sanitizeImportedAssetUrl(entry.tvgLogo)- val safeCatchUpSource = UrlSecurityPolicy.sanitizeImportedAssetUrl(entry.catchUpSource)+ val safeCatchUpSource = sanitizeCatchUpSource(entry.catchUpSource, entry.catchUpType)val playbackMetadataJson = entry.playbackMetadata?.let(M3uPlaybackMetadataCodec::encode)val sourceKey = M3uSourceIdentity.fromEntry(provider.id, entry)@@ -220,6 +237,8 @@ internal class SyncManagerM3uImporter(!entry.timeshift.isNullOrBlank(),catchUpDays = entry.catchUpDays ?: 0,catchUpSource = safeCatchUpSource,+ catchUpType = entry.catchUpType,+ catchUpCorrectionSeconds = entry.catchUpCorrectionSeconds,providerId = provider.id,isAdult = AdultContentClassifier.isAdultCategoryName(groupTitle),playbackMetadataJson = playbackMetadataJson@@ -302,6 +321,8 @@ internal class SyncManagerM3uImporter(!entry.timeshift.isNullOrBlank(),catchUpDays = entry.catchUpDays ?: 0,catchUpSource = safeCatchUpSource,+ catchUpType = entry.catchUpType,+ catchUpCorrectionSeconds = entry.catchUpCorrectionSeconds,providerId = provider.id,isAdult = isAdult,playbackMetadataJson = playbackMetadataJsondiff --git a/data/src/test/java/com/streamvault/data/parser/M3uParserTest.kt b/data/src/test/java/com/streamvault/data/parser/M3uParserTest.ktindex 8c8d09a0..06e378df 100644--- a/data/src/test/java/com/streamvault/data/parser/M3uParserTest.kt+++ b/data/src/test/java/com/streamvault/data/parser/M3uParserTest.kt@@ -407,6 +407,46 @@ class M3uParserTest {}}+ @Test+ fun `parse_catchUpTypeCorrectionAndLegacyTimeshift`() {+ val result = parser.parse(+ """+ #EXTM3U catchup-correction="-2.5"+ #EXTINF:-1 catchup-type="shift" catchup-days="7" catchup-correction="1.25",Shift Channel+ https://stream.example.com/shift.ts+ #EXTINF:-1 timeshift="3",Legacy Channel+ https://stream.example.com/legacy.ts+ """.trimIndent().byteInputStream()+ )++ assertThat(result.header.catchUpCorrectionSeconds).isEqualTo(-9_000)+ assertThat(result.entries).hasSize(2)+ with(result.entries[0]) {+ assertThat(catchUpType).isEqualTo("shift")+ assertThat(catchUpDays).isEqualTo(7)+ assertThat(catchUpCorrectionSeconds).isEqualTo(4_500)+ }+ with(result.entries[1]) {+ assertThat(catchUpType).isEqualTo("shift")+ assertThat(catchUpDays).isEqualTo(3)+ assertThat(catchUpCorrectionSeconds).isEqualTo(-9_000)+ }++ val channels = parser.parseToChannels(+ """+ #EXTM3U catchup-correction="-2.5"+ #EXTINF:-1 catchup-type="shift" catchup-days="7",Shift Channel+ https://stream.example.com/shift.ts+ #EXTINF:-1 timeshift="3",Legacy Channel+ https://stream.example.com/legacy.ts+ """.trimIndent().byteInputStream(),+ providerId = 9L+ )+ assertThat(channels.map { it.catchUpType }).containsExactly("shift", "shift").inOrder()+ assertThat(channels.map { it.catchUpDays }).containsExactly(7, 3).inOrder()+ assertThat(channels.map { it.catchUpCorrectionSeconds }).containsExactly(-9_000, -9_000).inOrder()+ }+@Testfun `parseToChannels_marksCatchUpSupported_whenOnlyCatchUpSourceExists`() {val channels = parser.parseToChannels(diff --git a/data/src/test/java/com/streamvault/data/preferences/M3uCatchUpQueryPreferenceTest.kt b/data/src/test/java/com/streamvault/data/preferences/M3uCatchUpQueryPreferenceTest.ktnew file mode 100644index 00000000..da55f1e8--- /dev/null+++ b/data/src/test/java/com/streamvault/data/preferences/M3uCatchUpQueryPreferenceTest.kt@@ -0,0 +1,57 @@+package com.streamvault.data.preferences++import android.content.Context+import androidx.datastore.preferences.preferencesDataStoreFile+import com.google.common.truth.Truth.assertThat+import com.streamvault.domain.provider.DEFAULT_M3U_CATCH_UP_QUERY_FORMAT+import kotlinx.coroutines.flow.first+import kotlinx.coroutines.runBlocking+import org.junit.After+import org.junit.Before+import org.junit.Test+import org.junit.runner.RunWith+import org.mockito.kotlin.mock+import org.robolectric.RobolectricTestRunner+import org.robolectric.RuntimeEnvironment++@RunWith(RobolectricTestRunner::class)+class M3uCatchUpQueryPreferenceTest {+ private lateinit var context: Context++ @Before+ fun setUp() {+ context = RuntimeEnvironment.getApplication()+ context.preferencesDataStoreFile("user_preferences").delete()+ }++ @After+ fun tearDown() {+ context.preferencesDataStoreFile("user_preferences").delete()+ }++ @Test+ fun defaultIsUsedAndCustomFormatPersists() = runBlocking {+ val preferences = repository()++ assertThat(preferences.m3uCatchUpQueryFormat.first()).isEqualTo(DEFAULT_M3U_CATCH_UP_QUERY_FORMAT)+ preferences.setM3uCatchUpQueryFormat(" &from={utc}&until={utcend} ")+ assertThat(preferences.m3uCatchUpQueryFormat.first()).isEqualTo("&from={utc}&until={utcend}")+ }++ @Test+ fun blankFormatResetsToDefault() = runBlocking {+ val preferences = repository()+ preferences.setM3uCatchUpQueryFormat("&from={utc}")+ preferences.setM3uCatchUpQueryFormat(" ")++ assertThat(preferences.m3uCatchUpQueryFormat.first()).isEqualTo(DEFAULT_M3U_CATCH_UP_QUERY_FORMAT)+ }++ private fun repository() = PreferencesRepository(+ context = context,+ channelPreferenceDao = mock(),+ playbackQualityPreferenceDao = mock(),+ searchHistoryDao = mock(),+ corruptionRecovery = mock()+ )+}diff --git a/data/src/test/java/com/streamvault/data/provider/ProductionProviderCapabilityFactoriesTest.kt b/data/src/test/java/com/streamvault/data/provider/ProductionProviderCapabilityFactoriesTest.ktindex 9365a813..4c702663 100644--- a/data/src/test/java/com/streamvault/data/provider/ProductionProviderCapabilityFactoriesTest.kt+++ b/data/src/test/java/com/streamvault/data/provider/ProductionProviderCapabilityFactoriesTest.kt@@ -24,6 +24,7 @@ import com.streamvault.domain.model.StalkerObservationSourceimport com.streamvault.domain.model.StalkerPortalLearningimport com.streamvault.domain.model.XtreamConfigimport com.streamvault.domain.provider.CapabilityResolution+import com.streamvault.domain.provider.CatchUpRequestimport com.streamvault.domain.provider.PlaybackResolverimport com.streamvault.domain.provider.PlaybackRequestimport com.streamvault.domain.provider.ProviderContentReference@@ -42,6 +43,29 @@ class ProductionProviderCapabilityFactoriesTest {private val movieDao: MovieDao = mock()private val programDao: ProgramDao = mock()+ @Test+ fun `M3U adapter builds catch-up URL from channel metadata and configured fallback`() = runTest {+ val provider = snapshot(ProviderType.M3U, M3uConfig("https://playlist.test/channels.m3u"))+ val capabilitySet = M3uCapabilityFactory(categoryDao, channelDao, movieDao, programDao).create(provider)+ val catchUp = (capabilitySet.catchUp() as CapabilityResolution.Available).capability++ val urls = catchUp.buildCatchUpUrls(+ CatchUpRequest(+ streamId = 42L,+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ sourceStreamUrl = "https://live.test/channel.ts?token=abc",+ sourceCatchUpType = "default",+ catchUpCorrectionSeconds = 3_600,+ fallbackCatchUpTemplate = "&from={utc}&to={utcend}&minutes={duration:60}"+ )+ )++ assertThat(urls).containsExactly(+ "https://live.test/channel.ts?token=abc&from=1710003600&to=1710007200&minutes=60"+ )+ }+@Test fun `Xtream live identity preserves every generated archive time range even on stable renewal`() = runTest {val config = XtreamConfig("https://archive.test/base", "user name", "pass/word",httpUserAgent = "ArchiveTest/1", httpHeaders = "X-Archive: validation")diff --git a/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryCatchUpTest.kt b/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryCatchUpTest.ktindex 37c2f65d..3719d89e 100644--- a/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryCatchUpTest.kt+++ b/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryCatchUpTest.kt@@ -17,4 +17,144 @@ class ProviderRepositoryCatchUpTest {"http://catchup.example.com/archive/1710000000/1710003600/2024/03/09/16/00/00/60.m3u8")}++ @Test+ fun `append mode adds its expanded query to the live URL and applies correction`() {+ val nowBefore = System.currentTimeMillis() / 1_000L+ val urls = buildM3uCatchUpUrls(+ source = "&from={utc}&to={utcend}&now={lutc}",+ streamUrl = "https://live.example.com/channel.ts?token=abc",+ catchUpType = "append",+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 1_800+ )+ val nowAfter = System.currentTimeMillis() / 1_000L++ assertThat(urls).hasSize(1)+ assertThat(urls.single()).startsWith("https://live.example.com/channel.ts?token=abc&from=1710001800&to=1710005400&now=")+ val generatedNow = urls.single().substringAfter("&now=").toLong()+ assertThat(generatedNow).isAtLeast(nowBefore + 1_800L)+ assertThat(generatedNow).isAtMost(nowAfter + 1_800L)+ }++ @Test+ fun `default mode uses the configured query format when source is missing`() {+ val nowBefore = System.currentTimeMillis() / 1_000L+ val start = nowBefore - 7_200L+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://live.example.com/channel.ts",+ catchUpType = "default",+ start = start,+ end = start + 3_600L,+ correctionSeconds = 3_600,+ fallbackTemplate = "?from={utc}&minutes={duration:60}&offset={offset:60}&now={lutc}"+ )+ val nowAfter = System.currentTimeMillis() / 1_000L++ assertThat(urls).hasSize(1)+ val query = urls.single().substringAfter('?').split('&').associate {+ it.substringBefore('=') to it.substringAfter('=')+ }+ assertThat(query["from"]).isEqualTo((start + 3_600L).toString())+ assertThat(query["minutes"]).isEqualTo("60")+ assertThat(query["offset"]!!.toLong()).isAtLeast((nowBefore - start) / 60L)+ assertThat(query["offset"]!!.toLong()).isAtMost((nowAfter - start) / 60L)+ assertThat(query["now"]!!.toLong()).isAtLeast(nowBefore + 3_600L)+ assertThat(query["now"]!!.toLong()).isAtMost(nowAfter + 3_600L)+ }++ @Test+ fun `empty configured query format disables default and append fallback`() {+ for (mode in listOf("default", "append")) {+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://live.example.com/channel.ts",+ catchUpType = mode,+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 0,+ fallbackTemplate = ""+ )++ assertThat(urls).isEmpty()+ }+ }++ @Test+ fun `shift mode synthesizes SIPTV parameters on the live URL`() {+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://live.example.com/channel.ts",+ catchUpType = "shift",+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 0+ )++ assertThat(urls).hasSize(1)+ assertThat(urls.single()).startsWith("https://live.example.com/channel.ts?utc=1710000000&lutc=")+ }++ @Test+ fun `Flussonic HLS mode builds a relative timeshift path`() {+ val now = System.currentTimeMillis() / 1_000L+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://flussonic.example.com/news/index.m3u8?token=abc",+ catchUpType = "fs",+ start = now - 3_600L,+ end = now - 1_800L,+ correctionSeconds = 0+ )++ assertThat(urls).hasSize(1)+ assertThat(urls.single()).contains("/news/timeshift_rel-")+ assertThat(urls.single()).endsWith(".m3u8?token=abc")+ }++ @Test+ fun `Xtream mode builds its timeshift endpoint from the live URL`() {+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://xc.example.com:8080/live/user/pass/42.ts",+ catchUpType = "xc",+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 0+ )++ assertThat(urls).containsExactly(+ "https://xc.example.com:8080/timeshift/user/pass/60/2024-03-09:16-00/42.ts"+ )+ }++ @Test+ fun `unknown mode without a template does not create a candidate`() {+ val urls = buildM3uCatchUpUrls(+ source = null,+ streamUrl = "https://live.example.com/channel.ts",+ catchUpType = "unknown-mode",+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 0+ )++ assertThat(urls).isEmpty()+ }++ @Test+ fun `catchup id templates do not return unresolved replay URLs`() {+ val urls = buildM3uCatchUpUrls(+ source = "https://archive.example.com/program/{catchup-id}.m3u8",+ streamUrl = "https://live.example.com/channel.ts",+ catchUpType = "vod",+ start = 1_710_000_000L,+ end = 1_710_003_600L,+ correctionSeconds = 0+ )++ assertThat(urls).isEmpty()+ }}diff --git a/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryImplTest.kt b/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryImplTest.ktindex d3d86b34..c96d429f 100644--- a/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryImplTest.kt+++ b/data/src/test/java/com/streamvault/data/repository/ProviderRepositoryImplTest.kt@@ -42,6 +42,10 @@ import com.streamvault.data.security.CredentialCryptoimport com.streamvault.data.provider.ProviderConfigurationCodecimport com.streamvault.data.provider.ProviderCapabilityResolverimport com.streamvault.data.provider.TypedProviderClientFactory+import com.streamvault.domain.provider.CapabilityResolution+import com.streamvault.domain.provider.CatchUpRequest+import com.streamvault.domain.provider.CatchUpSource+import com.streamvault.domain.provider.ProviderCapabilitySetimport com.streamvault.data.remote.stalker.StalkerPortalStateStoreimport com.streamvault.data.remote.stalker.StalkerRemoteIdentityResolverimport com.streamvault.data.provider.toProviderSnapshot@@ -209,6 +213,45 @@ class ProviderRepositoryImplTest {}}+ @Test+ fun `M3U archive request receives persisted channel metadata and saved query format`() = runTest {+ val channel = ChannelEntity(+ id = 42L,+ streamId = 42L,+ name = "Archive channel",+ streamUrl = "https://live.test/channel.ts",+ catchUpSupported = true,+ catchUpDays = 5,+ catchUpType = "append",+ catchUpCorrectionSeconds = 1_800,+ providerId = 7L+ )+ whenever(providerDao.getById(7L)).thenReturn(ProviderEntity(id = 7L, name = "M3U", type = ProviderType.M3U))+ whenever(channelDao.getById(42L)).thenReturn(channel)+ whenever(preferencesRepository.m3uCatchUpQueryFormat).thenReturn(flowOf("&from={utc}"))++ var captured: CatchUpRequest? = null+ val catchUp = object : CatchUpSource {+ override suspend fun buildCatchUpUrl(streamId: Long, start: Long, end: Long): String? = null++ override suspend fun buildCatchUpUrls(request: CatchUpRequest): List<String> {+ captured = request+ return listOf("https://archive.test/program.m3u8")+ }+ }+ val capabilities = mock<ProviderCapabilitySet>()+ whenever(capabilities.catchUp()).thenReturn(CapabilityResolution.Available(catchUp))+ whenever(providerCapabilityResolver.resolve(7L)).thenReturn(CapabilityResolution.Available(capabilities))++ val urls = repository.buildCatchUpUrls(7L, 42L, 1_710_000_000L, 1_710_003_600L)++ assertThat(urls).containsExactly("https://archive.test/program.m3u8")+ assertThat(captured?.sourceStreamUrl).isEqualTo("https://live.test/channel.ts")+ assertThat(captured?.sourceCatchUpType).isEqualTo("append")+ assertThat(captured?.catchUpCorrectionSeconds).isEqualTo(1_800)+ assertThat(captured?.fallbackCatchUpTemplate).isEqualTo("&from={utc}")+ }+@Testfun `redacted settings update preserves the stored typed credential`() = runTest {whenever(credentialCrypto.decryptIfNeeded(any())).thenAnswer { invocation ->diff --git a/data/src/test/java/com/streamvault/data/sync/SyncCatalogStoreTest.kt b/data/src/test/java/com/streamvault/data/sync/SyncCatalogStoreTest.ktindex 76cb28a5..0b28c51f 100644--- a/data/src/test/java/com/streamvault/data/sync/SyncCatalogStoreTest.kt+++ b/data/src/test/java/com/streamvault/data/sync/SyncCatalogStoreTest.kt@@ -364,6 +364,34 @@ class SyncCatalogStoreTest {assertThat(fingerprints.first()).isEqualTo(fingerprints.last())}+ @Test+ fun `stageChannelBatch persists and fingerprints M3U catch-up mode and correction`() = runTest {+ val providerId = 7L+ val baseChannel = ChannelEntity(+ streamId = 778L,+ name = "Archive News",+ streamUrl = "https://stream.example.test/live/archive-news.m3u8",+ catchUpSupported = true,+ catchUpSource = "https://archive.example.test/{utc}/{duration}",+ catchUpType = "append",+ catchUpCorrectionSeconds = 3_600,+ providerId = providerId+ )++ val store = store()+ store.stageChannelBatch(providerId, 90L, listOf(baseChannel))+ store.stageChannelBatch(providerId, 91L, listOf(baseChannel.copy(catchUpType = "shift")))+ store.stageChannelBatch(providerId, 92L, listOf(baseChannel.copy(catchUpCorrectionSeconds = 7_200)))++ val insertedStages = argumentCaptor<List<ChannelImportStageEntity>>()+ verify(catalogSyncDao, org.mockito.kotlin.times(3)).insertChannelStages(insertedStages.capture())+ val stages = insertedStages.allValues.map { it.single() }++ assertThat(stages.first().catchUpType).isEqualTo("append")+ assertThat(stages.first().catchUpCorrectionSeconds).isEqualTo(3_600)+ assertThat(stages.map { it.syncFingerprint }.distinct()).hasSize(3)+ }+@Testfun `stageSeriesBatch preserves provider identity and metadata needed by staged apply`() = runTest {val providerId = 7Ldiff --git a/docs/CATCH_UP_SUPPORT_REVIEW.md b/docs/CATCH_UP_SUPPORT_REVIEW.mdnew file mode 100644index 00000000..15b46088--- /dev/null+++ b/docs/CATCH_UP_SUPPORT_REVIEW.md@@ -0,0 +1,56 @@+# Catch-up Support Findings and Plan++**Review date:** 2026-10-30+**Status:** The implementation plan is complete. Provider-backed archive playback remains an environment-dependent smoke check.++## Findings++### The archive playback flow exists++Choosing a guide programme sends its start and end times to the provider repository. The repository builds replay URL candidates, which then use the normal player recovery path. The existing flow is programme based; there is no guide-free timestamp entry flow.++### Xtream and Stalker use provider-specific replay paths++- Xtream reads its archive flag and window and builds timeshift URLs.+- Stalker builds archive requests from its internal stream token and the selected programme interval.+- Stalker still requires a provider-marked archive programme when it has no reported archive window.++### M3U metadata and URL modes were incomplete++The parser read catch-up attributes, but the channel and sync persistence path dropped the mode and correction value. Numeric legacy `timeshift` values were not used as the archive window. URL generation expanded only a full source template, so it missed append/default query formats, SIPTV shift requests, Flussonic paths, and Xtream-style paths.++The default and append modes also need a provider-specific query format when a playlist does not include `catchup-source`. A fixed UTC query cannot fit every provider.++### Unknown windows blocked some advertised archives++An M3U or Xtream channel with an explicit replay mechanism and no reported day count could not play an ordinary past guide entry unless the entry itself carried an archive flag.++## Implementation completed++- Preserve M3U catch-up mode and correction seconds through parsing, channel models, sync staging, projections, and Room persistence. The database is version 90 with a migration from version 89.+- Parse `catchup` and `catchup-type`, numeric legacy `timeshift`, and channel-level or playlist-level correction values.+- Build and expand full templates, append/default query fragments, SIPTV shift, Flussonic, and Xtream-style paths. Support programme start/end, current time, date, duration, and offset tokens, while applying catch-up correction.+- Add an editable M3U fallback query format in Live TV settings. It defaults to `?utc={utc}&lutc={lutc}`, is used only when an entry has no source template, can be left blank to disable the fallback, and is included in settings backup and restore.+- Localize the new setting in all 38 advertised locales.+- Allow completed M3U and Xtream programmes when an explicit replay mechanism exists but the provider window is unknown. Keep Stalker’s provider-marked archive rule.+- Include M3U replay metadata in sync fingerprints so playlist changes are applied.+- Avoid offering unresolved `{catchup-id}` templates. Programme identifiers are not currently mapped from guide data.++## Decisions++- A single editable fallback query format is sufficient for this pass. Per-channel `catchup-source` values take precedence. A provider that needs another format can set the global fallback or supply its own source.+- Manual timestamp entry is a separate UI feature and is out of scope for programme-based archive playback.+- `catchup=vod` templates that require `{catchup-id}` are unsupported until the programme-specific identifier is parsed and persisted end to end.++## Validation completed++- Focused domain/data tests passed for archive eligibility, M3U parsing, configured query expansion, append/shift/Flussonic/Xtream URL construction, M3U capability-adapter URL generation, repository request wiring, preference persistence, backup classification, and sync-stage metadata/fingerprint propagation.+- Room migration instrumentation passed on the `Television_1080p` Android 16 emulator. It migrated a version 89 database containing provider, channel, and staged channel rows to version 90 and verified the new metadata columns and retained rows.+- `:feature:settings:testDebugUnitTest` passed.+- `:app:compileDebugKotlin` passed.+- XML resource validation found all three new keys in the default resources and each of the 37 translated locale directories.+- `git diff --check` passed.++## Provider playback smoke check++No provider credentials or working M3U archive fixture were available in this environment, so an actual provider response and decoded archive playback were not verified. The local tests verify the final candidate URLs and the app’s adapter/repository metadata flow, but they cannot confirm that a particular provider accepts those URLs. Run one archive programme against a known-good M3U provider before claiming provider-specific playback compatibility.diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.mdindex 7afd5cc1..6390646c 100644--- a/docs/CHANGELOG.md+++ b/docs/CHANGELOG.md@@ -11,6 +11,7 @@ All notable product changes are recorded in this document.- Added recognition of Brazilian Portuguese sports listings, including matchups, broadcast notes, and Brazilian and South American competitions.### Changed+- Improved M3U catch-up playback by preserving playlist replay modes and time corrections, supporting additional replay URL formats, and adding a configurable fallback query format. Eligible past guide programmes can now play when replay is advertised but the archive window is unspecified.- Channel, movie, series, and VOD category searches now ignore Latin accents (for example, “café” matches “cafe”). Existing catalogs upgrade automatically, with their content preserved.- Reduced HLS playback allocations and released obsolete live-stream cache data while preserving resources needed by playback and shared recordings.- Reduced background UI work during playback by stopping hidden playback controls from collecting state updates; reopening controls and open settings or chapter sheets continue receiving current values.diff --git a/domain/src/main/java/com/streamvault/domain/model/Channel.kt b/domain/src/main/java/com/streamvault/domain/model/Channel.ktindex 5a611466..5d9f71b4 100644--- a/domain/src/main/java/com/streamvault/domain/model/Channel.kt+++ b/domain/src/main/java/com/streamvault/domain/model/Channel.kt@@ -26,7 +26,9 @@ data class Channel(val qualityOptions: List<ChannelQualityOption> = emptyList(),val alternativeStreams: List<String> = emptyList(),val variants: List<LiveChannelVariant> = emptyList(),- val streamId: Long = 0L+ val streamId: Long = 0L,+ val catchUpType: String? = null,+ val catchUpCorrectionSeconds: Int = 0) {init {require(number >= 0) { "number must be non-negative" }@@ -67,6 +69,8 @@ data class Channel(catchUpSupported = selected.catchUpSupported,catchUpDays = selected.catchUpDays,catchUpSource = selected.catchUpSource,+ catchUpType = selected.catchUpType,+ catchUpCorrectionSeconds = selected.catchUpCorrectionSeconds,selectedVariantId = selected.rawChannelId,errorCount = selected.errorCount,qualityOptions = updatedQualityOptions,@@ -99,7 +103,9 @@ data class LiveChannelVariant(val catchUpDays: Int = 0,val catchUpSource: String? = null,val attributes: LiveChannelVariantAttributes = LiveChannelVariantAttributes(),- val observedQuality: LiveChannelObservedQuality = LiveChannelObservedQuality()+ val observedQuality: LiveChannelObservedQuality = LiveChannelObservedQuality(),+ val catchUpType: String? = null,+ val catchUpCorrectionSeconds: Int = 0) {init {require(number >= 0) { "number must be non-negative" }diff --git a/domain/src/main/java/com/streamvault/domain/playback/ArchivePlayback.kt b/domain/src/main/java/com/streamvault/domain/playback/ArchivePlayback.ktindex c67a1d16..4e1d65a1 100644--- a/domain/src/main/java/com/streamvault/domain/playback/ArchivePlayback.kt+++ b/domain/src/main/java/com/streamvault/domain/playback/ArchivePlayback.kt@@ -29,11 +29,17 @@ fun Channel.archivePlaybackCapability(): ArchivePlaybackCapability {val stream = streamUrl.trim().lowercase(Locale.ROOT)val source = catchUpSource?.trim().orEmpty()val normalizedSource = source.lowercase(Locale.ROOT)+ val normalizedType = catchUpType?.trim()?.lowercase(Locale.ROOT).orEmpty()val hasProviderContext = id > 0L && providerId > 0Lval hasXtreamReplayContext = stream.startsWith(XTREAM_INTERNAL_PREFIX) && streamId > 0Lval hasStalkerReplayContext =stream.startsWith(STALKER_INTERNAL_PREFIX) || normalizedSource.startsWith(STALKER_INTERNAL_PREFIX)- val hasM3uTemplate = source.isNotBlank() && !normalizedSource.startsWith(STALKER_INTERNAL_PREFIX)+ val needsUnmappedCatchUpId = Regex("\\$?\\{catchup-id}", RegexOption.IGNORE_CASE).containsMatchIn(source)+ val hasM3uTemplate = source.isNotBlank() && !needsUnmappedCatchUpId &&+ !normalizedSource.startsWith(STALKER_INTERNAL_PREFIX)+ val hasM3uAutoMode = normalizedType in setOf(+ "default", "append", "shift", "timeshift", "fs", "flussonic", "xc", "xc60", "xtream", "xtream-codes"+ ) && !stream.startsWith(STALKER_INTERNAL_PREFIX)val windowDays = catchUpDays.takeIf { it > 0 }return when {@@ -55,7 +61,7 @@ fun Channel.archivePlaybackCapability(): ArchivePlaybackCapability {advertisedByProvider = catchUpSupported,windowDays = windowDays)- hasM3uTemplate -> ArchivePlaybackCapability(+ hasM3uTemplate || hasM3uAutoMode -> ArchivePlaybackCapability(mechanism = ArchiveReplayMechanism.M3U_TEMPLATE,canBuildReplayCandidate = true,advertisedByProvider = catchUpSupported,@@ -86,9 +92,9 @@ fun Channel.isArchivePlayable(if (!capability.canBuildReplayCandidate) return falseif (program.hasArchive) return trueif (!catchUpSupported || program.endTime > now) return false- val windowDays = capability.windowDays?.takeIf { it > 0 } ?: return false-+ val windowDays = capability.windowDays?.takeIf { it > 0 }+ ?: return capability.mechanism == ArchiveReplayMechanism.XTREAM_STREAM_ID ||+ capability.mechanism == ArchiveReplayMechanism.M3U_TEMPLATEval catchUpWindowStart = now - (windowDays.toLong() * MILLIS_PER_DAY)-return program.startTime >= catchUpWindowStart}diff --git a/domain/src/main/java/com/streamvault/domain/provider/ProviderCapabilities.kt b/domain/src/main/java/com/streamvault/domain/provider/ProviderCapabilities.ktindex 92d94642..b7eb260b 100644--- a/domain/src/main/java/com/streamvault/domain/provider/ProviderCapabilities.kt+++ b/domain/src/main/java/com/streamvault/domain/provider/ProviderCapabilities.kt@@ -68,9 +68,14 @@ data class CatchUpRequest(val start: Long,val end: Long,val sourceStreamUrl: String? = null,- val sourceCatchUpTemplate: String? = null+ val sourceCatchUpTemplate: String? = null,+ val sourceCatchUpType: String? = null,+ val catchUpCorrectionSeconds: Int = 0,+ val fallbackCatchUpTemplate: String = DEFAULT_M3U_CATCH_UP_QUERY_FORMAT)+const val DEFAULT_M3U_CATCH_UP_QUERY_FORMAT = "?utc={utc}&lutc={lutc}"+enum class ProviderCapability {AUTHENTICATION,LIVE_CATALOG,diff --git a/domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.kt b/domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.ktindex f37447de..e0cb32fa 100644--- a/domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.kt+++ b/domain/src/main/java/com/streamvault/domain/settings/SettingsPreferences.kt@@ -139,6 +139,10 @@ interface SettingsPreferences {val playerTimeshiftBackend: Flow<TimeshiftBackendPreference>+ val m3uCatchUpQueryFormat: Flow<String>++ suspend fun setM3uCatchUpQueryFormat(format: String)+val defaultStopPlaybackTimerMinutes: Flow<Int>val defaultIdleStandbyTimerMinutes: Flow<Int>diff --git a/domain/src/test/java/com/streamvault/domain/playback/ArchivePlaybackTest.kt b/domain/src/test/java/com/streamvault/domain/playback/ArchivePlaybackTest.ktindex 5d65503b..57fdeee1 100644--- a/domain/src/test/java/com/streamvault/domain/playback/ArchivePlaybackTest.kt+++ b/domain/src/test/java/com/streamvault/domain/playback/ArchivePlaybackTest.kt@@ -156,6 +156,72 @@ class ArchivePlaybackTest {assertThat(channel.isArchivePlayable(archivedProgram, now)).isTrue()}+ @Test+ fun `catchup id template is not offered before programme identifiers are mapped`() {+ val now = 5 * 86_400_000L+ val channel = Channel(+ id = 42L,+ name = "News",+ providerId = 7L,+ streamUrl = "https://live.example.com/channel.m3u8",+ catchUpSupported = true,+ catchUpSource = "https://archive.example.com/program/{catchup-id}.m3u8",+ catchUpType = "vod"+ )+ val program = Program(+ channelId = "news",+ title = "Replay with identifier",+ startTime = now - 60_000L,+ endTime = now - 30_000L+ )++ assertThat(channel.isArchivePlayable(program, now)).isFalse()+ }++ @Test+ fun `unknown M3U catch-up window allows completed guide programme`() {+ val now = 5 * 86_400_000L+ val channel = Channel(+ id = 42L,+ name = "News",+ providerId = 7L,+ catchUpSupported = true,+ catchUpDays = 0,+ catchUpType = "shift",+ streamUrl = "https://live.example.com/news.ts"+ )+ val program = Program(+ channelId = "news",+ title = "Unmarked Bulletin",+ startTime = now - 60_000L,+ endTime = now - 30_000L+ )++ assertThat(channel.isArchivePlayable(program, now)).isTrue()+ }++ @Test+ fun `unknown Xtream catch-up window allows completed guide programme`() {+ val now = 5 * 86_400_000L+ val channel = Channel(+ id = 42L,+ name = "News",+ providerId = 7L,+ catchUpSupported = true,+ catchUpDays = 0,+ streamUrl = "xtream://7/live/42",+ streamId = 42L+ )+ val program = Program(+ channelId = "news",+ title = "Unmarked Bulletin",+ startTime = now - 60_000L,+ endTime = now - 30_000L+ )++ assertThat(channel.isArchivePlayable(program, now)).isTrue()+ }+@Testfun `capability classifies xtream stream id replay`() {val capability = Channel(diff --git a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlaybackSection.kt b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlaybackSection.ktindex 810f5d85..ee9d9230 100644--- a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlaybackSection.kt+++ b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsPlaybackSection.kt@@ -89,11 +89,13 @@ public fun LazyListScope.settingsPlaybackSection(item {val context = LocalContext.currentval liveStreamFormatMode by viewModel.playerLiveStreamFormatMode.collectAsStateWithLifecycle()+ val m3uCatchUpQueryFormat by viewModel.m3uCatchUpQueryFormat.collectAsStateWithLifecycle()var showQualityProfileDialog by rememberSaveable { mutableStateOf(false) }var showCustomQualityHeightDialog by rememberSaveable { mutableStateOf(false) }var showCustomQualityBitrateDialog by rememberSaveable { mutableStateOf(false) }var showWifiQualityBitrateDialog by rememberSaveable { mutableStateOf(false) }var showEthernetQualityBitrateDialog by rememberSaveable { mutableStateOf(false) }+ var showM3uCatchUpQueryFormatDialog by rememberSaveable { mutableStateOf(false) }val qualityProfileOptions = remember { PlaybackQualityProfile.entries }val customQualityHeightOptions = remember { listOf(null, 480, 720, 1080, 2160) }val customQualityBitrateOptions = remember { listOf(null, 2_000_000L, 4_000_000L, 8_000_000L) }@@ -123,6 +125,19 @@ public fun LazyListScope.settingsPlaybackSection(}}+ if (showM3uCatchUpQueryFormatDialog) {+ SimpleTextValueDialog(+ title = stringResource(R.string.settings_m3u_catchup_query_format),+ subtitle = stringResource(R.string.settings_m3u_catchup_query_format_subtitle),+ initialValue = m3uCatchUpQueryFormat,+ onDismiss = { showM3uCatchUpQueryFormatDialog = false },+ onConfirm = { format ->+ viewModel.setM3uCatchUpQueryFormat(format)+ showM3uCatchUpQueryFormatDialog = false+ }+ )+ }+if (showCustomQualityHeightDialog) {PremiumSelectionDialog(title = stringResource(R.string.settings_quality_custom_height),@@ -609,6 +624,20 @@ public fun LazyListScope.settingsPlaybackSection(onClick = { onShowTimeshiftBackendDialogChange(true) },modifier = if (targetItemId == "live.timeshift_backend") targetFocusModifier else Modifier,)+ ClickableSettingsRow(+ label = stringResource(R.string.settings_m3u_catchup_query_format),+ value = m3uCatchUpQueryFormat.ifBlank {+ stringResource(R.string.settings_m3u_catchup_query_format_disabled)+ },+ onClick = { showM3uCatchUpQueryFormatDialog = true },+ modifier = if (targetItemId == "live.m3u_catchup_query_format") targetFocusModifier else Modifier,+ )+ Text(+ text = stringResource(R.string.settings_m3u_catchup_query_format_subtitle),+ style = MaterialTheme.typography.bodySmall,+ color = OnBackground.copy(alpha = 0.6f),+ modifier = Modifier.padding(horizontal = 8.dp, vertical = 4.dp)+ )Text(text = stringResource(R.string.settings_live_timeshift_backend_subtitle),style = MaterialTheme.typography.bodySmall,diff --git a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsSearchSurface.kt b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsSearchSurface.ktindex 56158ea0..189d68be 100644--- a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsSearchSurface.kt+++ b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsSearchSurface.kt@@ -270,6 +270,7 @@ private fun resolvedSettingsCatalog(setting("live.timeshift_enabled", SettingsCategory.LIVE_TV, SettingsPage.TIMESHIFT, R.string.settings_live_timeshift),setting("live.timeshift_depth", SettingsCategory.LIVE_TV, SettingsPage.TIMESHIFT, R.string.settings_live_timeshift_depth),setting("live.timeshift_backend", SettingsCategory.LIVE_TV, SettingsPage.TIMESHIFT, R.string.settings_live_timeshift_backend),+ setting("live.m3u_catchup_query_format", SettingsCategory.LIVE_TV, SettingsPage.TIMESHIFT, R.string.settings_m3u_catchup_query_format, "archive query format"),setting("live.zap_auto_revert", SettingsCategory.LIVE_TV, SettingsPage.TIMESHIFT, R.string.settings_zap_auto_revert, "bad channel return"),setting("live.clock_enabled", SettingsCategory.LIVE_TV, SettingsPage.CLOCK, R.string.settings_live_clock),setting("live.clock_position", SettingsCategory.LIVE_TV, SettingsPage.CLOCK, R.string.settings_live_clock_position),diff --git a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.ktindex 4f1da32d..b5054048 100644--- a/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt+++ b/feature/settings/src/main/java/com/streamvault/feature/settings/presentation/SettingsViewModel.kt@@ -65,6 +65,7 @@ import com.streamvault.domain.model.EpgResolutionSummaryimport com.streamvault.domain.model.GuideSourcePolicyimport com.streamvault.domain.model.Resultimport com.streamvault.domain.model.TimeshiftBackendPreference+import com.streamvault.domain.provider.DEFAULT_M3U_CATCH_UP_QUERY_FORMATimport com.streamvault.domain.model.VirtualCategoryIdsimport com.streamvault.domain.model.VodVariantPreferenceModeimport com.streamvault.domain.usecase.ExportBackup@@ -162,6 +163,11 @@ class SettingsViewModel @Inject constructor(started = SharingStarted.WhileSubscribed(5_000),initialValue = LiveStreamFormatMode.AUTO)+ val m3uCatchUpQueryFormat: StateFlow<String> = preferencesRepository.m3uCatchUpQueryFormat.stateIn(+ viewModelScope,+ SharingStarted.WhileSubscribed(5_000),+ DEFAULT_M3U_CATCH_UP_QUERY_FORMAT+ )private val activeProviderIdFlow = providerRepository.getActiveProvider().map { it?.id }private val appUpdateActions = SettingsAppUpdateActions(appContext = application,@@ -971,6 +977,12 @@ class SettingsViewModel @Inject constructor(}}+ fun setM3uCatchUpQueryFormat(format: String) {+ viewModelScope.launch {+ preferencesRepository.setM3uCatchUpQueryFormat(format)+ }+ }+fun setPlayerLiveTranslationEnabled(enabled: Boolean) {viewModelScope.launch {preferencesRepository.setPlayerLiveTranslationEnabled(enabled)diff --git a/feature/settings/src/main/res/values-ar/strings.xml b/feature/settings/src/main/res/values-ar/strings.xmlindex 325f6bf6..2e6122d4 100644--- a/feature/settings/src/main/res/values-ar/strings.xml+++ b/feature/settings/src/main/res/values-ar/strings.xml@@ -968,4 +968,7 @@<string name="settings_epg_phone_qr_complete">تمت الإضافة</string><string name="settings_epg_phone_qr_error">خطأ</string><string name="settings_backup_export_sections">اختر الأقسام المراد تصديرها</string>+ <string name="settings_m3u_catchup_query_format">تنسيق استعلام الإعادة</string>+ <string name="settings_m3u_catchup_query_format_subtitle">يُستخدم لقنوات M3U التي لا تحتوي على مصدر إعادة خاص بها. اتركه فارغًا لتعطيل هذا البديل. مثال: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">معطّل</string></resources>diff --git a/feature/settings/src/main/res/values-bg/strings.xml b/feature/settings/src/main/res/values-bg/strings.xmlindex 1c0c430c..fb62ebea 100644--- a/feature/settings/src/main/res/values-bg/strings.xml+++ b/feature/settings/src/main/res/values-bg/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">Добавен</string><string name="settings_epg_phone_qr_error">Грешка</string><string name="settings_backup_export_sections">Изберете раздели за експортиране</string>+ <string name="settings_m3u_catchup_query_format">Формат на заявката за архивно предаване</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Използва се за M3U канали без собствен източник за архивно предаване. Оставете празно, за да изключите резервния формат. Пример: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Изключено</string></resources>diff --git a/feature/settings/src/main/res/values-cs/strings.xml b/feature/settings/src/main/res/values-cs/strings.xmlindex 925c1bf0..88b31d67 100644--- a/feature/settings/src/main/res/values-cs/strings.xml+++ b/feature/settings/src/main/res/values-cs/strings.xml@@ -962,4 +962,7 @@<string name="settings_epg_phone_qr_complete">Přidáno</string><string name="settings_epg_phone_qr_error">Chyba</string><string name="settings_backup_export_sections">Vyberte sekce k exportu</string>+ <string name="settings_m3u_catchup_query_format">Formát dotazu pro přehrávání archivu</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Použije se u kanálů M3U bez vlastního zdroje archivu. Prázdná hodnota tento záložní formát vypne. Příklad: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Vypnuto</string></resources>diff --git a/feature/settings/src/main/res/values-da/strings.xml b/feature/settings/src/main/res/values-da/strings.xmlindex fda10770..1d521ece 100644--- a/feature/settings/src/main/res/values-da/strings.xml+++ b/feature/settings/src/main/res/values-da/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Tilføjet</string><string name="settings_epg_phone_qr_error">Fejl</string><string name="settings_backup_export_sections">Vælg sektioner til eksport</string>+ <string name="settings_m3u_catchup_query_format">Format for catch-up-forespørgsel</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Bruges til M3U-kanaler uden deres egen catch-up-kilde. Lad feltet være tomt for at slå reserveformatet fra. Eksempel: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Deaktiveret</string></resources>diff --git a/feature/settings/src/main/res/values-de/strings.xml b/feature/settings/src/main/res/values-de/strings.xmlindex 5b7cb04c..c3e3bb2e 100644--- a/feature/settings/src/main/res/values-de/strings.xml+++ b/feature/settings/src/main/res/values-de/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">Hinzugefügt</string><string name="settings_epg_phone_qr_error">Fehler</string><string name="settings_backup_export_sections">Abschnitte zum Exportieren auswählen</string>+ <string name="settings_m3u_catchup_query_format">Format der Catch-up-Abfrage</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Wird für M3U-Kanäle ohne eigene Catch-up-Quelle verwendet. Leer lassen, um dieses Ersatzformat zu deaktivieren. Beispiel: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Deaktiviert</string></resources>diff --git a/feature/settings/src/main/res/values-el/strings.xml b/feature/settings/src/main/res/values-el/strings.xmlindex af36f1aa..cc1c8191 100644--- a/feature/settings/src/main/res/values-el/strings.xml+++ b/feature/settings/src/main/res/values-el/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Προστέθηκε</string><string name="settings_epg_phone_qr_error">Σφάλμα</string><string name="settings_backup_export_sections">Επιλέξτε ενότητες για εξαγωγή</string>+ <string name="settings_m3u_catchup_query_format">Μορφή ερωτήματος επανάληψης</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Χρησιμοποιείται για κανάλια M3U χωρίς δική τους πηγή επανάληψης. Αφήστε το κενό για να απενεργοποιήσετε αυτήν την εναλλακτική. Παράδειγμα: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Απενεργοποιημένο</string></resources>diff --git a/feature/settings/src/main/res/values-es/strings.xml b/feature/settings/src/main/res/values-es/strings.xmlindex ea3bc345..117c28f6 100644--- a/feature/settings/src/main/res/values-es/strings.xml+++ b/feature/settings/src/main/res/values-es/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">Añadido</string><string name="settings_epg_phone_qr_error">Error</string><string name="settings_backup_export_sections">Elige las secciones que quieres exportar</string>+ <string name="settings_m3u_catchup_query_format">Formato de consulta de reproducción diferida</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Se usa en canales M3U sin una fuente propia de reproducción diferida. Déjalo vacío para desactivar este formato alternativo. Ejemplo: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Desactivado</string></resources>diff --git a/feature/settings/src/main/res/values-fa/strings.xml b/feature/settings/src/main/res/values-fa/strings.xmlindex 10e1b95c..fa4222fc 100644--- a/feature/settings/src/main/res/values-fa/strings.xml+++ b/feature/settings/src/main/res/values-fa/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">افزوده شد</string><string name="settings_epg_phone_qr_error">خطا</string><string name="settings_backup_export_sections">بخشهای مورد نظر برای برونبری را انتخاب کنید</string>+ <string name="settings_m3u_catchup_query_format">قالب پرسوجوی بازپخش آرشیوی</string>+ <string name="settings_m3u_catchup_query_format_subtitle">برای کانالهای M3U بدون منبع بازپخش اختصاصی استفاده میشود. برای غیرفعال کردن این گزینه، آن را خالی بگذارید. نمونه: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">غیرفعال</string></resources>diff --git a/feature/settings/src/main/res/values-fi/strings.xml b/feature/settings/src/main/res/values-fi/strings.xmlindex 840b7d7e..29d18c99 100644--- a/feature/settings/src/main/res/values-fi/strings.xml+++ b/feature/settings/src/main/res/values-fi/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Lisätty</string><string name="settings_epg_phone_qr_error">Virhe</string><string name="settings_backup_export_sections">Valitse vietävät osiot</string>+ <string name="settings_m3u_catchup_query_format">Catch-up-kyselyn muoto</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Käytetään M3U-kanaville, joilla ei ole omaa catch-up-lähdettä. Poista varamuoto käytöstä jättämällä kenttä tyhjäksi. Esimerkki: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Ei käytössä</string></resources>diff --git a/feature/settings/src/main/res/values-fil/strings.xml b/feature/settings/src/main/res/values-fil/strings.xmlindex debf9ec7..7522ce06 100644--- a/feature/settings/src/main/res/values-fil/strings.xml+++ b/feature/settings/src/main/res/values-fil/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">Naidagdag</string><string name="settings_epg_phone_qr_error">Error</string><string name="settings_backup_export_sections">Piliin ang mga seksyong ie-export</string>+ <string name="settings_m3u_catchup_query_format">Format ng query para sa catch-up</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Ginagamit para sa mga M3U channel na walang sariling source ng catch-up. Iwanang blangko para i-disable ang fallback na ito. Halimbawa: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Naka-disable</string></resources>diff --git a/feature/settings/src/main/res/values-fr/strings.xml b/feature/settings/src/main/res/values-fr/strings.xmlindex 1f5e5fc8..460cd2a2 100644--- a/feature/settings/src/main/res/values-fr/strings.xml+++ b/feature/settings/src/main/res/values-fr/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Ajouté</string><string name="settings_epg_phone_qr_error">Erreur</string><string name="settings_backup_export_sections">Choisissez les sections à exporter</string>+ <string name="settings_m3u_catchup_query_format">Format de requête de rattrapage</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Utilisé pour les chaînes M3U sans source de rattrapage propre. Laissez le champ vide pour désactiver ce format de secours. Exemple : ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Désactivé</string></resources>diff --git a/feature/settings/src/main/res/values-hi/strings.xml b/feature/settings/src/main/res/values-hi/strings.xmlindex d5b946b9..87c9b309 100644--- a/feature/settings/src/main/res/values-hi/strings.xml+++ b/feature/settings/src/main/res/values-hi/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">जोड़ा गया</string><string name="settings_epg_phone_qr_error">त्रुटि</string><string name="settings_backup_export_sections">निर्यात करने के लिए अनुभाग चुनें</string>+ <string name="settings_m3u_catchup_query_format">कैच-अप क्वेरी प्रारूप</string>+ <string name="settings_m3u_catchup_query_format_subtitle">उन M3U चैनलों के लिए उपयोग किया जाता है जिनका अपना कैच-अप स्रोत नहीं है। इस वैकल्पिक प्रारूप को बंद करने के लिए खाली छोड़ें। उदाहरण: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">बंद</string></resources>diff --git a/feature/settings/src/main/res/values-hr/strings.xml b/feature/settings/src/main/res/values-hr/strings.xmlindex fd782f1c..4bf0300e 100644--- a/feature/settings/src/main/res/values-hr/strings.xml+++ b/feature/settings/src/main/res/values-hr/strings.xml@@ -957,4 +957,7 @@<string name="settings_epg_phone_qr_complete">Dodano</string><string name="settings_epg_phone_qr_error">Pogreška</string><string name="settings_backup_export_sections">Odaberite odjeljke za izvoz</string>+ <string name="settings_m3u_catchup_query_format">Format upita za reprodukciju arhive</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Koristi se za M3U kanale koji nemaju vlastiti izvor arhivske reprodukcije. Ostavite prazno da biste isključili ovaj zamjenski format. Primjer: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Isključeno</string></resources>diff --git a/feature/settings/src/main/res/values-hu/strings.xml b/feature/settings/src/main/res/values-hu/strings.xmlindex 44426cda..bda6c62a 100644--- a/feature/settings/src/main/res/values-hu/strings.xml+++ b/feature/settings/src/main/res/values-hu/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Hozzáadva</string><string name="settings_epg_phone_qr_error">Hiba</string><string name="settings_backup_export_sections">Válassza ki az exportálandó részeket</string>+ <string name="settings_m3u_catchup_query_format">Visszajátszási lekérdezés formátuma</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Azoknál az M3U-csatornáknál használatos, amelyeknek nincs saját visszajátszási forrásuk. Hagyja üresen a tartalék formátum kikapcsolásához. Példa: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Kikapcsolva</string></resources>diff --git a/feature/settings/src/main/res/values-in/strings.xml b/feature/settings/src/main/res/values-in/strings.xmlindex 55179e5a..d85f57e6 100644--- a/feature/settings/src/main/res/values-in/strings.xml+++ b/feature/settings/src/main/res/values-in/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Ditambahkan</string><string name="settings_epg_phone_qr_error">Kesalahan</string><string name="settings_backup_export_sections">Pilih bagian yang akan diekspor</string>+ <string name="settings_m3u_catchup_query_format">Format kueri tayangan ulang</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Digunakan untuk saluran M3U tanpa sumber tayangan ulang sendiri. Kosongkan untuk menonaktifkan format cadangan ini. Contoh: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Nonaktif</string></resources>diff --git a/feature/settings/src/main/res/values-it/strings.xml b/feature/settings/src/main/res/values-it/strings.xmlindex 68980417..cb0d10f6 100644--- a/feature/settings/src/main/res/values-it/strings.xml+++ b/feature/settings/src/main/res/values-it/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">Aggiunto</string><string name="settings_epg_phone_qr_error">Errore</string><string name="settings_backup_export_sections">Scegli le sezioni da esportare</string>+ <string name="settings_m3u_catchup_query_format">Formato query per la riproduzione d’archivio</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Usato per i canali M3U senza una propria sorgente di catch-up. Lascia vuoto per disattivare questo formato di riserva. Esempio: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Disattivato</string></resources>diff --git a/feature/settings/src/main/res/values-iw/strings.xml b/feature/settings/src/main/res/values-iw/strings.xmlindex 4a776ee5..ad962532 100644--- a/feature/settings/src/main/res/values-iw/strings.xml+++ b/feature/settings/src/main/res/values-iw/strings.xml@@ -959,4 +959,7 @@<string name="settings_epg_phone_qr_complete">נוסף</string><string name="settings_epg_phone_qr_error">שגיאה</string><string name="settings_backup_export_sections">בחרו אילו חלקים לייצא</string>+ <string name="settings_m3u_catchup_query_format">תבנית שאילתת צפייה בארכיון</string>+ <string name="settings_m3u_catchup_query_format_subtitle">משמשת לערוצי M3U ללא מקור צפייה בארכיון משלהם. יש להשאיר ריק כדי להשבית את תבנית הגיבוי הזו. לדוגמה: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">מושבת</string></resources>diff --git a/feature/settings/src/main/res/values-ja/strings.xml b/feature/settings/src/main/res/values-ja/strings.xmlindex d74c1de9..a03588a4 100644--- a/feature/settings/src/main/res/values-ja/strings.xml+++ b/feature/settings/src/main/res/values-ja/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">追加済み</string><string name="settings_epg_phone_qr_error">エラー</string><string name="settings_backup_export_sections">エクスポートする項目を選択</string>+ <string name="settings_m3u_catchup_query_format">キャッチアップクエリ形式</string>+ <string name="settings_m3u_catchup_query_format_subtitle">専用のキャッチアップソースがないM3Uチャンネルに使用します。この代替形式を無効にするには空欄にします。例: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">無効</string></resources>diff --git a/feature/settings/src/main/res/values-ko/strings.xml b/feature/settings/src/main/res/values-ko/strings.xmlindex 4b36b624..548d88ef 100644--- a/feature/settings/src/main/res/values-ko/strings.xml+++ b/feature/settings/src/main/res/values-ko/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">추가됨</string><string name="settings_epg_phone_qr_error">오류</string><string name="settings_backup_export_sections">내보낼 항목 선택</string>+ <string name="settings_m3u_catchup_query_format">캐치업 쿼리 형식</string>+ <string name="settings_m3u_catchup_query_format_subtitle">전용 캐치업 소스가 없는 M3U 채널에 사용됩니다. 이 대체 형식을 끄려면 비워 두세요. 예: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">사용 안 함</string></resources>diff --git a/feature/settings/src/main/res/values-mk/strings.xml b/feature/settings/src/main/res/values-mk/strings.xmlindex d406cc2d..420adbd0 100644--- a/feature/settings/src/main/res/values-mk/strings.xml+++ b/feature/settings/src/main/res/values-mk/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">Додадено</string><string name="settings_epg_phone_qr_error">Грешка</string><string name="settings_backup_export_sections">Изберете делови за извезување</string>+ <string name="settings_m3u_catchup_query_format">Формат на барање за архивска репродукција</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Се користи за M3U канали без сопствен извор за архивска репродукција. Оставете празно за да го исклучите овој резервен формат. Пример: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Исклучено</string></resources>diff --git a/feature/settings/src/main/res/values-ms/strings.xml b/feature/settings/src/main/res/values-ms/strings.xmlindex ea18a7ce..b54d794e 100644--- a/feature/settings/src/main/res/values-ms/strings.xml+++ b/feature/settings/src/main/res/values-ms/strings.xml@@ -951,4 +951,7 @@<string name="settings_epg_phone_qr_complete">Ditambah</string><string name="settings_epg_phone_qr_error">Ralat</string><string name="settings_backup_export_sections">Pilih bahagian untuk dieksport</string>+ <string name="settings_m3u_catchup_query_format">Format pertanyaan tontonan semula</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Digunakan untuk saluran M3U tanpa sumber tontonan semula sendiri. Biarkan kosong untuk mematikan format sandaran ini. Contoh: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Dimatikan</string></resources>diff --git a/feature/settings/src/main/res/values-nb/strings.xml b/feature/settings/src/main/res/values-nb/strings.xmlindex 6204c620..88be21a2 100644--- a/feature/settings/src/main/res/values-nb/strings.xml+++ b/feature/settings/src/main/res/values-nb/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Lagt til</string><string name="settings_epg_phone_qr_error">Feil</string><string name="settings_backup_export_sections">Velg seksjoner som skal eksporteres</string>+ <string name="settings_m3u_catchup_query_format">Format for catch-up-forespørsel</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Brukes for M3U-kanaler uten egen catch-up-kilde. La feltet stå tomt for å slå av reserveformatet. Eksempel: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Deaktivert</string></resources>diff --git a/feature/settings/src/main/res/values-nl/strings.xml b/feature/settings/src/main/res/values-nl/strings.xmlindex a5a5df32..a91f99a0 100644--- a/feature/settings/src/main/res/values-nl/strings.xml+++ b/feature/settings/src/main/res/values-nl/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Toegevoegd</string><string name="settings_epg_phone_qr_error">Fout</string><string name="settings_backup_export_sections">Kies onderdelen om te exporteren</string>+ <string name="settings_m3u_catchup_query_format">Formaat van de terugkijkquery</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Wordt gebruikt voor M3U-kanalen zonder eigen terugkijkbron. Laat dit leeg om dit reserveformaat uit te schakelen. Voorbeeld: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Uitgeschakeld</string></resources>diff --git a/feature/settings/src/main/res/values-pl/strings.xml b/feature/settings/src/main/res/values-pl/strings.xmlindex b9de4b77..29928e78 100644--- a/feature/settings/src/main/res/values-pl/strings.xml+++ b/feature/settings/src/main/res/values-pl/strings.xml@@ -962,4 +962,7 @@<string name="settings_epg_phone_qr_complete">Dodano</string><string name="settings_epg_phone_qr_error">Błąd</string><string name="settings_backup_export_sections">Wybierz sekcje do eksportu</string>+ <string name="settings_m3u_catchup_query_format">Format zapytania odtwarzania archiwum</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Używany dla kanałów M3U bez własnego źródła archiwum. Pozostaw puste, aby wyłączyć ten format zastępczy. Przykład: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Wyłączone</string></resources>diff --git a/feature/settings/src/main/res/values-pt/strings.xml b/feature/settings/src/main/res/values-pt/strings.xmlindex 85840150..83646107 100644--- a/feature/settings/src/main/res/values-pt/strings.xml+++ b/feature/settings/src/main/res/values-pt/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">Adicionado</string><string name="settings_epg_phone_qr_error">Erro</string><string name="settings_backup_export_sections">Escolha as seções para exportar</string>+ <string name="settings_m3u_catchup_query_format">Formato da consulta de reprodução em arquivo</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Usado em canais M3U sem fonte própria de reprise. Deixe em branco para desativar este formato alternativo. Exemplo: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Desativado</string></resources>diff --git a/feature/settings/src/main/res/values-ro/strings.xml b/feature/settings/src/main/res/values-ro/strings.xmlindex 2f6ffc22..dca86929 100644--- a/feature/settings/src/main/res/values-ro/strings.xml+++ b/feature/settings/src/main/res/values-ro/strings.xml@@ -959,4 +959,7 @@<string name="settings_epg_phone_qr_complete">Adăugat</string><string name="settings_epg_phone_qr_error">Eroare</string><string name="settings_backup_export_sections">Alegeți secțiunile de exportat</string>+ <string name="settings_m3u_catchup_query_format">Formatul interogării de redare din arhivă</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Este folosit pentru canalele M3U fără o sursă proprie de redare din arhivă. Lăsați gol pentru a dezactiva formatul alternativ. Exemplu: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Dezactivat</string></resources>diff --git a/feature/settings/src/main/res/values-ru/strings.xml b/feature/settings/src/main/res/values-ru/strings.xmlindex b5e679f1..b0665b94 100644--- a/feature/settings/src/main/res/values-ru/strings.xml+++ b/feature/settings/src/main/res/values-ru/strings.xml@@ -962,4 +962,7 @@<string name="settings_epg_phone_qr_complete">Добавлено</string><string name="settings_epg_phone_qr_error">Ошибка</string><string name="settings_backup_export_sections">Выберите разделы для экспорта</string>+ <string name="settings_m3u_catchup_query_format">Формат запроса для воспроизведения архива</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Используется для каналов M3U без собственного источника архива. Оставьте поле пустым, чтобы отключить этот резервный формат. Пример: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Отключено</string></resources>diff --git a/feature/settings/src/main/res/values-sk/strings.xml b/feature/settings/src/main/res/values-sk/strings.xmlindex c459c002..8b85e8ac 100644--- a/feature/settings/src/main/res/values-sk/strings.xml+++ b/feature/settings/src/main/res/values-sk/strings.xml@@ -960,4 +960,7 @@<string name="settings_epg_phone_qr_complete">Pridané</string><string name="settings_epg_phone_qr_error">Chyba</string><string name="settings_backup_export_sections">Vyberte sekcie na export</string>+ <string name="settings_m3u_catchup_query_format">Formát požiadavky na prehrávanie archívu</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Používa sa pre kanály M3U bez vlastného zdroja archívu. Ak chcete vypnúť tento náhradný formát, nechajte pole prázdne. Príklad: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Vypnuté</string></resources>diff --git a/feature/settings/src/main/res/values-sq/strings.xml b/feature/settings/src/main/res/values-sq/strings.xmlindex b1271163..c26d251d 100644--- a/feature/settings/src/main/res/values-sq/strings.xml+++ b/feature/settings/src/main/res/values-sq/strings.xml@@ -954,4 +954,7 @@<string name="settings_epg_phone_qr_complete">U shtua</string><string name="settings_epg_phone_qr_error">Gabim</string><string name="settings_backup_export_sections">Zgjidhni seksionet për eksport</string>+ <string name="settings_m3u_catchup_query_format">Formati i kërkesës së riluajtjes nga arkivi</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Përdoret për kanalet M3U pa burimin e tyre të riluajtjes nga arkivi. Lëreni bosh për ta çaktivizuar këtë format rezervë. Shembull: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Joaktiv</string></resources>diff --git a/feature/settings/src/main/res/values-sr/strings.xml b/feature/settings/src/main/res/values-sr/strings.xmlindex 83e71c40..05c4f134 100644--- a/feature/settings/src/main/res/values-sr/strings.xml+++ b/feature/settings/src/main/res/values-sr/strings.xml@@ -957,4 +957,7 @@<string name="settings_epg_phone_qr_complete">Додато</string><string name="settings_epg_phone_qr_error">Грешка</string><string name="settings_backup_export_sections">Изаберите одељке за извоз</string>+ <string name="settings_m3u_catchup_query_format">Формат упита за репродукцију архиве</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Користи се за M3U канале без сопственог извора за репродукцију архиве. Оставите празно да бисте искључили овај резервни формат. Пример: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Искључено</string></resources>diff --git a/feature/settings/src/main/res/values-sv/strings.xml b/feature/settings/src/main/res/values-sv/strings.xmlindex d75153f2..22eaa8b1 100644--- a/feature/settings/src/main/res/values-sv/strings.xml+++ b/feature/settings/src/main/res/values-sv/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Tillagd</string><string name="settings_epg_phone_qr_error">Fel</string><string name="settings_backup_export_sections">Välj avsnitt att exportera</string>+ <string name="settings_m3u_catchup_query_format">Format för catch-up-förfrågan</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Används för M3U-kanaler utan egen catch-up-källa. Lämna fältet tomt för att inaktivera reservformatet. Exempel: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Inaktiverat</string></resources>diff --git a/feature/settings/src/main/res/values-th/strings.xml b/feature/settings/src/main/res/values-th/strings.xmlindex 2c9ea7ee..36c8dafa 100644--- a/feature/settings/src/main/res/values-th/strings.xml+++ b/feature/settings/src/main/res/values-th/strings.xml@@ -951,4 +951,7 @@<string name="settings_epg_phone_qr_complete">เพิ่มแล้ว</string><string name="settings_epg_phone_qr_error">ข้อผิดพลาด</string><string name="settings_backup_export_sections">เลือกส่วนที่ต้องการส่งออก</string>+ <string name="settings_m3u_catchup_query_format">รูปแบบคำขอรับชมย้อนหลัง</string>+ <string name="settings_m3u_catchup_query_format_subtitle">ใช้กับช่อง M3U ที่ไม่มีแหล่งรับชมย้อนหลังของตนเอง เว้นว่างไว้เพื่อปิดรูปแบบสำรองนี้ ตัวอย่าง: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">ปิดใช้งาน</string></resources>diff --git a/feature/settings/src/main/res/values-tr/strings.xml b/feature/settings/src/main/res/values-tr/strings.xmlindex 50599e70..ce6583de 100644--- a/feature/settings/src/main/res/values-tr/strings.xml+++ b/feature/settings/src/main/res/values-tr/strings.xml@@ -956,4 +956,7 @@<string name="settings_epg_phone_qr_complete">Eklendi</string><string name="settings_epg_phone_qr_error">Hata</string><string name="settings_backup_export_sections">Dışa aktarılacak bölümleri seçin</string>+ <string name="settings_m3u_catchup_query_format">Arşivden izleme sorgu biçimi</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Kendi arşivden izleme kaynağı olmayan M3U kanallarında kullanılır. Bu yedek biçimi devre dışı bırakmak için boş bırakın. Örnek: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Devre dışı</string></resources>diff --git a/feature/settings/src/main/res/values-uk/strings.xml b/feature/settings/src/main/res/values-uk/strings.xmlindex 04a10ee9..2ffaf9a6 100644--- a/feature/settings/src/main/res/values-uk/strings.xml+++ b/feature/settings/src/main/res/values-uk/strings.xml@@ -962,4 +962,7 @@<string name="settings_epg_phone_qr_complete">Додано</string><string name="settings_epg_phone_qr_error">Помилка</string><string name="settings_backup_export_sections">Виберіть розділи для експорту</string>+ <string name="settings_m3u_catchup_query_format">Формат запиту для відтворення архіву</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Використовується для каналів M3U без власного джерела архіву. Залиште поле порожнім, щоб вимкнути цей резервний формат. Приклад: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Вимкнено</string></resources>diff --git a/feature/settings/src/main/res/values-vi/strings.xml b/feature/settings/src/main/res/values-vi/strings.xmlindex 3e62a00a..9e70ea2e 100644--- a/feature/settings/src/main/res/values-vi/strings.xml+++ b/feature/settings/src/main/res/values-vi/strings.xml@@ -953,4 +953,7 @@<string name="settings_epg_phone_qr_complete">Đã thêm</string><string name="settings_epg_phone_qr_error">Lỗi</string><string name="settings_backup_export_sections">Chọn các phần để xuất</string>+ <string name="settings_m3u_catchup_query_format">Định dạng truy vấn phát lại từ kho lưu trữ</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Dùng cho các kênh M3U không có nguồn phát lại riêng. Để trống để tắt định dạng dự phòng này. Ví dụ: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Đã tắt</string></resources>diff --git a/feature/settings/src/main/res/values-zh-rTW/strings.xml b/feature/settings/src/main/res/values-zh-rTW/strings.xmlindex 4113fda0..5b396115 100644--- a/feature/settings/src/main/res/values-zh-rTW/strings.xml+++ b/feature/settings/src/main/res/values-zh-rTW/strings.xml@@ -951,4 +951,7 @@<string name="settings_epg_phone_qr_complete">已新增</string><string name="settings_epg_phone_qr_error">錯誤</string><string name="settings_backup_export_sections">選擇要匯出的部分</string>+ <string name="settings_m3u_catchup_query_format">回看查詢格式</string>+ <string name="settings_m3u_catchup_query_format_subtitle">用於沒有專屬回看來源的 M3U 頻道。留空即可停用此備用格式。範例:?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">已停用</string></resources>diff --git a/feature/settings/src/main/res/values-zh/strings.xml b/feature/settings/src/main/res/values-zh/strings.xmlindex 22d86cc0..98ff7b1a 100644--- a/feature/settings/src/main/res/values-zh/strings.xml+++ b/feature/settings/src/main/res/values-zh/strings.xml@@ -952,4 +952,7 @@<string name="settings_epg_phone_qr_complete">已添加</string><string name="settings_epg_phone_qr_error">错误</string><string name="settings_backup_export_sections">选择要导出的部分</string>+ <string name="settings_m3u_catchup_query_format">回看查询格式</string>+ <string name="settings_m3u_catchup_query_format_subtitle">用于没有专属回看源的 M3U 频道。留空可停用此备用格式。示例:?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">已停用</string></resources>diff --git a/feature/settings/src/main/res/values/strings.xml b/feature/settings/src/main/res/values/strings.xmlindex 0b1d6513..cd568e80 100644--- a/feature/settings/src/main/res/values/strings.xml+++ b/feature/settings/src/main/res/values/strings.xml@@ -174,6 +174,9 @@<string name="settings_ffmpeg_compatibility_memory">Remember compatibility fixes</string><string name="settings_ffmpeg_compatibility_memory_subtitle">Reuse successful FFmpeg-backed audio fixes for this device and stream in future sessions.</string><string name="settings_live_timeshift">Enable Local Live Rewind</string>+ <string name="settings_m3u_catchup_query_format">M3U Catch-up Query Format</string>+ <string name="settings_m3u_catchup_query_format_subtitle">Used for M3U channels without their own catch-up source. Leave blank to disable this fallback. Example: ?utc={utc}</string>+ <string name="settings_m3u_catchup_query_format_disabled">Disabled</string><string name="settings_live_timeshift_backend">Live Rewind Backend</string><string name="settings_live_timeshift_backend_subtitle">Choose whether local live rewind buffers to app storage or bounded memory. Automatic prefers storage and falls back to memory when the storage backend is constrained.</string><string name="settings_live_timeshift_depth">Local Live Rewind Depth</string>