diff --git a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastAdapter.kt b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastAdapter.kt index 71d4eb7b9ea..9d0175fa045 100644 --- a/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastAdapter.kt +++ b/modules/features/podcasts/src/main/java/au/com/shiftyjelly/pocketcasts/podcasts/view/podcast/PodcastAdapter.kt @@ -306,11 +306,17 @@ class PodcastAdapter( with(holder.binding.bottom.nextText) { text = podcast.displayableNextEpisodeDate(context) } - holder.binding.bottom.description.text = if (FeatureFlag.isEnabled(Feature.PODCAST_HTML_DESCRIPTION)) { - Html.fromHtml(podcast.podcastDescription, Html.FROM_HTML_MODE_COMPACT).trimPadding() - } else { - podcast.podcastDescription - } + holder.binding.bottom.description.text = + if (FeatureFlag.isEnabled(Feature.PODCAST_HTML_DESCRIPTION) && podcast.podcastHtmlDescription.isNotEmpty()) { + // keep the extra line break from paragraphs as it looks better + Html.fromHtml( + podcast.podcastHtmlDescription, + Html.FROM_HTML_MODE_COMPACT and + Html.FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH.inv(), + ).trimPadding() + } else { + podcast.podcastDescription + } holder.binding.bottom.description.setLinkTextColor(tintColor) holder.binding.bottom.description.readMore(3) holder.binding.bottom.authorText.text = podcast.author diff --git a/modules/services/model/schemas/au.com.shiftyjelly.pocketcasts.models.db.AppDatabase/105.json b/modules/services/model/schemas/au.com.shiftyjelly.pocketcasts.models.db.AppDatabase/105.json new file mode 100644 index 00000000000..ee7089154e2 --- /dev/null +++ b/modules/services/model/schemas/au.com.shiftyjelly.pocketcasts.models.db.AppDatabase/105.json @@ -0,0 +1,1865 @@ +{ + "formatVersion": 1, + "database": { + "version": 105, + "identityHash": "5081aaece3489e97782187c7cb1ab7e4", + "entities": [ + { + "tableName": "bump_stats", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`name` TEXT NOT NULL, `event_time` INTEGER NOT NULL, `custom_event_props` TEXT NOT NULL, PRIMARY KEY(`name`, `event_time`, `custom_event_props`))", + "fields": [ + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "eventTime", + "columnName": "event_time", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "customEventProps", + "columnName": "custom_event_props", + "affinity": "TEXT", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "name", + "event_time", + "custom_event_props" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "bookmarks", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `podcast_uuid` TEXT NOT NULL, `episode_uuid` TEXT NOT NULL, `time` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `title` TEXT NOT NULL, `title_modified` INTEGER, `deleted` INTEGER NOT NULL, `deleted_modified` INTEGER, `sync_status` INTEGER NOT NULL, PRIMARY KEY(`uuid`))", + "fields": [ + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastUuid", + "columnName": "podcast_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "episodeUuid", + "columnName": "episode_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "timeSecs", + "columnName": "time", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "createdAt", + "columnName": "created_at", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "titleModified", + "columnName": "title_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "deleted", + "columnName": "deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deletedModified", + "columnName": "deleted_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "syncStatus", + "columnName": "sync_status", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "uuid" + ] + }, + "indices": [ + { + "name": "bookmarks_podcast_uuid", + "unique": false, + "columnNames": [ + "podcast_uuid" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `bookmarks_podcast_uuid` ON `${TABLE_NAME}` (`podcast_uuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "podcast_episodes", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `episode_description` TEXT NOT NULL, `published_date` INTEGER NOT NULL, `title` TEXT NOT NULL, `size_in_bytes` INTEGER NOT NULL, `episode_status` INTEGER NOT NULL, `file_type` TEXT, `duration` REAL NOT NULL, `download_url` TEXT, `downloaded_file_path` TEXT, `downloaded_error_details` TEXT, `play_error_details` TEXT, `played_up_to` REAL NOT NULL, `playing_status` INTEGER NOT NULL, `podcast_id` TEXT NOT NULL, `added_date` INTEGER NOT NULL, `auto_download_status` INTEGER NOT NULL, `starred` INTEGER NOT NULL, `thumbnail_status` INTEGER NOT NULL, `last_download_attempt_date` INTEGER, `playing_status_modified` INTEGER, `played_up_to_modified` INTEGER, `duration_modified` INTEGER, `starred_modified` INTEGER, `archived` INTEGER NOT NULL, `archived_modified` INTEGER, `season` INTEGER, `number` INTEGER, `type` TEXT, `cleanTitle` TEXT, `last_playback_interaction_date` INTEGER, `last_playback_interaction_sync_status` INTEGER NOT NULL, `exclude_from_episode_limit` INTEGER NOT NULL, `download_task_id` TEXT, `last_archive_interaction_date` INTEGER, `image_url` TEXT, `deselected_chapters` TEXT NOT NULL, `deselected_chapters_modified` INTEGER, PRIMARY KEY(`uuid`))", + "fields": [ + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "episodeDescription", + "columnName": "episode_description", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "publishedDate", + "columnName": "published_date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "sizeInBytes", + "columnName": "size_in_bytes", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodeStatus", + "columnName": "episode_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "fileType", + "columnName": "file_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "duration", + "columnName": "duration", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "downloadUrl", + "columnName": "download_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloadedFilePath", + "columnName": "downloaded_file_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloadErrorDetails", + "columnName": "downloaded_error_details", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "playErrorDetails", + "columnName": "play_error_details", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "playedUpTo", + "columnName": "played_up_to", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "playingStatus", + "columnName": "playing_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "podcastUuid", + "columnName": "podcast_id", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "addedDate", + "columnName": "added_date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoDownloadStatus", + "columnName": "auto_download_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isStarred", + "columnName": "starred", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "thumbnailStatus", + "columnName": "thumbnail_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "lastDownloadAttemptDate", + "columnName": "last_download_attempt_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "playingStatusModified", + "columnName": "playing_status_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "playedUpToModified", + "columnName": "played_up_to_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "durationModified", + "columnName": "duration_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "starredModified", + "columnName": "starred_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isArchived", + "columnName": "archived", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "archivedModified", + "columnName": "archived_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "season", + "columnName": "season", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "number", + "columnName": "number", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "cleanTitle", + "columnName": "cleanTitle", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastPlaybackInteraction", + "columnName": "last_playback_interaction_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "lastPlaybackInteractionSyncStatus", + "columnName": "last_playback_interaction_sync_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "excludeFromEpisodeLimit", + "columnName": "exclude_from_episode_limit", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "downloadTaskId", + "columnName": "download_task_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "lastArchiveInteraction", + "columnName": "last_archive_interaction_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "imageUrl", + "columnName": "image_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "deselectedChapters", + "columnName": "deselected_chapters", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "deselectedChaptersModified", + "columnName": "deselected_chapters_modified", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "uuid" + ] + }, + "indices": [ + { + "name": "episode_last_download_attempt_date", + "unique": false, + "columnNames": [ + "last_download_attempt_date" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `episode_last_download_attempt_date` ON `${TABLE_NAME}` (`last_download_attempt_date`)" + }, + { + "name": "episode_podcast_id", + "unique": false, + "columnNames": [ + "podcast_id" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `episode_podcast_id` ON `${TABLE_NAME}` (`podcast_id`)" + }, + { + "name": "episode_published_date", + "unique": false, + "columnNames": [ + "published_date" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `episode_published_date` ON `${TABLE_NAME}` (`published_date`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "folders", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `name` TEXT NOT NULL, `color` INTEGER NOT NULL, `added_date` INTEGER NOT NULL, `sort_position` INTEGER NOT NULL, `podcasts_sort_type` INTEGER NOT NULL, `deleted` INTEGER NOT NULL, `sync_modified` INTEGER NOT NULL, PRIMARY KEY(`uuid`))", + "fields": [ + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "name", + "columnName": "name", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "color", + "columnName": "color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "addedDate", + "columnName": "added_date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "sortPosition", + "columnName": "sort_position", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "podcastsSortType", + "columnName": "podcasts_sort_type", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deleted", + "columnName": "deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "syncModified", + "columnName": "sync_modified", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "uuid" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "filters", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER, `uuid` TEXT NOT NULL, `title` TEXT NOT NULL, `sortPosition` INTEGER, `manual` INTEGER NOT NULL, `unplayed` INTEGER NOT NULL, `partiallyPlayed` INTEGER NOT NULL, `finished` INTEGER NOT NULL, `audioVideo` INTEGER NOT NULL, `allPodcasts` INTEGER NOT NULL, `podcastUuids` TEXT, `downloaded` INTEGER NOT NULL, `downloading` INTEGER NOT NULL, `notDownloaded` INTEGER NOT NULL, `autoDownload` INTEGER NOT NULL, `autoDownloadWifiOnly` INTEGER NOT NULL, `autoDownloadPowerOnly` INTEGER NOT NULL, `sortId` INTEGER NOT NULL, `iconId` INTEGER NOT NULL, `filterHours` INTEGER NOT NULL, `starred` INTEGER NOT NULL, `deleted` INTEGER NOT NULL, `syncStatus` INTEGER NOT NULL, `autoDownloadLimit` INTEGER NOT NULL, `filterDuration` INTEGER NOT NULL, `longerThan` INTEGER NOT NULL, `shorterThan` INTEGER NOT NULL, `draft` INTEGER NOT NULL, PRIMARY KEY(`_id`))", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "sortPosition", + "columnName": "sortPosition", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "manual", + "columnName": "manual", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "unplayed", + "columnName": "unplayed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "partiallyPlayed", + "columnName": "partiallyPlayed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "finished", + "columnName": "finished", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "audioVideo", + "columnName": "audioVideo", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "allPodcasts", + "columnName": "allPodcasts", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "podcastUuids", + "columnName": "podcastUuids", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloaded", + "columnName": "downloaded", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "downloading", + "columnName": "downloading", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "notDownloaded", + "columnName": "notDownloaded", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoDownload", + "columnName": "autoDownload", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoDownloadUnmeteredOnly", + "columnName": "autoDownloadWifiOnly", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoDownloadPowerOnly", + "columnName": "autoDownloadPowerOnly", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "sortId", + "columnName": "sortId", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "iconId", + "columnName": "iconId", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "filterHours", + "columnName": "filterHours", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "starred", + "columnName": "starred", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "deleted", + "columnName": "deleted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "syncStatus", + "columnName": "syncStatus", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autodownloadLimit", + "columnName": "autoDownloadLimit", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "filterDuration", + "columnName": "filterDuration", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "longerThan", + "columnName": "longerThan", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "shorterThan", + "columnName": "shorterThan", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "draft", + "columnName": "draft", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "_id" + ] + }, + "indices": [ + { + "name": "filters_uuid", + "unique": false, + "columnNames": [ + "uuid" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `filters_uuid` ON `${TABLE_NAME}` (`uuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "filter_episodes", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `playlistId` INTEGER NOT NULL, `episodeUuid` TEXT NOT NULL, `position` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "playlistId", + "columnName": "playlistId", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodeUuid", + "columnName": "episodeUuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "position", + "columnName": "position", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [ + { + "name": "filter_episodes_playlist_id", + "unique": false, + "columnNames": [ + "playlistId" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `filter_episodes_playlist_id` ON `${TABLE_NAME}` (`playlistId`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "podcasts", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `added_date` INTEGER, `thumbnail_url` TEXT, `title` TEXT NOT NULL, `podcast_url` TEXT, `podcast_description` TEXT NOT NULL, `podcast_html_description` TEXT NOT NULL, `podcast_category` TEXT NOT NULL, `podcast_language` TEXT NOT NULL, `media_type` TEXT, `latest_episode_uuid` TEXT, `author` TEXT NOT NULL, `sort_order` INTEGER NOT NULL, `episodes_sort_order` INTEGER NOT NULL, `episodes_sort_order_modified` INTEGER, `latest_episode_date` INTEGER, `episodes_to_keep` INTEGER NOT NULL, `override_global_settings` INTEGER NOT NULL, `override_global_effects` INTEGER NOT NULL, `override_global_effects_modified` INTEGER, `start_from` INTEGER NOT NULL, `start_from_modified` INTEGER, `playback_speed` REAL NOT NULL, `playback_speed_modified` INTEGER, `volume_boosted` INTEGER NOT NULL, `volume_boosted_modified` INTEGER, `is_folder` INTEGER NOT NULL, `subscribed` INTEGER NOT NULL, `show_notifications` INTEGER NOT NULL, `show_notifications_modified` INTEGER, `auto_download_status` INTEGER NOT NULL, `auto_add_to_up_next` INTEGER NOT NULL, `auto_add_to_up_next_modified` INTEGER, `most_popular_color` INTEGER NOT NULL, `primary_color` INTEGER NOT NULL, `secondary_color` INTEGER NOT NULL, `light_overlay_color` INTEGER NOT NULL, `fab_for_light_bg` INTEGER NOT NULL, `link_for_dark_bg` INTEGER NOT NULL, `link_for_light_bg` INTEGER NOT NULL, `color_version` INTEGER NOT NULL, `color_last_downloaded` INTEGER NOT NULL, `sync_status` INTEGER NOT NULL, `exclude_from_auto_archive` INTEGER NOT NULL, `override_global_archive` INTEGER NOT NULL, `override_global_archive_modified` INTEGER, `auto_archive_played_after` INTEGER NOT NULL, `auto_archive_played_after_modified` INTEGER, `auto_archive_inactive_after` INTEGER NOT NULL, `auto_archive_inactive_after_modified` INTEGER, `auto_archive_episode_limit` INTEGER NOT NULL, `auto_archive_episode_limit_modified` INTEGER, `estimated_next_episode` INTEGER, `episode_frequency` TEXT, `grouping` INTEGER NOT NULL, `grouping_modified` INTEGER, `skip_last` INTEGER NOT NULL, `skip_last_modified` INTEGER, `show_archived` INTEGER NOT NULL, `show_archived_modified` INTEGER, `trim_silence_level` INTEGER NOT NULL, `trim_silence_level_modified` INTEGER, `refresh_available` INTEGER NOT NULL, `folder_uuid` TEXT, `licensing` INTEGER NOT NULL, `isPaid` INTEGER NOT NULL, `bundleuuid` TEXT, `bundlebundleUrl` TEXT, `bundlepaymentUrl` TEXT, `bundledescription` TEXT, `bundlepodcastUuid` TEXT, `bundlepaidType` TEXT, PRIMARY KEY(`uuid`))", + "fields": [ + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "addedDate", + "columnName": "added_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "thumbnailUrl", + "columnName": "thumbnail_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastUrl", + "columnName": "podcast_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "podcastDescription", + "columnName": "podcast_description", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastHtmlDescription", + "columnName": "podcast_html_description", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastCategory", + "columnName": "podcast_category", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastLanguage", + "columnName": "podcast_language", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "mediaType", + "columnName": "media_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "latestEpisodeUuid", + "columnName": "latest_episode_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "author", + "columnName": "author", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "sortPosition", + "columnName": "sort_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodesSortType", + "columnName": "episodes_sort_order", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodesSortTypeModified", + "columnName": "episodes_sort_order_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "latestEpisodeDate", + "columnName": "latest_episode_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "episodesToKeep", + "columnName": "episodes_to_keep", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "overrideGlobalSettings", + "columnName": "override_global_settings", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "overrideGlobalEffects", + "columnName": "override_global_effects", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "overrideGlobalEffectsModified", + "columnName": "override_global_effects_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "startFromSecs", + "columnName": "start_from", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "startFromModified", + "columnName": "start_from_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "playbackSpeed", + "columnName": "playback_speed", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "playbackSpeedModified", + "columnName": "playback_speed_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isVolumeBoosted", + "columnName": "volume_boosted", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "volumeBoostedModified", + "columnName": "volume_boosted_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isFolder", + "columnName": "is_folder", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isSubscribed", + "columnName": "subscribed", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isShowNotifications", + "columnName": "show_notifications", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "showNotificationsModified", + "columnName": "show_notifications_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "autoDownloadStatus", + "columnName": "auto_download_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoAddToUpNext", + "columnName": "auto_add_to_up_next", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoAddToUpNextModified", + "columnName": "auto_add_to_up_next_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "backgroundColor", + "columnName": "most_popular_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "tintColorForLightBg", + "columnName": "primary_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "tintColorForDarkBg", + "columnName": "secondary_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "fabColorForDarkBg", + "columnName": "light_overlay_color", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "fabColorForLightBg", + "columnName": "fab_for_light_bg", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "linkColorForLightBg", + "columnName": "link_for_dark_bg", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "linkColorForDarkBg", + "columnName": "link_for_light_bg", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "colorVersion", + "columnName": "color_version", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "colorLastDownloaded", + "columnName": "color_last_downloaded", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "syncStatus", + "columnName": "sync_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "excludeFromAutoArchive", + "columnName": "exclude_from_auto_archive", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "overrideGlobalArchive", + "columnName": "override_global_archive", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "overrideGlobalArchiveModified", + "columnName": "override_global_archive_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "rawAutoArchiveAfterPlaying", + "columnName": "auto_archive_played_after", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoArchiveAfterPlayingModified", + "columnName": "auto_archive_played_after_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "rawAutoArchiveInactive", + "columnName": "auto_archive_inactive_after", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoArchiveInactiveModified", + "columnName": "auto_archive_inactive_after_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "rawAutoArchiveEpisodeLimit", + "columnName": "auto_archive_episode_limit", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoArchiveEpisodeLimitModified", + "columnName": "auto_archive_episode_limit_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "estimatedNextEpisode", + "columnName": "estimated_next_episode", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "episodeFrequency", + "columnName": "episode_frequency", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "grouping", + "columnName": "grouping", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "groupingModified", + "columnName": "grouping_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "skipLastSecs", + "columnName": "skip_last", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "skipLastModified", + "columnName": "skip_last_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "showArchived", + "columnName": "show_archived", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "showArchivedModified", + "columnName": "show_archived_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "trimMode", + "columnName": "trim_silence_level", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "trimModeModified", + "columnName": "trim_silence_level_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "refreshAvailable", + "columnName": "refresh_available", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "rawFolderUuid", + "columnName": "folder_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "licensing", + "columnName": "licensing", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isPaid", + "columnName": "isPaid", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "singleBundle.uuid", + "columnName": "bundleuuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "singleBundle.bundleUrl", + "columnName": "bundlebundleUrl", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "singleBundle.paymentUrl", + "columnName": "bundlepaymentUrl", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "singleBundle.description", + "columnName": "bundledescription", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "singleBundle.podcastUuid", + "columnName": "bundlepodcastUuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "singleBundle.paidType", + "columnName": "bundlepaidType", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "uuid" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "search_history", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `modified` INTEGER NOT NULL, `term` TEXT, `podcast_uuid` TEXT, `podcast_title` TEXT, `podcast_author` TEXT, `folder_uuid` TEXT, `folder_title` TEXT, `folder_color` INTEGER, `folder_podcastIds` TEXT, `episode_uuid` TEXT, `episode_title` TEXT, `episode_duration` REAL, `episode_podcastUuid` TEXT, `episode_podcastTitle` TEXT, `episode_artworkUrl` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "term", + "columnName": "term", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "podcast.uuid", + "columnName": "podcast_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "podcast.title", + "columnName": "podcast_title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "podcast.author", + "columnName": "podcast_author", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "folder.uuid", + "columnName": "folder_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "folder.title", + "columnName": "folder_title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "folder.color", + "columnName": "folder_color", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "folder.podcastIds", + "columnName": "folder_podcastIds", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "episode.uuid", + "columnName": "episode_uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "episode.title", + "columnName": "episode_title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "episode.duration", + "columnName": "episode_duration", + "affinity": "REAL", + "notNull": false + }, + { + "fieldPath": "episode.podcastUuid", + "columnName": "episode_podcastUuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "episode.podcastTitle", + "columnName": "episode_podcastTitle", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "episode.artworkUrl", + "columnName": "episode_artworkUrl", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [ + { + "name": "index_search_history_term", + "unique": true, + "columnNames": [ + "term" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_history_term` ON `${TABLE_NAME}` (`term`)" + }, + { + "name": "index_search_history_podcast_uuid", + "unique": true, + "columnNames": [ + "podcast_uuid" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_history_podcast_uuid` ON `${TABLE_NAME}` (`podcast_uuid`)" + }, + { + "name": "index_search_history_folder_uuid", + "unique": true, + "columnNames": [ + "folder_uuid" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_history_folder_uuid` ON `${TABLE_NAME}` (`folder_uuid`)" + }, + { + "name": "index_search_history_episode_uuid", + "unique": true, + "columnNames": [ + "episode_uuid" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_search_history_episode_uuid` ON `${TABLE_NAME}` (`episode_uuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "up_next_changes", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `type` INTEGER NOT NULL, `uuid` TEXT, `uuids` TEXT, `modified` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "uuids", + "columnName": "uuids", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "modified", + "columnName": "modified", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "up_next_episodes", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT, `episodeUuid` TEXT NOT NULL, `position` INTEGER NOT NULL, `playlistId` INTEGER, `title` TEXT NOT NULL, `publishedDate` INTEGER, `downloadUrl` TEXT, `podcastUuid` TEXT)", + "fields": [ + { + "fieldPath": "id", + "columnName": "_id", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "episodeUuid", + "columnName": "episodeUuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "position", + "columnName": "position", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "playlistId", + "columnName": "playlistId", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "publishedDate", + "columnName": "publishedDate", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "downloadUrl", + "columnName": "downloadUrl", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "podcastUuid", + "columnName": "podcastUuid", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": true, + "columnNames": [ + "_id" + ] + }, + "indices": [ + { + "name": "up_next_episode_episodeUuid", + "unique": false, + "columnNames": [ + "episodeUuid" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `up_next_episode_episodeUuid` ON `${TABLE_NAME}` (`episodeUuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "user_episodes", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uuid` TEXT NOT NULL, `published_date` INTEGER NOT NULL, `episode_description` TEXT NOT NULL, `title` TEXT NOT NULL, `size_in_bytes` INTEGER NOT NULL, `episode_status` INTEGER NOT NULL, `file_type` TEXT, `duration` REAL NOT NULL, `download_url` TEXT, `played_up_to` REAL NOT NULL, `playing_status` INTEGER NOT NULL, `added_date` INTEGER NOT NULL, `auto_download_status` INTEGER NOT NULL, `last_download_attempt_date` INTEGER, `archived` INTEGER NOT NULL, `download_task_id` TEXT, `downloaded_file_path` TEXT, `playing_status_modified` INTEGER, `played_up_to_modified` INTEGER, `artwork_url` TEXT, `play_error_details` TEXT, `server_status` INTEGER NOT NULL, `upload_error_details` TEXT, `downloaded_error_details` TEXT, `tint_color_index` INTEGER NOT NULL, `has_custom_image` INTEGER NOT NULL, `upload_task_id` TEXT, `deselected_chapters` TEXT NOT NULL, `deselected_chapters_modified` INTEGER, PRIMARY KEY(`uuid`))", + "fields": [ + { + "fieldPath": "uuid", + "columnName": "uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "publishedDate", + "columnName": "published_date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodeDescription", + "columnName": "episode_description", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "sizeInBytes", + "columnName": "size_in_bytes", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "episodeStatus", + "columnName": "episode_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "fileType", + "columnName": "file_type", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "duration", + "columnName": "duration", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "downloadUrl", + "columnName": "download_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "playedUpTo", + "columnName": "played_up_to", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "playingStatus", + "columnName": "playing_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "addedDate", + "columnName": "added_date", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "autoDownloadStatus", + "columnName": "auto_download_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "lastDownloadAttemptDate", + "columnName": "last_download_attempt_date", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "isArchived", + "columnName": "archived", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "downloadTaskId", + "columnName": "download_task_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloadedFilePath", + "columnName": "downloaded_file_path", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "playingStatusModified", + "columnName": "playing_status_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "playedUpToModified", + "columnName": "played_up_to_modified", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "artworkUrl", + "columnName": "artwork_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "playErrorDetails", + "columnName": "play_error_details", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "serverStatus", + "columnName": "server_status", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uploadErrorDetails", + "columnName": "upload_error_details", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "downloadErrorDetails", + "columnName": "downloaded_error_details", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "tintColorIndex", + "columnName": "tint_color_index", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "hasCustomImage", + "columnName": "has_custom_image", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "uploadTaskId", + "columnName": "upload_task_id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "deselectedChapters", + "columnName": "deselected_chapters", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "deselectedChaptersModified", + "columnName": "deselected_chapters_modified", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "uuid" + ] + }, + "indices": [ + { + "name": "user_episode_last_download_attempt_date", + "unique": false, + "columnNames": [ + "last_download_attempt_date" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `user_episode_last_download_attempt_date` ON `${TABLE_NAME}` (`last_download_attempt_date`)" + }, + { + "name": "user_episode_published_date", + "unique": false, + "columnNames": [ + "published_date" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `user_episode_published_date` ON `${TABLE_NAME}` (`published_date`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "podcast_ratings", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`podcast_uuid` TEXT NOT NULL, `average` REAL, `total` INTEGER, PRIMARY KEY(`podcast_uuid`))", + "fields": [ + { + "fieldPath": "podcastUuid", + "columnName": "podcast_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "average", + "columnName": "average", + "affinity": "REAL", + "notNull": false + }, + { + "fieldPath": "total", + "columnName": "total", + "affinity": "INTEGER", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "podcast_uuid" + ] + }, + "indices": [], + "foreignKeys": [] + }, + { + "tableName": "episode_chapters", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`episode_uuid` TEXT NOT NULL, `start_time` INTEGER NOT NULL, `is_embedded` INTEGER NOT NULL DEFAULT 0, `end_time` INTEGER, `title` TEXT, `image_url` TEXT, `url` TEXT, PRIMARY KEY(`episode_uuid`, `start_time`))", + "fields": [ + { + "fieldPath": "episodeUuid", + "columnName": "episode_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "startTimeMs", + "columnName": "start_time", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "isEmbedded", + "columnName": "is_embedded", + "affinity": "INTEGER", + "notNull": true, + "defaultValue": "0" + }, + { + "fieldPath": "endTimeMs", + "columnName": "end_time", + "affinity": "INTEGER", + "notNull": false + }, + { + "fieldPath": "title", + "columnName": "title", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "imageUrl", + "columnName": "image_url", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "episode_uuid", + "start_time" + ] + }, + "indices": [ + { + "name": "chapter_episode_uuid_index", + "unique": false, + "columnNames": [ + "episode_uuid" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `chapter_episode_uuid_index` ON `${TABLE_NAME}` (`episode_uuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "curated_podcasts", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`list_id` TEXT NOT NULL, `list_title` TEXT NOT NULL, `podcast_id` TEXT NOT NULL, `podcast_title` TEXT NOT NULL, `podcast_description` TEXT, PRIMARY KEY(`list_id`, `podcast_id`))", + "fields": [ + { + "fieldPath": "listId", + "columnName": "list_id", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "listTitle", + "columnName": "list_title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastId", + "columnName": "podcast_id", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastTitle", + "columnName": "podcast_title", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "podcastDescription", + "columnName": "podcast_description", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "list_id", + "podcast_id" + ] + }, + "indices": [ + { + "name": "curated_podcasts_list_id_index", + "unique": false, + "columnNames": [ + "list_id" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `curated_podcasts_list_id_index` ON `${TABLE_NAME}` (`list_id`)" + }, + { + "name": "curated_podcasts_podcast_id_index", + "unique": false, + "columnNames": [ + "podcast_id" + ], + "orders": [], + "createSql": "CREATE INDEX IF NOT EXISTS `curated_podcasts_podcast_id_index` ON `${TABLE_NAME}` (`podcast_id`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "episode_transcript", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`episode_uuid` TEXT NOT NULL, `url` TEXT NOT NULL, `type` TEXT NOT NULL, `language` TEXT, PRIMARY KEY(`episode_uuid`, `url`))", + "fields": [ + { + "fieldPath": "episodeUuid", + "columnName": "episode_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "url", + "columnName": "url", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "type", + "columnName": "type", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "language", + "columnName": "language", + "affinity": "TEXT", + "notNull": false + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "episode_uuid", + "url" + ] + }, + "indices": [ + { + "name": "transcript_episode_uuid_index", + "unique": true, + "columnNames": [ + "episode_uuid" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `transcript_episode_uuid_index` ON `${TABLE_NAME}` (`episode_uuid`)" + } + ], + "foreignKeys": [] + }, + { + "tableName": "user_podcast_ratings", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`podcast_uuid` TEXT NOT NULL, `rating` INTEGER NOT NULL, `modified_at` INTEGER NOT NULL, PRIMARY KEY(`podcast_uuid`))", + "fields": [ + { + "fieldPath": "podcastUuid", + "columnName": "podcast_uuid", + "affinity": "TEXT", + "notNull": true + }, + { + "fieldPath": "rating", + "columnName": "rating", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "modifiedAt", + "columnName": "modified_at", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "autoGenerate": false, + "columnNames": [ + "podcast_uuid" + ] + }, + "indices": [], + "foreignKeys": [] + } + ], + "views": [], + "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, '5081aaece3489e97782187c7cb1ab7e4')" + ] + } +} \ No newline at end of file diff --git a/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/db/AppDatabase.kt b/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/db/AppDatabase.kt index 1e64d6b41d7..cb7d422ad42 100644 --- a/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/db/AppDatabase.kt +++ b/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/db/AppDatabase.kt @@ -87,7 +87,7 @@ import au.com.shiftyjelly.pocketcasts.localization.R as LR Transcript::class, UserPodcastRating::class, ], - version = 104, + version = 105, exportSchema = true, autoMigrations = [ AutoMigration(from = 81, to = 82, spec = AppDatabase.Companion.DeleteSilenceRemovedMigration::class), @@ -872,6 +872,10 @@ abstract class AppDatabase : RoomDatabase() { database.execSQL("DELETE FROM curated_podcasts WHERE list_id IS 'featured'") } + val MIGRATION_104_105 = addMigration(104, 105) { database -> + database.execSQL("ALTER TABLE podcast ADD COLUMN podcast_html_description TEXT NOT NULL DEFAULT ''") + } + fun addMigrations(databaseBuilder: Builder, context: Context) { databaseBuilder.addMigrations( addMigration(1, 2) { }, @@ -1266,6 +1270,7 @@ abstract class AppDatabase : RoomDatabase() { MIGRATION_101_102, // 102 to 103 added via auto migration MIGRATION_103_104, + MIGRATION_104_105, ) } diff --git a/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/entity/Podcast.kt b/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/entity/Podcast.kt index 9c7537da8dc..5e22669a46d 100644 --- a/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/entity/Podcast.kt +++ b/modules/services/model/src/main/java/au/com/shiftyjelly/pocketcasts/models/entity/Podcast.kt @@ -34,6 +34,7 @@ data class Podcast( @ColumnInfo(name = "title") var title: String = "", @ColumnInfo(name = "podcast_url") var podcastUrl: String? = null, @ColumnInfo(name = "podcast_description") var podcastDescription: String = "", + @ColumnInfo(name = "podcast_html_description") var podcastHtmlDescription: String = "", @ColumnInfo(name = "podcast_category") var podcastCategory: String = "", @ColumnInfo(name = "podcast_language") var podcastLanguage: String = "", @ColumnInfo(name = "media_type") var mediaType: String? = null, diff --git a/modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/podcast/PodcastResponse.kt b/modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/podcast/PodcastResponse.kt index 1eb6ab3abf5..573a01dda69 100644 --- a/modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/podcast/PodcastResponse.kt +++ b/modules/services/servers/src/main/java/au/com/shiftyjelly/pocketcasts/servers/podcast/PodcastResponse.kt @@ -56,10 +56,9 @@ data class PodcastInfo( podcast.author = author ?: "" podcast.podcastCategory = category ?: "" if (FeatureFlag.isEnabled(Feature.PODCAST_HTML_DESCRIPTION)) { - podcast.podcastDescription = descriptionHtml.takeUnless { it.isNullOrBlank() } ?: description ?: "" - } else { - podcast.podcastDescription = description ?: "" + podcast.podcastHtmlDescription = descriptionHtml ?: "" } + podcast.podcastDescription = description ?: "" podcast.episodesSortType = if (showType == "serial") EpisodesSortType.EPISODES_SORT_BY_DATE_ASC else EpisodesSortType.EPISODES_SORT_BY_DATE_DESC episodes?.mapNotNull { it.toEpisode(uuid) }?.let { episodes -> podcast.episodes.addAll(episodes)