diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index 7643783a82..6db4707229 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -98,7 +98,6 @@
http://schemas.android.com/apk/res/android
- ANDROID_ATTRIBUTE_ORDER
diff --git a/app/schemas/com.theveloper.pixelplay.data.database.PixelPlayDatabase/43.json b/app/schemas/com.theveloper.pixelplay.data.database.PixelPlayDatabase/43.json
new file mode 100644
index 0000000000..b199158dbf
--- /dev/null
+++ b/app/schemas/com.theveloper.pixelplay.data.database.PixelPlayDatabase/43.json
@@ -0,0 +1,2749 @@
+{
+ "formatVersion": 1,
+ "database": {
+ "version": 43,
+ "identityHash": "e6c4f6c20d810ef8cb2cf2856151cc0f",
+ "entities": [
+ {
+ "tableName": "album_art_themes",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`albumArtUriString` TEXT NOT NULL, `paletteStyle` TEXT NOT NULL, `light_primary` TEXT NOT NULL, `light_onPrimary` TEXT NOT NULL, `light_primaryContainer` TEXT NOT NULL, `light_onPrimaryContainer` TEXT NOT NULL, `light_secondary` TEXT NOT NULL, `light_onSecondary` TEXT NOT NULL, `light_secondaryContainer` TEXT NOT NULL, `light_onSecondaryContainer` TEXT NOT NULL, `light_tertiary` TEXT NOT NULL, `light_onTertiary` TEXT NOT NULL, `light_tertiaryContainer` TEXT NOT NULL, `light_onTertiaryContainer` TEXT NOT NULL, `light_background` TEXT NOT NULL, `light_onBackground` TEXT NOT NULL, `light_surface` TEXT NOT NULL, `light_onSurface` TEXT NOT NULL, `light_surfaceVariant` TEXT NOT NULL, `light_onSurfaceVariant` TEXT NOT NULL, `light_error` TEXT NOT NULL, `light_onError` TEXT NOT NULL, `light_outline` TEXT NOT NULL, `light_errorContainer` TEXT NOT NULL, `light_onErrorContainer` TEXT NOT NULL, `light_inversePrimary` TEXT NOT NULL, `light_inverseSurface` TEXT NOT NULL, `light_inverseOnSurface` TEXT NOT NULL, `light_surfaceTint` TEXT NOT NULL, `light_outlineVariant` TEXT NOT NULL, `light_scrim` TEXT NOT NULL, `light_surfaceBright` TEXT NOT NULL, `light_surfaceDim` TEXT NOT NULL, `light_surfaceContainer` TEXT NOT NULL, `light_surfaceContainerHigh` TEXT NOT NULL, `light_surfaceContainerHighest` TEXT NOT NULL, `light_surfaceContainerLow` TEXT NOT NULL, `light_surfaceContainerLowest` TEXT NOT NULL, `light_primaryFixed` TEXT NOT NULL, `light_primaryFixedDim` TEXT NOT NULL, `light_onPrimaryFixed` TEXT NOT NULL, `light_onPrimaryFixedVariant` TEXT NOT NULL, `light_secondaryFixed` TEXT NOT NULL, `light_secondaryFixedDim` TEXT NOT NULL, `light_onSecondaryFixed` TEXT NOT NULL, `light_onSecondaryFixedVariant` TEXT NOT NULL, `light_tertiaryFixed` TEXT NOT NULL, `light_tertiaryFixedDim` TEXT NOT NULL, `light_onTertiaryFixed` TEXT NOT NULL, `light_onTertiaryFixedVariant` TEXT NOT NULL, `dark_primary` TEXT NOT NULL, `dark_onPrimary` TEXT NOT NULL, `dark_primaryContainer` TEXT NOT NULL, `dark_onPrimaryContainer` TEXT NOT NULL, `dark_secondary` TEXT NOT NULL, `dark_onSecondary` TEXT NOT NULL, `dark_secondaryContainer` TEXT NOT NULL, `dark_onSecondaryContainer` TEXT NOT NULL, `dark_tertiary` TEXT NOT NULL, `dark_onTertiary` TEXT NOT NULL, `dark_tertiaryContainer` TEXT NOT NULL, `dark_onTertiaryContainer` TEXT NOT NULL, `dark_background` TEXT NOT NULL, `dark_onBackground` TEXT NOT NULL, `dark_surface` TEXT NOT NULL, `dark_onSurface` TEXT NOT NULL, `dark_surfaceVariant` TEXT NOT NULL, `dark_onSurfaceVariant` TEXT NOT NULL, `dark_error` TEXT NOT NULL, `dark_onError` TEXT NOT NULL, `dark_outline` TEXT NOT NULL, `dark_errorContainer` TEXT NOT NULL, `dark_onErrorContainer` TEXT NOT NULL, `dark_inversePrimary` TEXT NOT NULL, `dark_inverseSurface` TEXT NOT NULL, `dark_inverseOnSurface` TEXT NOT NULL, `dark_surfaceTint` TEXT NOT NULL, `dark_outlineVariant` TEXT NOT NULL, `dark_scrim` TEXT NOT NULL, `dark_surfaceBright` TEXT NOT NULL, `dark_surfaceDim` TEXT NOT NULL, `dark_surfaceContainer` TEXT NOT NULL, `dark_surfaceContainerHigh` TEXT NOT NULL, `dark_surfaceContainerHighest` TEXT NOT NULL, `dark_surfaceContainerLow` TEXT NOT NULL, `dark_surfaceContainerLowest` TEXT NOT NULL, `dark_primaryFixed` TEXT NOT NULL, `dark_primaryFixedDim` TEXT NOT NULL, `dark_onPrimaryFixed` TEXT NOT NULL, `dark_onPrimaryFixedVariant` TEXT NOT NULL, `dark_secondaryFixed` TEXT NOT NULL, `dark_secondaryFixedDim` TEXT NOT NULL, `dark_onSecondaryFixed` TEXT NOT NULL, `dark_onSecondaryFixedVariant` TEXT NOT NULL, `dark_tertiaryFixed` TEXT NOT NULL, `dark_tertiaryFixedDim` TEXT NOT NULL, `dark_onTertiaryFixed` TEXT NOT NULL, `dark_onTertiaryFixedVariant` TEXT NOT NULL, PRIMARY KEY(`albumArtUriString`))",
+ "fields": [
+ {
+ "fieldPath": "albumArtUriString",
+ "columnName": "albumArtUriString",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "paletteStyle",
+ "columnName": "paletteStyle",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.primary",
+ "columnName": "light_primary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onPrimary",
+ "columnName": "light_onPrimary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.primaryContainer",
+ "columnName": "light_primaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onPrimaryContainer",
+ "columnName": "light_onPrimaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.secondary",
+ "columnName": "light_secondary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSecondary",
+ "columnName": "light_onSecondary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.secondaryContainer",
+ "columnName": "light_secondaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSecondaryContainer",
+ "columnName": "light_onSecondaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.tertiary",
+ "columnName": "light_tertiary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onTertiary",
+ "columnName": "light_onTertiary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.tertiaryContainer",
+ "columnName": "light_tertiaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onTertiaryContainer",
+ "columnName": "light_onTertiaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.background",
+ "columnName": "light_background",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onBackground",
+ "columnName": "light_onBackground",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surface",
+ "columnName": "light_surface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSurface",
+ "columnName": "light_onSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceVariant",
+ "columnName": "light_surfaceVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSurfaceVariant",
+ "columnName": "light_onSurfaceVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.error",
+ "columnName": "light_error",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onError",
+ "columnName": "light_onError",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.outline",
+ "columnName": "light_outline",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.errorContainer",
+ "columnName": "light_errorContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onErrorContainer",
+ "columnName": "light_onErrorContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.inversePrimary",
+ "columnName": "light_inversePrimary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.inverseSurface",
+ "columnName": "light_inverseSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.inverseOnSurface",
+ "columnName": "light_inverseOnSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceTint",
+ "columnName": "light_surfaceTint",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.outlineVariant",
+ "columnName": "light_outlineVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.scrim",
+ "columnName": "light_scrim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceBright",
+ "columnName": "light_surfaceBright",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceDim",
+ "columnName": "light_surfaceDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceContainer",
+ "columnName": "light_surfaceContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceContainerHigh",
+ "columnName": "light_surfaceContainerHigh",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceContainerHighest",
+ "columnName": "light_surfaceContainerHighest",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceContainerLow",
+ "columnName": "light_surfaceContainerLow",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.surfaceContainerLowest",
+ "columnName": "light_surfaceContainerLowest",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.primaryFixed",
+ "columnName": "light_primaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.primaryFixedDim",
+ "columnName": "light_primaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onPrimaryFixed",
+ "columnName": "light_onPrimaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onPrimaryFixedVariant",
+ "columnName": "light_onPrimaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.secondaryFixed",
+ "columnName": "light_secondaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.secondaryFixedDim",
+ "columnName": "light_secondaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSecondaryFixed",
+ "columnName": "light_onSecondaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onSecondaryFixedVariant",
+ "columnName": "light_onSecondaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.tertiaryFixed",
+ "columnName": "light_tertiaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.tertiaryFixedDim",
+ "columnName": "light_tertiaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onTertiaryFixed",
+ "columnName": "light_onTertiaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lightThemeValues.onTertiaryFixedVariant",
+ "columnName": "light_onTertiaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.primary",
+ "columnName": "dark_primary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onPrimary",
+ "columnName": "dark_onPrimary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.primaryContainer",
+ "columnName": "dark_primaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onPrimaryContainer",
+ "columnName": "dark_onPrimaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.secondary",
+ "columnName": "dark_secondary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSecondary",
+ "columnName": "dark_onSecondary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.secondaryContainer",
+ "columnName": "dark_secondaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSecondaryContainer",
+ "columnName": "dark_onSecondaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.tertiary",
+ "columnName": "dark_tertiary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onTertiary",
+ "columnName": "dark_onTertiary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.tertiaryContainer",
+ "columnName": "dark_tertiaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onTertiaryContainer",
+ "columnName": "dark_onTertiaryContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.background",
+ "columnName": "dark_background",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onBackground",
+ "columnName": "dark_onBackground",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surface",
+ "columnName": "dark_surface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSurface",
+ "columnName": "dark_onSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceVariant",
+ "columnName": "dark_surfaceVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSurfaceVariant",
+ "columnName": "dark_onSurfaceVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.error",
+ "columnName": "dark_error",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onError",
+ "columnName": "dark_onError",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.outline",
+ "columnName": "dark_outline",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.errorContainer",
+ "columnName": "dark_errorContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onErrorContainer",
+ "columnName": "dark_onErrorContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.inversePrimary",
+ "columnName": "dark_inversePrimary",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.inverseSurface",
+ "columnName": "dark_inverseSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.inverseOnSurface",
+ "columnName": "dark_inverseOnSurface",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceTint",
+ "columnName": "dark_surfaceTint",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.outlineVariant",
+ "columnName": "dark_outlineVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.scrim",
+ "columnName": "dark_scrim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceBright",
+ "columnName": "dark_surfaceBright",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceDim",
+ "columnName": "dark_surfaceDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceContainer",
+ "columnName": "dark_surfaceContainer",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceContainerHigh",
+ "columnName": "dark_surfaceContainerHigh",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceContainerHighest",
+ "columnName": "dark_surfaceContainerHighest",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceContainerLow",
+ "columnName": "dark_surfaceContainerLow",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.surfaceContainerLowest",
+ "columnName": "dark_surfaceContainerLowest",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.primaryFixed",
+ "columnName": "dark_primaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.primaryFixedDim",
+ "columnName": "dark_primaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onPrimaryFixed",
+ "columnName": "dark_onPrimaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onPrimaryFixedVariant",
+ "columnName": "dark_onPrimaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.secondaryFixed",
+ "columnName": "dark_secondaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.secondaryFixedDim",
+ "columnName": "dark_secondaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSecondaryFixed",
+ "columnName": "dark_onSecondaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onSecondaryFixedVariant",
+ "columnName": "dark_onSecondaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.tertiaryFixed",
+ "columnName": "dark_tertiaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.tertiaryFixedDim",
+ "columnName": "dark_tertiaryFixedDim",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onTertiaryFixed",
+ "columnName": "dark_onTertiaryFixed",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "darkThemeValues.onTertiaryFixedVariant",
+ "columnName": "dark_onTertiaryFixedVariant",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "albumArtUriString"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_album_art_themes_albumArtUriString_paletteStyle",
+ "unique": false,
+ "columnNames": [
+ "albumArtUriString",
+ "paletteStyle"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_album_art_themes_albumArtUriString_paletteStyle` ON `${TABLE_NAME}` (`albumArtUriString`, `paletteStyle`)"
+ }
+ ]
+ },
+ {
+ "tableName": "search_history",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `query` TEXT NOT NULL, `timestamp` INTEGER NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "query",
+ "columnName": "query",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "timestamp",
+ "columnName": "timestamp",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `title` TEXT NOT NULL, `artist_name` TEXT NOT NULL, `artist_id` INTEGER NOT NULL, `album_artist` TEXT, `album_name` TEXT NOT NULL, `album_id` INTEGER NOT NULL, `content_uri_string` TEXT NOT NULL, `album_art_uri_string` TEXT, `duration` INTEGER NOT NULL, `genre` TEXT, `file_path` TEXT NOT NULL, `parent_directory_path` TEXT NOT NULL, `is_favorite` INTEGER NOT NULL DEFAULT 0, `lyrics` TEXT DEFAULT null, `track_number` INTEGER NOT NULL DEFAULT 0, `disc_number` INTEGER DEFAULT null, `year` INTEGER NOT NULL DEFAULT 0, `date_added` INTEGER NOT NULL DEFAULT 0, `mime_type` TEXT, `bitrate` INTEGER, `sample_rate` INTEGER, `telegram_chat_id` INTEGER, `telegram_file_id` INTEGER, `artists_json` TEXT, `source_type` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`id`), FOREIGN KEY(`album_id`) REFERENCES `albums`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`artist_id`) REFERENCES `artists`(`id`) ON UPDATE NO ACTION ON DELETE SET NULL )",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistName",
+ "columnName": "artist_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistId",
+ "columnName": "artist_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtist",
+ "columnName": "album_artist",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "albumName",
+ "columnName": "album_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumId",
+ "columnName": "album_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "contentUriString",
+ "columnName": "content_uri_string",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUriString",
+ "columnName": "album_art_uri_string",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "genre",
+ "columnName": "genre",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "filePath",
+ "columnName": "file_path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "parentDirectoryPath",
+ "columnName": "parent_directory_path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isFavorite",
+ "columnName": "is_favorite",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ },
+ {
+ "fieldPath": "lyrics",
+ "columnName": "lyrics",
+ "affinity": "TEXT",
+ "defaultValue": "null"
+ },
+ {
+ "fieldPath": "trackNumber",
+ "columnName": "track_number",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ },
+ {
+ "fieldPath": "discNumber",
+ "columnName": "disc_number",
+ "affinity": "INTEGER",
+ "defaultValue": "null"
+ },
+ {
+ "fieldPath": "year",
+ "columnName": "year",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "bitrate",
+ "columnName": "bitrate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "sampleRate",
+ "columnName": "sample_rate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "telegramChatId",
+ "columnName": "telegram_chat_id",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "telegramFileId",
+ "columnName": "telegram_file_id",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "artistsJson",
+ "columnName": "artists_json",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "sourceType",
+ "columnName": "source_type",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_songs_title",
+ "unique": false,
+ "columnNames": [
+ "title"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_title` ON `${TABLE_NAME}` (`title`)"
+ },
+ {
+ "name": "index_songs_album_id",
+ "unique": false,
+ "columnNames": [
+ "album_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_album_id` ON `${TABLE_NAME}` (`album_id`)"
+ },
+ {
+ "name": "index_songs_artist_id",
+ "unique": false,
+ "columnNames": [
+ "artist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_artist_id` ON `${TABLE_NAME}` (`artist_id`)"
+ },
+ {
+ "name": "index_songs_artist_name",
+ "unique": false,
+ "columnNames": [
+ "artist_name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_artist_name` ON `${TABLE_NAME}` (`artist_name`)"
+ },
+ {
+ "name": "index_songs_genre",
+ "unique": false,
+ "columnNames": [
+ "genre"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_genre` ON `${TABLE_NAME}` (`genre`)"
+ },
+ {
+ "name": "index_songs_parent_directory_path",
+ "unique": false,
+ "columnNames": [
+ "parent_directory_path"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_parent_directory_path` ON `${TABLE_NAME}` (`parent_directory_path`)"
+ },
+ {
+ "name": "index_songs_file_path",
+ "unique": false,
+ "columnNames": [
+ "file_path"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_file_path` ON `${TABLE_NAME}` (`file_path`)"
+ },
+ {
+ "name": "index_songs_content_uri_string",
+ "unique": false,
+ "columnNames": [
+ "content_uri_string"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_content_uri_string` ON `${TABLE_NAME}` (`content_uri_string`)"
+ },
+ {
+ "name": "index_songs_date_added",
+ "unique": false,
+ "columnNames": [
+ "date_added"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_date_added` ON `${TABLE_NAME}` (`date_added`)"
+ },
+ {
+ "name": "index_songs_duration",
+ "unique": false,
+ "columnNames": [
+ "duration"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_duration` ON `${TABLE_NAME}` (`duration`)"
+ },
+ {
+ "name": "index_songs_source_type",
+ "unique": false,
+ "columnNames": [
+ "source_type"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_source_type` ON `${TABLE_NAME}` (`source_type`)"
+ },
+ {
+ "name": "index_songs_parent_directory_path_source_type_album_id",
+ "unique": false,
+ "columnNames": [
+ "parent_directory_path",
+ "source_type",
+ "album_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_parent_directory_path_source_type_album_id` ON `${TABLE_NAME}` (`parent_directory_path`, `source_type`, `album_id`)"
+ },
+ {
+ "name": "index_songs_parent_directory_path_source_type_id",
+ "unique": false,
+ "columnNames": [
+ "parent_directory_path",
+ "source_type",
+ "id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_songs_parent_directory_path_source_type_id` ON `${TABLE_NAME}` (`parent_directory_path`, `source_type`, `id`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "albums",
+ "onDelete": "CASCADE",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "album_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ },
+ {
+ "table": "artists",
+ "onDelete": "SET NULL",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "artist_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "songs_fts",
+ "createSql": "CREATE VIRTUAL TABLE IF NOT EXISTS `${TABLE_NAME}` USING FTS4(`title` TEXT NOT NULL, `artist_name` TEXT NOT NULL, tokenize=unicode61)",
+ "fields": [
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistName",
+ "columnName": "artist_name",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "rowid"
+ ]
+ },
+ "ftsVersion": "FTS4",
+ "ftsOptions": {
+ "tokenizer": "unicode61",
+ "tokenizerArgs": [],
+ "contentTable": "",
+ "languageIdColumnName": "",
+ "matchInfo": "FTS4",
+ "notIndexedColumns": [],
+ "prefixSizes": [],
+ "preferredOrder": "ASC"
+ },
+ "contentSyncTriggers": []
+ },
+ {
+ "tableName": "albums",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `title` TEXT NOT NULL, `artist_name` TEXT NOT NULL, `artist_id` INTEGER NOT NULL, `album_art_uri_string` TEXT, `song_count` INTEGER NOT NULL, `date_added` INTEGER NOT NULL, `year` INTEGER NOT NULL, `album_artist` TEXT, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistName",
+ "columnName": "artist_name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistId",
+ "columnName": "artist_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUriString",
+ "columnName": "album_art_uri_string",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "year",
+ "columnName": "year",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtist",
+ "columnName": "album_artist",
+ "affinity": "TEXT"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_albums_title",
+ "unique": false,
+ "columnNames": [
+ "title"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_albums_title` ON `${TABLE_NAME}` (`title`)"
+ },
+ {
+ "name": "index_albums_artist_id",
+ "unique": false,
+ "columnNames": [
+ "artist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_albums_artist_id` ON `${TABLE_NAME}` (`artist_id`)"
+ },
+ {
+ "name": "index_albums_artist_name",
+ "unique": false,
+ "columnNames": [
+ "artist_name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_albums_artist_name` ON `${TABLE_NAME}` (`artist_name`)"
+ },
+ {
+ "name": "index_albums_album_artist",
+ "unique": false,
+ "columnNames": [
+ "album_artist"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_albums_album_artist` ON `${TABLE_NAME}` (`album_artist`)"
+ }
+ ]
+ },
+ {
+ "tableName": "artists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `track_count` INTEGER NOT NULL, `image_url` TEXT, `custom_image_uri` TEXT, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "trackCount",
+ "columnName": "track_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "imageUrl",
+ "columnName": "image_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "customImageUri",
+ "columnName": "custom_image_uri",
+ "affinity": "TEXT"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_artists_name",
+ "unique": false,
+ "columnNames": [
+ "name"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_artists_name` ON `${TABLE_NAME}` (`name`)"
+ }
+ ]
+ },
+ {
+ "tableName": "transition_rules",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `playlistId` TEXT NOT NULL, `fromTrackId` TEXT, `toTrackId` TEXT, `mode` TEXT NOT NULL, `durationMs` INTEGER NOT NULL, `curveIn` TEXT NOT NULL, `curveOut` TEXT NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlistId",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "fromTrackId",
+ "columnName": "fromTrackId",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "toTrackId",
+ "columnName": "toTrackId",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "settings.mode",
+ "columnName": "mode",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "settings.durationMs",
+ "columnName": "durationMs",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "settings.curveIn",
+ "columnName": "curveIn",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "settings.curveOut",
+ "columnName": "curveOut",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_transition_rules_playlistId_fromTrackId_toTrackId",
+ "unique": true,
+ "columnNames": [
+ "playlistId",
+ "fromTrackId",
+ "toTrackId"
+ ],
+ "orders": [],
+ "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_transition_rules_playlistId_fromTrackId_toTrackId` ON `${TABLE_NAME}` (`playlistId`, `fromTrackId`, `toTrackId`)"
+ }
+ ]
+ },
+ {
+ "tableName": "song_artist_cross_ref",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`song_id` INTEGER NOT NULL, `artist_id` INTEGER NOT NULL, `is_primary` INTEGER NOT NULL DEFAULT 0, PRIMARY KEY(`song_id`, `artist_id`), FOREIGN KEY(`song_id`) REFERENCES `songs`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`artist_id`) REFERENCES `artists`(`id`) ON UPDATE NO ACTION ON DELETE CASCADE )",
+ "fields": [
+ {
+ "fieldPath": "songId",
+ "columnName": "song_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistId",
+ "columnName": "artist_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isPrimary",
+ "columnName": "is_primary",
+ "affinity": "INTEGER",
+ "notNull": true,
+ "defaultValue": "0"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "song_id",
+ "artist_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_song_artist_cross_ref_song_id",
+ "unique": false,
+ "columnNames": [
+ "song_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_song_artist_cross_ref_song_id` ON `${TABLE_NAME}` (`song_id`)"
+ },
+ {
+ "name": "index_song_artist_cross_ref_artist_id",
+ "unique": false,
+ "columnNames": [
+ "artist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_song_artist_cross_ref_artist_id` ON `${TABLE_NAME}` (`artist_id`)"
+ },
+ {
+ "name": "index_song_artist_cross_ref_is_primary",
+ "unique": false,
+ "columnNames": [
+ "is_primary"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_song_artist_cross_ref_is_primary` ON `${TABLE_NAME}` (`is_primary`)"
+ }
+ ],
+ "foreignKeys": [
+ {
+ "table": "songs",
+ "onDelete": "CASCADE",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "song_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ },
+ {
+ "table": "artists",
+ "onDelete": "CASCADE",
+ "onUpdate": "NO ACTION",
+ "columns": [
+ "artist_id"
+ ],
+ "referencedColumns": [
+ "id"
+ ]
+ }
+ ]
+ },
+ {
+ "tableName": "telegram_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `chat_id` INTEGER NOT NULL, `message_id` INTEGER NOT NULL, `file_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `duration` INTEGER NOT NULL, `file_path` TEXT NOT NULL, `mime_type` TEXT NOT NULL, `date_added` INTEGER NOT NULL, `album_art_uri` TEXT, `thread_id` INTEGER, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "chatId",
+ "columnName": "chat_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "messageId",
+ "columnName": "message_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "fileId",
+ "columnName": "file_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "filePath",
+ "columnName": "file_path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUriString",
+ "columnName": "album_art_uri",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "threadId",
+ "columnName": "thread_id",
+ "affinity": "INTEGER"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_telegram_songs_chat_id",
+ "unique": false,
+ "columnNames": [
+ "chat_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_songs_chat_id` ON `${TABLE_NAME}` (`chat_id`)"
+ },
+ {
+ "name": "index_telegram_songs_message_id",
+ "unique": false,
+ "columnNames": [
+ "message_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_songs_message_id` ON `${TABLE_NAME}` (`message_id`)"
+ },
+ {
+ "name": "index_telegram_songs_file_id",
+ "unique": false,
+ "columnNames": [
+ "file_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_songs_file_id` ON `${TABLE_NAME}` (`file_id`)"
+ },
+ {
+ "name": "index_telegram_songs_chat_id_message_id",
+ "unique": false,
+ "columnNames": [
+ "chat_id",
+ "message_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_songs_chat_id_message_id` ON `${TABLE_NAME}` (`chat_id`, `message_id`)"
+ },
+ {
+ "name": "index_telegram_songs_thread_id",
+ "unique": false,
+ "columnNames": [
+ "thread_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_songs_thread_id` ON `${TABLE_NAME}` (`thread_id`)"
+ }
+ ]
+ },
+ {
+ "tableName": "telegram_channels",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`chat_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `username` TEXT, `song_count` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, `photo_path` TEXT, PRIMARY KEY(`chat_id`))",
+ "fields": [
+ {
+ "fieldPath": "chatId",
+ "columnName": "chat_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "username",
+ "columnName": "username",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "photoPath",
+ "columnName": "photo_path",
+ "affinity": "TEXT"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "chat_id"
+ ]
+ }
+ },
+ {
+ "tableName": "song_engagements",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`song_id` TEXT NOT NULL, `play_count` INTEGER NOT NULL, `total_play_duration_ms` INTEGER NOT NULL, `last_played_timestamp` INTEGER NOT NULL, PRIMARY KEY(`song_id`))",
+ "fields": [
+ {
+ "fieldPath": "songId",
+ "columnName": "song_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playCount",
+ "columnName": "play_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "totalPlayDurationMs",
+ "columnName": "total_play_duration_ms",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastPlayedTimestamp",
+ "columnName": "last_played_timestamp",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "song_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_song_engagements_play_count",
+ "unique": false,
+ "columnNames": [
+ "play_count"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_song_engagements_play_count` ON `${TABLE_NAME}` (`play_count`)"
+ }
+ ]
+ },
+ {
+ "tableName": "favorites",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` INTEGER NOT NULL, `isFavorite` INTEGER NOT NULL, `timestamp` INTEGER NOT NULL, PRIMARY KEY(`songId`))",
+ "fields": [
+ {
+ "fieldPath": "songId",
+ "columnName": "songId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isFavorite",
+ "columnName": "isFavorite",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "timestamp",
+ "columnName": "timestamp",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "songId"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_favorites_timestamp",
+ "unique": false,
+ "columnNames": [
+ "timestamp"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_favorites_timestamp` ON `${TABLE_NAME}` (`timestamp`)"
+ }
+ ]
+ },
+ {
+ "tableName": "lyrics",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`songId` INTEGER NOT NULL, `content` TEXT NOT NULL, `isSynced` INTEGER NOT NULL, `source` TEXT, PRIMARY KEY(`songId`))",
+ "fields": [
+ {
+ "fieldPath": "songId",
+ "columnName": "songId",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "content",
+ "columnName": "content",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isSynced",
+ "columnName": "isSynced",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "source",
+ "columnName": "source",
+ "affinity": "TEXT"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "songId"
+ ]
+ }
+ },
+ {
+ "tableName": "netease_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `netease_id` INTEGER NOT NULL, `playlist_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `album` TEXT NOT NULL, `album_id` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `album_art_url` TEXT, `mime_type` TEXT NOT NULL, `bitrate` INTEGER, `date_added` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "neteaseId",
+ "columnName": "netease_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlist_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "album",
+ "columnName": "album",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumId",
+ "columnName": "album_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUrl",
+ "columnName": "album_art_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "bitrate",
+ "columnName": "bitrate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_netease_songs_netease_id",
+ "unique": false,
+ "columnNames": [
+ "netease_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_netease_songs_netease_id` ON `${TABLE_NAME}` (`netease_id`)"
+ },
+ {
+ "name": "index_netease_songs_playlist_id",
+ "unique": false,
+ "columnNames": [
+ "playlist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_netease_songs_playlist_id` ON `${TABLE_NAME}` (`playlist_id`)"
+ },
+ {
+ "name": "index_netease_songs_playlist_id_date_added",
+ "unique": false,
+ "columnNames": [
+ "playlist_id",
+ "date_added"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_netease_songs_playlist_id_date_added` ON `${TABLE_NAME}` (`playlist_id`, `date_added`)"
+ }
+ ]
+ },
+ {
+ "tableName": "netease_playlists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `cover_url` TEXT, `song_count` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "coverUrl",
+ "columnName": "cover_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "gdrive_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `drive_file_id` TEXT NOT NULL, `folder_id` TEXT NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `album` TEXT NOT NULL, `album_id` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `album_art_url` TEXT, `mime_type` TEXT NOT NULL, `bitrate` INTEGER, `file_size` INTEGER NOT NULL, `date_added` INTEGER NOT NULL, `date_modified` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "driveFileId",
+ "columnName": "drive_file_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "folderId",
+ "columnName": "folder_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "album",
+ "columnName": "album",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumId",
+ "columnName": "album_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUrl",
+ "columnName": "album_art_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "bitrate",
+ "columnName": "bitrate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "fileSize",
+ "columnName": "file_size",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateModified",
+ "columnName": "date_modified",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_gdrive_songs_drive_file_id",
+ "unique": false,
+ "columnNames": [
+ "drive_file_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_gdrive_songs_drive_file_id` ON `${TABLE_NAME}` (`drive_file_id`)"
+ },
+ {
+ "name": "index_gdrive_songs_folder_id",
+ "unique": false,
+ "columnNames": [
+ "folder_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_gdrive_songs_folder_id` ON `${TABLE_NAME}` (`folder_id`)"
+ },
+ {
+ "name": "index_gdrive_songs_folder_id_date_added",
+ "unique": false,
+ "columnNames": [
+ "folder_id",
+ "date_added"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_gdrive_songs_folder_id_date_added` ON `${TABLE_NAME}` (`folder_id`, `date_added`)"
+ }
+ ]
+ },
+ {
+ "tableName": "gdrive_folders",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `song_count` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "playlists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `created_at` INTEGER NOT NULL, `last_modified` INTEGER NOT NULL, `is_ai_generated` INTEGER NOT NULL, `is_queue_generated` INTEGER NOT NULL, `cover_image_uri` TEXT, `cover_color_argb` INTEGER, `cover_icon_name` TEXT, `cover_shape_type` TEXT, `cover_shape_detail_1` REAL, `cover_shape_detail_2` REAL, `cover_shape_detail_3` REAL, `cover_shape_detail_4` REAL, `source` TEXT NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "createdAt",
+ "columnName": "created_at",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastModified",
+ "columnName": "last_modified",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isAiGenerated",
+ "columnName": "is_ai_generated",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "isQueueGenerated",
+ "columnName": "is_queue_generated",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "coverImageUri",
+ "columnName": "cover_image_uri",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "coverColorArgb",
+ "columnName": "cover_color_argb",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "coverIconName",
+ "columnName": "cover_icon_name",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "coverShapeType",
+ "columnName": "cover_shape_type",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "coverShapeDetail1",
+ "columnName": "cover_shape_detail_1",
+ "affinity": "REAL"
+ },
+ {
+ "fieldPath": "coverShapeDetail2",
+ "columnName": "cover_shape_detail_2",
+ "affinity": "REAL"
+ },
+ {
+ "fieldPath": "coverShapeDetail3",
+ "columnName": "cover_shape_detail_3",
+ "affinity": "REAL"
+ },
+ {
+ "fieldPath": "coverShapeDetail4",
+ "columnName": "cover_shape_detail_4",
+ "affinity": "REAL"
+ },
+ {
+ "fieldPath": "source",
+ "columnName": "source",
+ "affinity": "TEXT",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_playlists_last_modified",
+ "unique": false,
+ "columnNames": [
+ "last_modified"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playlists_last_modified` ON `${TABLE_NAME}` (`last_modified`)"
+ }
+ ]
+ },
+ {
+ "tableName": "playlist_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`playlist_id` TEXT NOT NULL, `song_id` TEXT NOT NULL, `sort_order` INTEGER NOT NULL, PRIMARY KEY(`playlist_id`, `song_id`))",
+ "fields": [
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlist_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "songId",
+ "columnName": "song_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "sortOrder",
+ "columnName": "sort_order",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "playlist_id",
+ "song_id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_playlist_songs_playlist_id_sort_order",
+ "unique": false,
+ "columnNames": [
+ "playlist_id",
+ "sort_order"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playlist_songs_playlist_id_sort_order` ON `${TABLE_NAME}` (`playlist_id`, `sort_order`)"
+ },
+ {
+ "name": "index_playlist_songs_song_id",
+ "unique": false,
+ "columnNames": [
+ "song_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_playlist_songs_song_id` ON `${TABLE_NAME}` (`song_id`)"
+ }
+ ]
+ },
+ {
+ "tableName": "qqmusic_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `song_mid` TEXT NOT NULL, `playlist_id` INTEGER NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `album` TEXT NOT NULL, `album_mid` TEXT, `duration` INTEGER NOT NULL, `album_art_url` TEXT, `mime_type` TEXT NOT NULL, `bitrate` INTEGER, `date_added` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "songMid",
+ "columnName": "song_mid",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlist_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "album",
+ "columnName": "album",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumMid",
+ "columnName": "album_mid",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumArtUrl",
+ "columnName": "album_art_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "bitrate",
+ "columnName": "bitrate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "qqmusic_playlists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `name` TEXT NOT NULL, `cover_url` TEXT, `song_count` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "coverUrl",
+ "columnName": "cover_url",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "navidrome_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `navidrome_id` TEXT NOT NULL, `playlist_id` TEXT NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `artist_id` TEXT, `album` TEXT NOT NULL, `album_id` TEXT, `cover_art_id` TEXT, `duration` INTEGER NOT NULL, `track_number` INTEGER NOT NULL, `disc_number` INTEGER NOT NULL, `year` INTEGER NOT NULL, `genre` TEXT, `bitRate` INTEGER, `mime_type` TEXT, `suffix` TEXT, `path` TEXT NOT NULL, `date_added` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "navidromeId",
+ "columnName": "navidrome_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlist_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistId",
+ "columnName": "artist_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "album",
+ "columnName": "album",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumId",
+ "columnName": "album_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "coverArtId",
+ "columnName": "cover_art_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "trackNumber",
+ "columnName": "track_number",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "discNumber",
+ "columnName": "disc_number",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "year",
+ "columnName": "year",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "genre",
+ "columnName": "genre",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "bitRate",
+ "columnName": "bitRate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "suffix",
+ "columnName": "suffix",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "path",
+ "columnName": "path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_navidrome_songs_navidrome_id",
+ "unique": false,
+ "columnNames": [
+ "navidrome_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_navidrome_songs_navidrome_id` ON `${TABLE_NAME}` (`navidrome_id`)"
+ },
+ {
+ "name": "index_navidrome_songs_playlist_id",
+ "unique": false,
+ "columnNames": [
+ "playlist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_navidrome_songs_playlist_id` ON `${TABLE_NAME}` (`playlist_id`)"
+ },
+ {
+ "name": "index_navidrome_songs_playlist_id_date_added",
+ "unique": false,
+ "columnNames": [
+ "playlist_id",
+ "date_added"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_navidrome_songs_playlist_id_date_added` ON `${TABLE_NAME}` (`playlist_id`, `date_added`)"
+ }
+ ]
+ },
+ {
+ "tableName": "navidrome_playlists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `comment` TEXT, `owner` TEXT, `cover_art_id` TEXT, `song_count` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `public` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "comment",
+ "columnName": "comment",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "owner",
+ "columnName": "owner",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "coverArtId",
+ "columnName": "cover_art_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "public",
+ "columnName": "public",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "telegram_topics",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `chat_id` INTEGER NOT NULL, `thread_id` INTEGER NOT NULL, `name` TEXT NOT NULL, `song_count` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, `icon_emoji` TEXT, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "chatId",
+ "columnName": "chat_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "threadId",
+ "columnName": "thread_id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "iconEmoji",
+ "columnName": "icon_emoji",
+ "affinity": "TEXT"
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_telegram_topics_chat_id",
+ "unique": false,
+ "columnNames": [
+ "chat_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_telegram_topics_chat_id` ON `${TABLE_NAME}` (`chat_id`)"
+ }
+ ]
+ },
+ {
+ "tableName": "jellyfin_songs",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `jellyfin_id` TEXT NOT NULL, `playlist_id` TEXT NOT NULL, `title` TEXT NOT NULL, `artist` TEXT NOT NULL, `artist_id` TEXT, `album` TEXT NOT NULL, `album_id` TEXT, `duration` INTEGER NOT NULL, `track_number` INTEGER NOT NULL, `disc_number` INTEGER NOT NULL, `year` INTEGER NOT NULL, `genre` TEXT, `bitRate` INTEGER, `mime_type` TEXT, `path` TEXT NOT NULL, `date_added` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "jellyfinId",
+ "columnName": "jellyfin_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "playlistId",
+ "columnName": "playlist_id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "title",
+ "columnName": "title",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artist",
+ "columnName": "artist",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "artistId",
+ "columnName": "artist_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "album",
+ "columnName": "album",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "albumId",
+ "columnName": "album_id",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "trackNumber",
+ "columnName": "track_number",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "discNumber",
+ "columnName": "disc_number",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "year",
+ "columnName": "year",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "genre",
+ "columnName": "genre",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "bitRate",
+ "columnName": "bitRate",
+ "affinity": "INTEGER"
+ },
+ {
+ "fieldPath": "mimeType",
+ "columnName": "mime_type",
+ "affinity": "TEXT"
+ },
+ {
+ "fieldPath": "path",
+ "columnName": "path",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "dateAdded",
+ "columnName": "date_added",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ },
+ "indices": [
+ {
+ "name": "index_jellyfin_songs_jellyfin_id",
+ "unique": false,
+ "columnNames": [
+ "jellyfin_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_jellyfin_songs_jellyfin_id` ON `${TABLE_NAME}` (`jellyfin_id`)"
+ },
+ {
+ "name": "index_jellyfin_songs_playlist_id",
+ "unique": false,
+ "columnNames": [
+ "playlist_id"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_jellyfin_songs_playlist_id` ON `${TABLE_NAME}` (`playlist_id`)"
+ },
+ {
+ "name": "index_jellyfin_songs_playlist_id_date_added",
+ "unique": false,
+ "columnNames": [
+ "playlist_id",
+ "date_added"
+ ],
+ "orders": [],
+ "createSql": "CREATE INDEX IF NOT EXISTS `index_jellyfin_songs_playlist_id_date_added` ON `${TABLE_NAME}` (`playlist_id`, `date_added`)"
+ }
+ ]
+ },
+ {
+ "tableName": "jellyfin_playlists",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` TEXT NOT NULL, `name` TEXT NOT NULL, `song_count` INTEGER NOT NULL, `duration` INTEGER NOT NULL, `last_sync_time` INTEGER NOT NULL, PRIMARY KEY(`id`))",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "name",
+ "columnName": "name",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "songCount",
+ "columnName": "song_count",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "duration",
+ "columnName": "duration",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "lastSyncTime",
+ "columnName": "last_sync_time",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "id"
+ ]
+ }
+ },
+ {
+ "tableName": "ai_cache",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`promptHash` TEXT NOT NULL, `responseJson` TEXT NOT NULL, `timestamp` INTEGER NOT NULL, PRIMARY KEY(`promptHash`))",
+ "fields": [
+ {
+ "fieldPath": "promptHash",
+ "columnName": "promptHash",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "responseJson",
+ "columnName": "responseJson",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "timestamp",
+ "columnName": "timestamp",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": false,
+ "columnNames": [
+ "promptHash"
+ ]
+ }
+ },
+ {
+ "tableName": "ai_usage",
+ "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `timestamp` INTEGER NOT NULL, `provider` TEXT NOT NULL, `model` TEXT NOT NULL, `promptType` TEXT NOT NULL, `promptTokens` INTEGER NOT NULL, `outputTokens` INTEGER NOT NULL, `thoughtTokens` INTEGER NOT NULL)",
+ "fields": [
+ {
+ "fieldPath": "id",
+ "columnName": "id",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "timestamp",
+ "columnName": "timestamp",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "provider",
+ "columnName": "provider",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "model",
+ "columnName": "model",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "promptType",
+ "columnName": "promptType",
+ "affinity": "TEXT",
+ "notNull": true
+ },
+ {
+ "fieldPath": "promptTokens",
+ "columnName": "promptTokens",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "outputTokens",
+ "columnName": "outputTokens",
+ "affinity": "INTEGER",
+ "notNull": true
+ },
+ {
+ "fieldPath": "thoughtTokens",
+ "columnName": "thoughtTokens",
+ "affinity": "INTEGER",
+ "notNull": true
+ }
+ ],
+ "primaryKey": {
+ "autoGenerate": true,
+ "columnNames": [
+ "id"
+ ]
+ }
+ }
+ ],
+ "setupQueries": [
+ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
+ "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'e6c4f6c20d810ef8cb2cf2856151cc0f')"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/app/src/androidTest/java/com/theveloper/pixelplay/data/database/MusicDaoTest.kt b/app/src/androidTest/java/com/theveloper/pixelplay/data/database/MusicDaoTest.kt
index b9045e6fe5..e9aa935700 100644
--- a/app/src/androidTest/java/com/theveloper/pixelplay/data/database/MusicDaoTest.kt
+++ b/app/src/androidTest/java/com/theveloper/pixelplay/data/database/MusicDaoTest.kt
@@ -74,6 +74,159 @@ class MusicDaoTest {
return ArtistEntity(id = id, name = name, trackCount = 10, imageUrl = null)
}
+ // --- Artist de-duplication (case / whitespace variants) ---
+
+ @Test
+ @Throws(Exception::class)
+ fun mergeDuplicateArtistsCollapsesCaseVariantsAndKeepsSongs() = runTest {
+ // Three rows for one human, which is exactly what the old raw-name
+ // lookup in SyncWorker produced over successive scans.
+ musicDao.insertArtists(
+ listOf(
+ createArtistEntity(1L, "Beyoncé"),
+ createArtistEntity(2L, "beyonce"),
+ createArtistEntity(3L, " BEYONCE ")
+ )
+ )
+ musicDao.insertSongs(
+ listOf(
+ createSongEntity(11L, "Halo", "Beyoncé", "I Am", "/music/a/halo.mp3"),
+ createSongEntity(12L, "Irreplaceable", "beyonce", "I Am", "/music/a/irreplaceable.mp3")
+ )
+ )
+ musicDao.insertSongArtistCrossRefs(
+ listOf(
+ SongArtistCrossRef(11L, 1L, isPrimary = true),
+ SongArtistCrossRef(12L, 2L, isPrimary = true)
+ )
+ )
+
+ db.mergeDuplicateArtists()
+
+ val artists = db.musicDao().getAllArtistsListRaw()
+ assertEquals(1, artists.size)
+ // Lowest id survives.
+ assertEquals(1L, artists.first().id)
+
+ // Both songs survive and now point at the surviving artist.
+ val songs = musicDao.getSongsForArtistList(1L)
+ assertEquals(setOf(11L, 12L), songs.map { it.id }.toSet())
+ assertEquals(1L, songs.first().artistId)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun mergeDuplicateArtistsPreservesArtworkFromTheDuplicate() = runTest {
+ // The survivor has no image but a duplicate does; the merge must not cost
+ // the user their artist artwork.
+ musicDao.insertArtists(
+ listOf(
+ createArtistEntity(1L, "Radiohead"),
+ ArtistEntity(id = 2L, name = "radiohead", trackCount = 4, imageUrl = "https://img/radiohead.jpg")
+ )
+ )
+
+ db.mergeDuplicateArtists()
+
+ val survivor = musicDao.getArtistsByIds(listOf(1L)).single()
+ assertEquals("https://img/radiohead.jpg", survivor.imageUrl)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun mergeDuplicateArtistsIsIdempotent() = runTest {
+ musicDao.insertArtists(
+ listOf(
+ createArtistEntity(1L, "Aphex Twin"),
+ createArtistEntity(2L, "aphex twin")
+ )
+ )
+ musicDao.insertSongs(
+ listOf(createSongEntity(21L, "Xtal", "Aphex Twin", "SAW", "/music/a/xtal.mp3"))
+ )
+ musicDao.insertSongArtistCrossRefs(listOf(SongArtistCrossRef(21L, 2L, isPrimary = true)))
+
+ db.mergeDuplicateArtists()
+ val afterFirst = musicDao.getAllArtistsListRaw()
+ val refsAfterFirst = musicDao.getCrossRefsForSong(21L)
+
+ db.mergeDuplicateArtists()
+ val afterSecond = musicDao.getAllArtistsListRaw()
+ val refsAfterSecond = musicDao.getCrossRefsForSong(21L)
+
+ assertEquals(afterFirst.map { it.id }, afterSecond.map { it.id })
+ assertEquals(refsAfterFirst, refsAfterSecond)
+ assertEquals(1, afterSecond.size)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun mergeDuplicateArtistsLeavesDistinctNamesAlone() = runTest {
+ // "The Beatles" and "Beatles" are different artists and must not merge.
+ musicDao.insertArtists(
+ listOf(
+ createArtistEntity(1L, "The Beatles"),
+ createArtistEntity(2L, "Beatles")
+ )
+ )
+
+ db.mergeDuplicateArtists()
+
+ assertEquals(2, musicDao.getAllArtistsListRaw().size)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun mergeDuplicateArtistsDropsRedundantCrossRefWhenSongIsCreditedToBothDuplicates() = runTest {
+ // (song_id, artist_id) is a composite primary key, so re-pointing the
+ // loser's ref must not create a duplicate for the survivor.
+ musicDao.insertArtists(
+ listOf(
+ createArtistEntity(1L, "Portishead"),
+ createArtistEntity(2L, "PORTISHEAD")
+ )
+ )
+ musicDao.insertSongs(
+ listOf(createSongEntity(31L, "Roads", "Portishead", "Dummy", "/music/a/roads.mp3"))
+ )
+ musicDao.insertSongArtistCrossRefs(
+ listOf(
+ SongArtistCrossRef(31L, 1L, isPrimary = true),
+ SongArtistCrossRef(31L, 2L, isPrimary = false)
+ )
+ )
+
+ db.mergeDuplicateArtists()
+
+ val refs = musicDao.getCrossRefsForSong(31L)
+ assertEquals(1, refs.size)
+ assertEquals(1L, refs.first().artistId)
+ }
+
+ @Test
+ @Throws(Exception::class)
+ fun recomputeAllArtistTrackCountsReflectsCrossRefs() = runTest {
+ musicDao.insertArtists(listOf(createArtistEntity(1L, "Massive Attack")))
+ musicDao.insertSongs(
+ listOf(
+ createSongEntity(41L, "Teardrop", "Massive Attack", "Mezzanine", "/music/a/teardrop.mp3"),
+ createSongEntity(42L, "Angel", "Massive Attack", "Mezzanine", "/music/a/angel.mp3")
+ )
+ )
+ musicDao.insertSongArtistCrossRefs(
+ listOf(
+ SongArtistCrossRef(41L, 1L, isPrimary = true),
+ SongArtistCrossRef(42L, 1L, isPrimary = true)
+ )
+ )
+ // The helper seeds a deliberately wrong count.
+ musicDao.insertArtists(listOf(createArtistEntity(1L, "Massive Attack").copy(trackCount = 99)))
+
+ musicDao.recomputeAllArtistTrackCounts()
+
+ assertEquals(2, musicDao.getArtistsByIds(listOf(1L)).single().trackCount)
+ }
+
@Test
@Throws(Exception::class)
fun insertAndGetSongs() = runTest {
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/ai/AiPlaylistGenerator.kt b/app/src/main/java/com/theveloper/pixelplay/data/ai/AiPlaylistGenerator.kt
index 06b91dce44..ac7616200e 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/ai/AiPlaylistGenerator.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/ai/AiPlaylistGenerator.kt
@@ -54,7 +54,7 @@ class AiPlaylistGenerator @Inject constructor(
val genre = song.genre?.replace("\"", "'")?.take(15) ?: "?"
if (index > 0) append(",\n")
if (useExtendedFields) {
- val album = song.album?.replace("\"", "'")?.take(25) ?: "?"
+ val album = song.album.replace("\"", "'").take(25)
val dur = song.duration
val fav = if (song.isFavorite) "1" else "0"
append("""{"id":"${song.id}","t":"$title","a":"$artist","g":"$genre","al":"$album","d":$dur,"f":$fav,"s":$score}""")
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/database/MusicDao.kt b/app/src/main/java/com/theveloper/pixelplay/data/database/MusicDao.kt
index 8a141e350e..5c300a84ba 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/database/MusicDao.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/database/MusicDao.kt
@@ -1630,6 +1630,30 @@ interface MusicDao {
@Query("DELETE FROM artists WHERE NOT EXISTS (SELECT 1 FROM song_artist_cross_ref WHERE song_artist_cross_ref.artist_id = artists.id)")
suspend fun deleteOrphanedArtists()
+ /**
+ * Recomputes the denormalised `artists.track_count` from the cross-reference
+ * table for every artist.
+ *
+ * `track_count` is a cache of `COUNT(DISTINCT song_id)` per artist. Sync
+ * recomputes it only for artists touched by the current batch, so artists
+ * outside that batch keep whatever value they had — which goes stale after
+ * songs are deleted or after [PixelPlayDatabase.mergeDuplicateArtists]
+ * collapses duplicate rows. The artist list queries compute the count live,
+ * so this column is not load-bearing; it is kept correct so diagnostics and
+ * any future query that reads it directly are not misled.
+ */
+ @Query(
+ """
+ UPDATE artists
+ SET track_count = (
+ SELECT COUNT(DISTINCT song_artist_cross_ref.song_id)
+ FROM song_artist_cross_ref
+ WHERE song_artist_cross_ref.artist_id = artists.id
+ )
+ """
+ )
+ suspend fun recomputeAllArtistTrackCounts()
+
// --- Favorite Operations ---
@Query("UPDATE songs SET is_favorite = :isFavorite WHERE id = :songId")
suspend fun setFavoriteStatus(songId: Long, isFavorite: Boolean)
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt b/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt
index 094929dd9f..5975857226 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt
@@ -3,6 +3,7 @@ package com.theveloper.pixelplay.data.database
import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.migration.Migration
+import androidx.room.withTransaction
import androidx.sqlite.db.SupportSQLiteDatabase
@Database(
@@ -36,7 +37,7 @@ import androidx.sqlite.db.SupportSQLiteDatabase
AiCacheEntity::class,
AiUsageEntity::class
],
- version = 42,
+ version = 43,
exportSchema = true
)
abstract class PixelPlayDatabase : RoomDatabase() {
@@ -57,6 +58,26 @@ abstract class PixelPlayDatabase : RoomDatabase() {
abstract fun aiCacheDao(): AiCacheDao
abstract fun aiUsageDao(): AiUsageDao
+ /**
+ * Collapses artist rows that differ only by letter case or whitespace, and
+ * repairs the denormalised track counts.
+ *
+ * This is the re-runnable counterpart to [MIGRATION_42_43]: the migration
+ * runs it once on upgrade, and this exposes the exact same SQL for a
+ * database that is already at the current version (for example after
+ * restoring a backup, or once further artist-normalisation work lands).
+ * Idempotent — a second call finds no duplicate groups and returns.
+ *
+ * Exposed on the database rather than on [MusicDao] because it needs the
+ * raw [SupportSQLiteDatabase] to run multi-statement DDL/DML.
+ */
+ suspend fun mergeDuplicateArtists() {
+ withTransaction {
+ mergeDuplicateArtistsIn(openHelper.writableDatabase)
+ musicDao().recomputeAllArtistTrackCounts()
+ }
+ }
+
companion object {
// Gap-bridging no-op migrations for missing version ranges.
// These versions predate Telegram features; affected tables have since been
@@ -747,6 +768,188 @@ abstract class PixelPlayDatabase : RoomDatabase() {
}
}
+ /**
+ * Collapses artist rows that differ only by letter case / surrounding or
+ * internal whitespace into a single row per canonical name.
+ *
+ * Why this is needed: [com.theveloper.pixelplay.data.worker.SyncWorker]
+ * keyed its existing-artist map on the raw `name`, so a song tagged
+ * "beyonce" never matched a row stored as "Beyoncé" and minted a second
+ * row on every scan. Real libraries ended up with several rows per human.
+ *
+ * Merge rules:
+ * - The surviving row is the LOWEST id (matches the deterministic
+ * "first row wins" that the sync now uses when rebuilding its map).
+ * - A surviving row that has no artwork adopts the artwork of the
+ * duplicate with the largest track count, so merging never costs a
+ * user their artist image or custom photo.
+ * - Cross-references are re-pointed to the survivor. When a song was
+ * credited to two duplicates at once (possible: one via
+ * `songs.artist_id`, another via a cross-ref), the duplicate row is
+ * dropped rather than violating the (song_id, artist_id) primary key.
+ * - Track counts are recomputed from the cross-refs afterwards, since
+ * the stored `track_count` is denormalised and would otherwise be
+ * left half-merged.
+ *
+ * `LOWER(TRIM(name))` is the SQL counterpart of
+ * [com.theveloper.pixelplay.utils.artistNameKey]. It does not collapse
+ * internal whitespace runs (SQLite has no regexp by default), which is
+ * why the sync resolves names in memory instead of via SQL.
+ */
+ val MIGRATION_42_43 = object : Migration(42, 43) {
+ override fun migrate(db: SupportSQLiteDatabase) {
+ mergeDuplicateArtistsIn(db)
+ }
+ }
+
+ /**
+ * Collapses case/whitespace-variant artist rows in place.
+ *
+ * The single implementation behind both [MIGRATION_42_43] and
+ * [mergeDuplicateArtists], so the upgrade path and the re-runnable path
+ * cannot drift apart. Idempotent: a second run finds no duplicate groups
+ * and returns without writing anything.
+ */
+ fun mergeDuplicateArtistsIn(db: SupportSQLiteDatabase) {
+ if (!tableExists(db, "artists")) return
+
+ // loser_id -> survivor_id, materialised once so every statement below
+ // agrees on the mapping and no statement has to re-derive it.
+ db.execSQL("DROP TABLE IF EXISTS temp.artist_merge_map")
+ db.execSQL(
+ """
+ CREATE TEMP TABLE artist_merge_map (
+ loser_id INTEGER PRIMARY KEY,
+ survivor_id INTEGER NOT NULL
+ )
+ """.trimIndent()
+ )
+
+ db.execSQL(
+ """
+ INSERT INTO artist_merge_map (loser_id, survivor_id)
+ SELECT a.id, (
+ SELECT MIN(b.id)
+ FROM artists b
+ WHERE LOWER(TRIM(b.name)) = LOWER(TRIM(a.name))
+ )
+ FROM artists a
+ WHERE TRIM(a.name) != ''
+ AND EXISTS (
+ SELECT 1 FROM artists b
+ WHERE LOWER(TRIM(b.name)) = LOWER(TRIM(a.name))
+ )
+ AND a.id != (
+ SELECT MIN(b.id)
+ FROM artists b
+ WHERE LOWER(TRIM(b.name)) = LOWER(TRIM(a.name))
+ )
+ """.trimIndent()
+ )
+
+ val loserCount = db.query("SELECT COUNT(*) FROM artist_merge_map")
+ .use { if (it.moveToFirst()) it.getInt(0) else 0 }
+ if (loserCount == 0) {
+ db.execSQL("DROP TABLE IF EXISTS temp.artist_merge_map")
+ return
+ }
+
+ // Adopt artwork from a duplicate when the survivor has none. Ordered by
+ // track count so the most-established duplicate wins, which keeps
+ // Deezer art and user-uploaded photos from being lost by a merge.
+ db.execSQL(
+ """
+ UPDATE artists
+ SET image_url = COALESCE(
+ artists.image_url,
+ (
+ SELECT src.image_url
+ FROM artists src
+ INNER JOIN artist_merge_map m ON src.id = m.loser_id
+ WHERE m.survivor_id = artists.id
+ AND src.image_url IS NOT NULL
+ AND TRIM(src.image_url) != ''
+ ORDER BY src.track_count DESC, src.id ASC
+ LIMIT 1
+ )
+ )
+ WHERE id IN (SELECT DISTINCT survivor_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+ db.execSQL(
+ """
+ UPDATE artists
+ SET custom_image_uri = COALESCE(
+ artists.custom_image_uri,
+ (
+ SELECT src.custom_image_uri
+ FROM artists src
+ INNER JOIN artist_merge_map m ON src.id = m.loser_id
+ WHERE m.survivor_id = artists.id
+ AND src.custom_image_uri IS NOT NULL
+ AND TRIM(src.custom_image_uri) != ''
+ ORDER BY src.track_count DESC, src.id ASC
+ LIMIT 1
+ )
+ )
+ WHERE id IN (SELECT DISTINCT survivor_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+
+ // Re-point cross-refs to the survivor. OR IGNORE because
+ // (song_id, artist_id) is the composite primary key: a song already
+ // credited to the survivor would otherwise raise a constraint
+ // violation, and the loser's ref for that song is redundant anyway.
+ db.execSQL(
+ """
+ UPDATE OR IGNORE song_artist_cross_ref
+ SET artist_id = (
+ SELECT m.survivor_id FROM artist_merge_map m
+ WHERE m.loser_id = song_artist_cross_ref.artist_id
+ )
+ WHERE artist_id IN (SELECT loser_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+
+ // Sweep up refs that still point at a doomed row: those IGNORE skipped
+ // because the song already had a ref to the survivor.
+ db.execSQL(
+ """
+ DELETE FROM song_artist_cross_ref
+ WHERE artist_id IN (SELECT loser_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+
+ db.execSQL(
+ """
+ UPDATE songs
+ SET artist_id = (
+ SELECT m.survivor_id FROM artist_merge_map m
+ WHERE m.loser_id = songs.artist_id
+ )
+ WHERE artist_id IN (SELECT loser_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+
+ // Cross-refs carry ON DELETE CASCADE, so this is also a safety net.
+ db.execSQL("DELETE FROM artists WHERE id IN (SELECT loser_id FROM artist_merge_map)")
+
+ // Recompute the denormalised track counts from the surviving cross-refs.
+ db.execSQL(
+ """
+ UPDATE artists
+ SET track_count = (
+ SELECT COUNT(DISTINCT r.song_id)
+ FROM song_artist_cross_ref r
+ WHERE r.artist_id = artists.id
+ )
+ WHERE id IN (SELECT DISTINCT survivor_id FROM artist_merge_map)
+ """.trimIndent()
+ )
+
+ db.execSQL("DROP TABLE IF EXISTS temp.artist_merge_map")
+ }
+
private fun ensureSongsTableHasDateAdded(db: SupportSQLiteDatabase) {
if (!tableExists(db, "songs")) {
recreateSongsTable(db)
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/media/SongMetadataEditor.kt b/app/src/main/java/com/theveloper/pixelplay/data/media/SongMetadataEditor.kt
index e1f7c41eb6..350a43fa8e 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/media/SongMetadataEditor.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/media/SongMetadataEditor.kt
@@ -24,6 +24,7 @@ import com.theveloper.pixelplay.data.preferences.UserPreferencesRepository
import com.theveloper.pixelplay.data.worker.collectArtistNames
import com.theveloper.pixelplay.utils.AlbumArtUtils
import com.theveloper.pixelplay.utils.LocalArtworkUri
+import com.theveloper.pixelplay.utils.artistNameKey
import com.theveloper.pixelplay.utils.MediaStorePermissionHelper
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.first // Added
@@ -158,8 +159,19 @@ class SongMetadataEditor(
discNumber: Int?
) {
val existingArtists = musicDao.getAllArtistsListRaw()
+ // Keyed by artistNameKey(), the same canonical key SyncWorker uses. This
+ // method used to normalise inline (trim().lowercase()) while SyncWorker
+ // used the raw name, so the two disagreed and a resync would create a
+ // second row for an artist a tag edit had just merged.
val existingByNormalizedName =
- existingArtists.associateBy { it.name.trim().lowercase(Locale.ROOT) }.toMutableMap()
+ LinkedHashMap(existingArtists.size)
+ val displayNameByKey = HashMap(existingArtists.size)
+ existingArtists.sortedBy { it.id }.forEach { artist ->
+ val key = artistNameKey(artist.name)
+ if (key.isEmpty()) return@forEach
+ existingByNormalizedName.putIfAbsent(key, artist)
+ displayNameByKey.putIfAbsent(key, artist.name)
+ }
var nextArtistId = (musicDao.getMaxArtistId() ?: 0L) + 1L
val artistDelimiters = userPreferencesRepository.artistDelimitersFlow.first()
@@ -179,9 +191,9 @@ class SongMetadataEditor(
val artistsToEnsure = mutableListOf()
val artistRefs = artistNames.mapIndexed { index, rawName ->
- val normalizedName = rawName.trim()
- val normalizedKey = normalizedName.lowercase(Locale.ROOT)
- val existingArtist = existingByNormalizedName[normalizedKey]
+ val incomingName = rawName.trim()
+ val key = artistNameKey(incomingName)
+ val existingArtist = existingByNormalizedName[key]
val artistId =
if (existingArtist != null) {
existingArtist.id
@@ -189,19 +201,22 @@ class SongMetadataEditor(
val newId = nextArtistId++
val newArtist = ArtistEntity(
id = newId,
- name = normalizedName,
+ name = incomingName,
trackCount = 0,
imageUrl = null,
customImageUri = null
)
- existingByNormalizedName[normalizedKey] = newArtist
+ existingByNormalizedName[key] = newArtist
+ displayNameByKey.putIfAbsent(key, incomingName)
artistsToEnsure += newArtist
newId
}
ArtistRef(
id = artistId,
- name = normalizedName,
+ // Preserve the artist's existing display casing rather than
+ // rewriting it from this tag.
+ name = displayNameByKey[key] ?: incomingName,
isPrimary = index == 0
)
}.filter { it.name.isNotEmpty() }
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/preferences/UserPreferencesRepository.kt b/app/src/main/java/com/theveloper/pixelplay/data/preferences/UserPreferencesRepository.kt
index 4598f1a86f..e3e19b7ba6 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/preferences/UserPreferencesRepository.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/preferences/UserPreferencesRepository.kt
@@ -149,6 +149,7 @@ class UserPreferencesRepository @Inject constructor(
val DISABLE_CAST_AUTOPLAY = booleanPreferencesKey("disable_cast_autoplay")
val RESUME_ON_HEADSET_RECONNECT = booleanPreferencesKey("resume_on_headset_reconnect")
val SHOW_QUEUE_HISTORY = booleanPreferencesKey("show_queue_history")
+ val DISMISS_MINI_PLAYER_ON_SWIPE = booleanPreferencesKey("dismiss_mini_player_on_swipe")
val PLAYBACK_QUEUE_SNAPSHOT = stringPreferencesKey("playback_queue_snapshot_v1")
val FULL_PLAYER_SHOW_FILE_INFO = booleanPreferencesKey("full_player_show_file_info")
val FULL_PLAYER_DELAY_ALBUM = booleanPreferencesKey("full_player_delay_album")
@@ -377,6 +378,13 @@ class UserPreferencesRepository @Inject constructor(
dataStore.edit { it[PreferencesKeys.SHOW_QUEUE_HISTORY] = show }
}
+ val dismissMiniPlayerOnSwipeFlow: Flow =
+ pref { it[PreferencesKeys.DISMISS_MINI_PLAYER_ON_SWIPE] ?: false }
+
+ suspend fun setDismissMiniPlayerOnSwipe(enabled: Boolean) {
+ dataStore.edit { it[PreferencesKeys.DISMISS_MINI_PLAYER_ON_SWIPE] = enabled }
+ }
+
val playbackQueueSnapshotFlow: Flow =
pref { preferences ->
preferences[PreferencesKeys.PLAYBACK_QUEUE_SNAPSHOT]?.let { raw ->
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/service/MusicService.kt b/app/src/main/java/com/theveloper/pixelplay/data/service/MusicService.kt
index adab461ca8..49b8124c86 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/service/MusicService.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/service/MusicService.kt
@@ -1109,11 +1109,23 @@ class MusicService : MediaLibraryService() {
widgetUpdateManager.requestFullUpdate(true)
}
PlayerActions.NEXT -> {
+ val shouldResumePlayback =
+ !player.playWhenReady && !player.isPlaying && player.hasNextMediaItem()
player.seekToNext()
+ if (shouldResumePlayback) player.play()
widgetUpdateManager.requestFullUpdate(true)
}
PlayerActions.PREVIOUS -> {
- player.seekToPrevious()
+ val shouldRestartCurrent = player.currentPosition > 10_000L
+ val shouldResumePlayback =
+ !player.playWhenReady && !player.isPlaying &&
+ !shouldRestartCurrent && player.hasPreviousMediaItem()
+ if (shouldRestartCurrent) {
+ player.seekTo(0)
+ } else {
+ player.seekToPrevious()
+ }
+ if (shouldResumePlayback) player.play()
widgetUpdateManager.requestFullUpdate(true)
}
PlayerActions.FAVORITE -> {
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/service/wear/WearCommandReceiver.kt b/app/src/main/java/com/theveloper/pixelplay/data/service/wear/WearCommandReceiver.kt
index 0b0ce27ee3..afe0c959ea 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/service/wear/WearCommandReceiver.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/service/wear/WearCommandReceiver.kt
@@ -124,8 +124,28 @@ class WearCommandReceiver : WearableListenerService() {
WearPlaybackCommand.TOGGLE_PLAY_PAUSE -> {
if (controller.isPlaying) controller.pause() else controller.play()
}
- WearPlaybackCommand.NEXT -> controller.seekToNext()
- WearPlaybackCommand.PREVIOUS -> controller.seekToPrevious()
+ WearPlaybackCommand.NEXT -> {
+ val shouldResumePlayback =
+ !controller.playWhenReady &&
+ !controller.isPlaying &&
+ controller.hasNextMediaItem()
+ controller.seekToNext()
+ if (shouldResumePlayback) controller.play()
+ }
+ WearPlaybackCommand.PREVIOUS -> {
+ val shouldRestartCurrent = controller.currentPosition > 10_000L
+ val shouldResumePlayback =
+ !controller.playWhenReady &&
+ !controller.isPlaying &&
+ !shouldRestartCurrent &&
+ controller.hasPreviousMediaItem()
+ if (shouldRestartCurrent) {
+ controller.seekTo(0)
+ } else {
+ controller.seekToPrevious()
+ }
+ if (shouldResumePlayback) controller.play()
+ }
WearPlaybackCommand.PLAY_QUEUE_INDEX -> {
val queueIndex = command.queueIndex
if (queueIndex == null) {
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtils.kt b/app/src/main/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtils.kt
index 2e017b99b8..36682e0647 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtils.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtils.kt
@@ -3,6 +3,7 @@ package com.theveloper.pixelplay.data.worker
import com.theveloper.pixelplay.data.database.AlbumEntity
import com.theveloper.pixelplay.data.database.SongEntity
import com.theveloper.pixelplay.utils.LocalArtworkUri
+import com.theveloper.pixelplay.utils.artistNameKey
import com.theveloper.pixelplay.utils.normalizeMetadataText
import com.theveloper.pixelplay.utils.normalizeMetadataTextOrEmpty
import com.theveloper.pixelplay.utils.splitArtistsByDelimiters
@@ -98,6 +99,15 @@ internal fun chooseAlbumDisplayArtist(
}
}
+/**
+ * Resolves the artist id for an album's display artist.
+ *
+ * [artistNameToId] is keyed by [artistNameKey], not by the raw name, so every
+ * lookup here goes through the same canonical key the sync used to build it.
+ * Before this, a lookup miss here silently fell through to the first song's
+ * artist, which attributed compilations and collaborations to an arbitrary
+ * artist.
+ */
internal fun resolveAlbumDisplayArtistId(
displayArtist: String,
songs: List,
@@ -105,14 +115,13 @@ internal fun resolveAlbumDisplayArtistId(
artistDelimiters: List,
wordDelimiters: List = emptyList()
): Long {
- artistNameToId[displayArtist.trim()]?.let { return it }
+ artistNameToId[artistNameKey(displayArtist)]?.let { return it }
val primaryArtistName = displayArtist
.splitArtistsByDelimiters(artistDelimiters, wordDelimiters)
.firstOrNull()
- ?.trim()
if (!primaryArtistName.isNullOrEmpty()) {
- artistNameToId[primaryArtistName]?.let { return it }
+ artistNameToId[artistNameKey(primaryArtistName)]?.let { return it }
}
return songs.firstOrNull()?.artistId ?: 0L
diff --git a/app/src/main/java/com/theveloper/pixelplay/data/worker/SyncWorker.kt b/app/src/main/java/com/theveloper/pixelplay/data/worker/SyncWorker.kt
index 46ed856982..a3b85d4d76 100644
--- a/app/src/main/java/com/theveloper/pixelplay/data/worker/SyncWorker.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/data/worker/SyncWorker.kt
@@ -40,6 +40,7 @@ import com.theveloper.pixelplay.utils.AlbumArtUtils
import com.theveloper.pixelplay.utils.AudioMetaUtils.getAudioMetadata
import com.theveloper.pixelplay.utils.DirectoryRuleResolver
import com.theveloper.pixelplay.utils.buildLocalAudioSelection
+import com.theveloper.pixelplay.utils.artistNameKey
import com.theveloper.pixelplay.utils.normalizeMetadataTextOrEmpty
import com.theveloper.pixelplay.utils.splitArtistsByDelimiters
import dagger.assisted.Assisted
@@ -259,8 +260,24 @@ constructor(
val existingArtistMetadata =
allExistingArtists.associate { it.id to (it.imageUrl to it.customImageUri) }
- // Load all existing artist IDs to ensure stability across incremental syncs
- val existingArtistIdMap = allExistingArtists.associate { it.name to it.id }.toMutableMap()
+ // Load all existing artist IDs to ensure stability across incremental syncs.
+ // Keyed by artistNameKey() (case/whitespace-insensitive) so a tag
+ // written as "beyonce" resolves to the row stored as "Beyoncé"
+ // instead of creating a second one.
+ //
+ // associateBy keeps the FIRST row for a given key, and the input is
+ // ordered by id so the lowest id wins deterministically. (The old
+ // `associate { it.name to it.id }` kept the LAST and silently dropped
+ // every earlier duplicate, leaving orphaned cross-refs behind.)
+ val orderedExistingArtists = allExistingArtists.sortedBy { it.id }
+ val existingArtistIdMap = LinkedHashMap(orderedExistingArtists.size)
+ val existingArtistDisplayNames = HashMap(orderedExistingArtists.size)
+ orderedExistingArtists.forEach { artist ->
+ val key = artistNameKey(artist.name)
+ if (key.isEmpty()) return@forEach
+ existingArtistIdMap.putIfAbsent(key, artist.id)
+ existingArtistDisplayNames.putIfAbsent(key, artist.name)
+ }
val maxArtistId = musicDao.getMaxArtistId() ?: 0L
Timber.tag(TAG)
@@ -276,6 +293,7 @@ constructor(
existingArtistMetadata = existingArtistMetadata,
existingAlbums = allExistingAlbums,
existingArtistIdMap = existingArtistIdMap,
+ existingArtistDisplayNames = existingArtistDisplayNames,
initialMaxArtistId = maxArtistId
)
@@ -514,11 +532,21 @@ constructor(
existingArtistMetadata: Map>,
existingAlbums: List,
existingArtistIdMap: MutableMap,
+ existingArtistDisplayNames: Map,
initialMaxArtistId: Long
): MultiArtistProcessResult {
val nextArtistId = AtomicLong(initialMaxArtistId + 1)
+ // Keyed by artistNameKey(), NOT by the raw name. See ArtistNameKey.kt: keying
+ // on the raw name minted a brand new artist row for every case/whitespace
+ // variant of an artist that already existed, inflating the artist list on
+ // every scan.
val artistNameToId = existingArtistIdMap // Re-use the map passed in
+
+ // The name already stored in the DB wins over the incoming file tag, so a
+ // song tagged "beyonce" cannot degrade the display name of an artist stored
+ // as "Beyoncé" (which would also break the Deezer image lookup).
+ val artistDisplayName = HashMap(existingArtistDisplayNames)
val allCrossRefs = mutableListOf()
val artistTrackCounts = mutableMapOf()
@@ -551,21 +579,23 @@ constructor(
}
allArtistsForSong.forEach { artistName ->
- val normalizedName = artistName.trim()
- if (normalizedName.isNotEmpty() && !artistNameToId.containsKey(normalizedName)) {
+ val displayName = artistName.trim()
+ val key = artistNameKey(displayName)
+ if (key.isNotEmpty() && !artistNameToId.containsKey(key)) {
val id = nextArtistId.getAndIncrement()
- artistNameToId[normalizedName] = id
+ artistNameToId[key] = id
+ artistDisplayName.putIfAbsent(key, displayName)
}
}
- val primaryArtistName =
- allArtistsForSong.firstOrNull()?.trim()?.takeIf { it.isNotEmpty() }
- ?: songArtistNameTrimmed
- val primaryArtistId = artistNameToId[primaryArtistName] ?: song.artistId
+ val primaryArtistKey =
+ allArtistsForSong.firstOrNull()?.let { artistNameKey(it) }?.takeIf { it.isNotEmpty() }
+ ?: artistNameKey(songArtistNameTrimmed)
+ val primaryArtistId = artistNameToId[primaryArtistKey] ?: song.artistId
allArtistsForSong.forEachIndexed { index, artistName ->
- val normalizedName = artistName.trim()
- val artistId = artistNameToId[normalizedName]
+ val key = artistNameKey(artistName)
+ val artistId = artistNameToId[key]
if (artistId != null) {
val isPrimary = (index == 0) // First artist is primary
allCrossRefs.add(
@@ -585,9 +615,10 @@ constructor(
// Build serialized artists JSON for efficient loading without JOINs
val artistRefsForJson = allArtistsForSong.mapIndexed { index, name ->
- val normalizedName = name.trim()
- val artistId = artistNameToId[normalizedName] ?: 0L
- ArtistRef(id = artistId, name = normalizedName, isPrimary = index == 0)
+ val key = artistNameKey(name)
+ val artistId = artistNameToId[key] ?: 0L
+ val displayName = artistDisplayName[key] ?: name.trim()
+ ArtistRef(id = artistId, name = displayName, isPrimary = index == 0)
}.filter { it.name.isNotEmpty() }
correctedSongs.add(
@@ -601,12 +632,12 @@ constructor(
}
// Build Entities
- val artistEntities = artistNameToId.map { (name, id) ->
+ val artistEntities = artistNameToId.map { (key, id) ->
val count = artistTrackCounts[id] ?: 0
val metadata = existingArtistMetadata[id]
ArtistEntity(
id = id,
- name = name,
+ name = artistDisplayName[key] ?: key,
trackCount = count,
imageUrl = metadata?.first,
customImageUri = metadata?.second
diff --git a/app/src/main/java/com/theveloper/pixelplay/di/AppModule.kt b/app/src/main/java/com/theveloper/pixelplay/di/AppModule.kt
index 7f1d935994..5965f95dcb 100644
--- a/app/src/main/java/com/theveloper/pixelplay/di/AppModule.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/di/AppModule.kt
@@ -165,7 +165,8 @@ object AppModule {
PixelPlayDatabase.MIGRATION_38_39,
PixelPlayDatabase.MIGRATION_39_40,
PixelPlayDatabase.MIGRATION_40_41,
- PixelPlayDatabase.MIGRATION_41_42
+ PixelPlayDatabase.MIGRATION_41_42,
+ PixelPlayDatabase.MIGRATION_42_43
)
.addCallback(PixelPlayDatabase.createRuntimeArtifactsCallback())
.setJournalMode(RoomDatabase.JournalMode.WRITE_AHEAD_LOGGING)
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/LyricsSheet.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/LyricsSheet.kt
index 9787826e8f..96475176f6 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/LyricsSheet.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/LyricsSheet.kt
@@ -107,7 +107,6 @@ import com.theveloper.pixelplay.presentation.components.subcomps.FetchLyricsDial
import com.theveloper.pixelplay.presentation.components.subcomps.PlayerSeekBar
import com.theveloper.pixelplay.presentation.viewmodel.LyricsSearchUiState
import com.theveloper.pixelplay.presentation.viewmodel.StablePlayerState
-import com.theveloper.pixelplay.ui.theme.GoogleSansRounded
import com.theveloper.pixelplay.utils.BubblesLine
import com.theveloper.pixelplay.utils.ProviderText
import com.theveloper.pixelplay.presentation.components.snapping.ExperimentalSnapperApi
@@ -686,7 +685,7 @@ fun LyricsSheet(
resetImmersiveTimer()
}
) {
- val initialSyncedLineIndex = remember(lyrics, playbackPositionFlow, lyricsSyncOffset) {
+ val initialSyncedLineIndex = remember(currentSong?.id, lyrics, playbackPositionFlow, lyricsSyncOffset) {
resolveCurrentLineIndex(
lines = lyrics?.synced.orEmpty(),
position = (playbackPositionFlow.value + lyricsSyncOffset).coerceAtLeast(0L)
@@ -696,6 +695,10 @@ fun LyricsSheet(
initialFirstVisibleItemIndex = initialSyncedLineIndex
)
val staticListState = rememberLazyListState()
+ LaunchedEffect(currentSong?.id, stablePlayerState.currentMediaItemIndex) {
+ syncedListState.scrollToItem(0)
+ staticListState.scrollToItem(0)
+ }
// Lyrics Content (Weight 1)
Box(
@@ -776,6 +779,7 @@ fun LyricsSheet(
.padding(horizontal = 24.dp),
contentPadding = PaddingValues(top = 130.dp, bottom = 100.dp),
lines = synced,
+ currentTrackKey = currentSong?.id to stablePlayerState.currentMediaItemIndex,
listState = syncedListState,
playbackPositionFlow = playbackPositionFlow,
lyricsSyncOffset = lyricsSyncOffset,
@@ -1191,6 +1195,7 @@ private fun LyricsPlaybackSeekBar(
@Composable
fun SyncedLyricsList(
lines: List,
+ currentTrackKey: Pair,
listState: LazyListState,
playbackPositionFlow: StateFlow,
lyricsSyncOffset: Int,
@@ -1225,6 +1230,18 @@ fun SyncedLyricsList(
}
var hasAlignedInitialLine by remember(lines) { mutableStateOf(false) }
var lastAutoScrolledLineIndex by remember(lines) { mutableIntStateOf(-1) }
+ var activeTrackKey by remember { mutableStateOf(currentTrackKey) }
+ var skipAutoScrollAfterTrackChange by remember { mutableStateOf(false) }
+
+ LaunchedEffect(currentTrackKey) {
+ if (activeTrackKey != currentTrackKey) {
+ activeTrackKey = currentTrackKey
+ hasAlignedInitialLine = true
+ lastAutoScrolledLineIndex = 0
+ skipAutoScrollAfterTrackChange = true
+ listState.scrollToItem(0)
+ }
+ }
BoxWithConstraints(modifier = modifier) {
val metrics = remember(maxHeight, highlightZoneFraction, highlightOffsetDp) {
@@ -1241,10 +1258,14 @@ fun SyncedLyricsList(
)
val flingBehavior = rememberSnapperFlingBehavior(layoutInfo = snapperLayoutInfo)
- LaunchedEffect(currentLineIndex, lines.size, metrics, isPreviewSeeking) {
+ LaunchedEffect(currentTrackKey, currentLineIndex, lines.size, metrics, isPreviewSeeking) {
if (lines.isEmpty()) return@LaunchedEffect
if (currentLineIndex !in lines.indices) return@LaunchedEffect
if (listState.layoutInfo.totalItemsCount == 0) return@LaunchedEffect
+ if (skipAutoScrollAfterTrackChange) {
+ skipAutoScrollAfterTrackChange = false
+ return@LaunchedEffect
+ }
if (!hasAlignedInitialLine) {
listState.scrollToItem(currentLineIndex)
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetLayers.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetLayers.kt
index 2aed352222..81b01ecf5f 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetLayers.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetLayers.kt
@@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.requiredHeight
import androidx.compose.material3.ColorScheme
+import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.derivedStateOf
@@ -219,44 +220,50 @@ internal fun BoxScope.UnifiedPlayerMiniAndFullLayers(
val onRepeatToggle = remember(playerViewModel) { playerViewModel::cycleRepeatMode }
val onFavoriteToggle = remember(playerViewModel) { playerViewModel::toggleFavorite }
- FullPlayerContent(
- currentSong = currentSongNonNull,
- currentPlaybackQueue = currentPlaybackQueue,
- currentQueueSourceName = currentQueueSourceName,
- currentMediaItemIndex = infrequentPlayerState.currentMediaItemIndex,
- isShuffleEnabled = infrequentPlayerState.isShuffleEnabled,
- shuffleTransitionInProgress = infrequentPlayerState.isShuffleTransitionInProgress,
- repeatMode = infrequentPlayerState.repeatMode,
- allowRealtimeUpdates = fullPlayerRuntimePolicy.allowRealtimeUpdates,
- expansionFractionProvider = expansionFractionProvider,
- currentSheetState = currentSheetContentState,
- carouselStyle = carouselStyle,
- loadingTweaks = fullPlayerLoadingTweaks,
- isSheetDragGestureActive = isSheetDragGestureActive,
- playerViewModel = playerViewModel,
- currentPositionProvider = currentPositionProvider,
- isPlayingProvider = isPlayingProvider,
- playWhenReadyProvider = playWhenReadyProvider,
- repeatModeProvider = repeatModeProvider,
- isShuffleEnabledProvider = isShuffleEnabledProvider,
- totalDurationProvider = totalDurationProvider,
- lyricsProvider = lyricsProvider,
- isCastConnecting = isCastConnecting,
- isFavoriteProvider = isFavoriteProvider,
- onPlayPause = onPlayPause,
- onSeek = onSeek,
- onNext = onNext,
- onPrevious = onPrevious,
- onCollapse = onCollapse,
- onShowQueueClicked = onShowQueueClicked,
- onQueueDragStart = onQueueDragStart,
- onQueueDrag = onQueueDrag,
- onQueueRelease = onQueueRelease,
- onShowCastClicked = onShowCastClicked,
- onShuffleToggle = onShuffleToggle,
- onRepeatToggle = onRepeatToggle,
- onFavoriteToggle = onFavoriteToggle
- )
+ MaterialTheme(
+ colorScheme = MaterialTheme.colorScheme,
+ typography = MaterialTheme.typography,
+ shapes = MaterialTheme.shapes
+ ) {
+ FullPlayerContent(
+ currentSong = currentSongNonNull,
+ currentPlaybackQueue = currentPlaybackQueue,
+ currentQueueSourceName = currentQueueSourceName,
+ currentMediaItemIndex = infrequentPlayerState.currentMediaItemIndex,
+ isShuffleEnabled = infrequentPlayerState.isShuffleEnabled,
+ shuffleTransitionInProgress = infrequentPlayerState.isShuffleTransitionInProgress,
+ repeatMode = infrequentPlayerState.repeatMode,
+ allowRealtimeUpdates = fullPlayerRuntimePolicy.allowRealtimeUpdates,
+ expansionFractionProvider = expansionFractionProvider,
+ currentSheetState = currentSheetContentState,
+ carouselStyle = carouselStyle,
+ loadingTweaks = fullPlayerLoadingTweaks,
+ isSheetDragGestureActive = isSheetDragGestureActive,
+ playerViewModel = playerViewModel,
+ currentPositionProvider = currentPositionProvider,
+ isPlayingProvider = isPlayingProvider,
+ playWhenReadyProvider = playWhenReadyProvider,
+ repeatModeProvider = repeatModeProvider,
+ isShuffleEnabledProvider = isShuffleEnabledProvider,
+ totalDurationProvider = totalDurationProvider,
+ lyricsProvider = lyricsProvider,
+ isCastConnecting = isCastConnecting,
+ isFavoriteProvider = isFavoriteProvider,
+ onPlayPause = onPlayPause,
+ onSeek = onSeek,
+ onNext = onNext,
+ onPrevious = onPrevious,
+ onCollapse = onCollapse,
+ onShowQueueClicked = onShowQueueClicked,
+ onQueueDragStart = onQueueDragStart,
+ onQueueDrag = onQueueDrag,
+ onQueueRelease = onQueueRelease,
+ onShowCastClicked = onShowCastClicked,
+ onShuffleToggle = onShuffleToggle,
+ onRepeatToggle = onRepeatToggle,
+ onFavoriteToggle = onFavoriteToggle
+ )
+ }
}
}
}
@@ -317,43 +324,49 @@ internal fun UnifiedPlayerPrewarmLayer(
val onRepeatToggle = remember(playerViewModel) { playerViewModel::cycleRepeatMode }
val onFavoriteToggle = remember(playerViewModel) { playerViewModel::toggleFavorite }
- FullPlayerContent(
- currentSong = currentSong,
- currentPlaybackQueue = currentPlaybackQueue,
- currentQueueSourceName = currentQueueSourceName,
- currentMediaItemIndex = infrequentPlayerState.currentMediaItemIndex,
- isShuffleEnabled = infrequentPlayerState.isShuffleEnabled,
- shuffleTransitionInProgress = infrequentPlayerState.isShuffleTransitionInProgress,
- repeatMode = infrequentPlayerState.repeatMode,
- allowRealtimeUpdates = false,
- expansionFractionProvider = { 1f },
- currentSheetState = PlayerSheetState.EXPANDED,
- carouselStyle = carouselStyle,
- loadingTweaks = fullPlayerLoadingTweaks,
- playerViewModel = playerViewModel,
- currentPositionProvider = currentPositionProvider,
- isPlayingProvider = isPlayingProvider,
- playWhenReadyProvider = playWhenReadyProvider,
- repeatModeProvider = repeatModeProvider,
- isShuffleEnabledProvider = isShuffleEnabledProvider,
- totalDurationProvider = totalDurationProvider,
- lyricsProvider = lyricsProvider,
- isCastConnecting = isCastConnecting,
- isFavoriteProvider = isFavoriteProvider,
- onShowQueueClicked = onShowQueueClicked,
- onQueueDragStart = onQueueDragStart,
- onQueueDrag = onQueueDrag,
- onQueueRelease = onQueueRelease,
- onPlayPause = onPlayPause,
- onSeek = onSeek,
- onNext = onNext,
- onPrevious = onPrevious,
- onCollapse = {},
- onShowCastClicked = {},
- onShuffleToggle = onShuffleToggle,
- onRepeatToggle = onRepeatToggle,
- onFavoriteToggle = onFavoriteToggle
- )
+ MaterialTheme(
+ colorScheme = MaterialTheme.colorScheme,
+ typography = MaterialTheme.typography,
+ shapes = MaterialTheme.shapes
+ ) {
+ FullPlayerContent(
+ currentSong = currentSong,
+ currentPlaybackQueue = currentPlaybackQueue,
+ currentQueueSourceName = currentQueueSourceName,
+ currentMediaItemIndex = infrequentPlayerState.currentMediaItemIndex,
+ isShuffleEnabled = infrequentPlayerState.isShuffleEnabled,
+ shuffleTransitionInProgress = infrequentPlayerState.isShuffleTransitionInProgress,
+ repeatMode = infrequentPlayerState.repeatMode,
+ allowRealtimeUpdates = false,
+ expansionFractionProvider = { 1f },
+ currentSheetState = PlayerSheetState.EXPANDED,
+ carouselStyle = carouselStyle,
+ loadingTweaks = fullPlayerLoadingTweaks,
+ playerViewModel = playerViewModel,
+ currentPositionProvider = currentPositionProvider,
+ isPlayingProvider = isPlayingProvider,
+ playWhenReadyProvider = playWhenReadyProvider,
+ repeatModeProvider = repeatModeProvider,
+ isShuffleEnabledProvider = isShuffleEnabledProvider,
+ totalDurationProvider = totalDurationProvider,
+ lyricsProvider = lyricsProvider,
+ isCastConnecting = isCastConnecting,
+ isFavoriteProvider = isFavoriteProvider,
+ onShowQueueClicked = onShowQueueClicked,
+ onQueueDragStart = onQueueDragStart,
+ onQueueDrag = onQueueDrag,
+ onQueueRelease = onQueueRelease,
+ onPlayPause = onPlayPause,
+ onSeek = onSeek,
+ onNext = onNext,
+ onPrevious = onPrevious,
+ onCollapse = {},
+ onShowCastClicked = {},
+ onShuffleToggle = onShuffleToggle,
+ onRepeatToggle = onRepeatToggle,
+ onFavoriteToggle = onFavoriteToggle
+ )
+ }
}
}
}
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt
index 59ae7c316d..0e40badc30 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetShared.kt
@@ -46,7 +46,6 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.size.Size
import com.theveloper.pixelplay.data.model.Song
-import com.theveloper.pixelplay.ui.theme.GoogleSansRounded
internal val LocalMaterialTheme = compositionLocalOf { error("No ColorScheme provided") }
@@ -120,13 +119,11 @@ internal fun MiniPlayerContentInternal(
fontSize = 15.sp,
fontWeight = FontWeight.SemiBold,
letterSpacing = (-0.2).sp,
- fontFamily = GoogleSansRounded,
color = LocalMaterialTheme.current.onPrimaryContainer
)
val artistStyle = MaterialTheme.typography.bodySmall.copy(
fontSize = 13.sp,
letterSpacing = 0.sp,
- fontFamily = GoogleSansRounded,
color = LocalMaterialTheme.current.onPrimaryContainer.copy(alpha = 0.7f)
)
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetV2.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetV2.kt
index d692ed9fd8..296500e34a 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetV2.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/UnifiedPlayerSheetV2.kt
@@ -69,12 +69,12 @@ import com.theveloper.pixelplay.presentation.components.scoped.PlayerArtistNavig
import com.theveloper.pixelplay.presentation.components.scoped.PlayerSheetPredictiveBackHandler
import com.theveloper.pixelplay.presentation.components.scoped.QueueSheetRuntimeEffects
import com.theveloper.pixelplay.presentation.components.scoped.SheetMotionController
-import com.theveloper.pixelplay.presentation.components.scoped.miniPlayerDismissHorizontalGesture
+import com.theveloper.pixelplay.presentation.components.scoped.miniPlayerSwipeHorizontalGesture
import com.theveloper.pixelplay.presentation.components.scoped.playerSheetVerticalDragGesture
import com.theveloper.pixelplay.presentation.components.scoped.rememberFullPlayerCompositionPolicy
import com.theveloper.pixelplay.presentation.components.scoped.rememberCastSheetState
import com.theveloper.pixelplay.presentation.components.scoped.rememberFullPlayerVisualState
-import com.theveloper.pixelplay.presentation.components.scoped.rememberMiniPlayerDismissGestureHandler
+import com.theveloper.pixelplay.presentation.components.scoped.rememberMiniPlayerSwipeGestureHandler
import com.theveloper.pixelplay.presentation.components.scoped.rememberPrewarmFullPlayer
import com.theveloper.pixelplay.presentation.components.scoped.rememberQueueSheetState
import com.theveloper.pixelplay.presentation.components.scoped.rememberSheetActionHandlers
@@ -92,7 +92,6 @@ import kotlinx.collections.immutable.persistentListOf
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.launch
-import kotlin.math.abs
import kotlin.math.roundToInt
private data class PlayerUiSheetSliceV2(
@@ -205,6 +204,7 @@ fun UnifiedPlayerSheetV2(
val preparingSongId = playerUiSheetSlice.preparingSongId
val currentSheetContentState by playerViewModel.sheetState.collectAsStateWithLifecycle()
+ val dismissMiniPlayerOnSwipe by playerViewModel.dismissMiniPlayerOnSwipe.collectAsStateWithLifecycle()
val predictiveBackCollapseProgress by playerViewModel.predictiveBackCollapseFraction.collectAsStateWithLifecycle()
val predictiveBackSwipeEdge by playerViewModel.predictiveBackSwipeEdge.collectAsStateWithLifecycle()
val prewarmFullPlayer = rememberPrewarmFullPlayer(infrequentPlayerState.currentSong?.id)
@@ -221,18 +221,11 @@ fun UnifiedPlayerSheetV2(
val density = LocalDensity.current
val configuration = LocalConfiguration.current
val scope = rememberCoroutineScope()
+ val miniPlayerSwipeOffset = remember { Animatable(0f) }
- val offsetAnimatable = remember { Animatable(0f) }
val screenWidthPx = remember(configuration, density) {
with(density) { configuration.screenWidthDp.dp.toPx() }
}
- val dismissThresholdPx = remember(screenWidthPx) { screenWidthPx * 0.4f }
- val swipeDismissProgress by remember(dismissThresholdPx) {
- derivedStateOf {
- if (dismissThresholdPx == 0f) 0f
- else (abs(offsetAnimatable.value) / dismissThresholdPx).coerceIn(0f, 1f)
- }
- }
val screenHeightPx = remember(configuration, density) {
with(density) { configuration.screenHeightDp.dp.toPx() }
@@ -402,7 +395,7 @@ fun UnifiedPlayerSheetV2(
isNavBarHidden = isNavBarHidden,
isPlaying = infrequentPlayerState.isPlaying,
hasCurrentSong = infrequentPlayerState.currentSong != null,
- swipeDismissProgress = swipeDismissProgress
+ swipeDismissProgress = 0f
)
val currentBottomPadding = sheetVisualState.currentBottomPadding
val baseBottomPadding = sheetVisualState.baseBottomPadding
@@ -465,13 +458,16 @@ fun UnifiedPlayerSheetV2(
)
val hapticFeedback = LocalHapticFeedback.current
- val miniDismissGestureHandler = rememberMiniPlayerDismissGestureHandler(
+ val miniPlayerSwipeGestureHandler = rememberMiniPlayerSwipeGestureHandler(
scope = scope,
density = density,
hapticFeedback = hapticFeedback,
- offsetAnimatable = offsetAnimatable,
+ offsetAnimatable = miniPlayerSwipeOffset,
screenWidthPx = screenWidthPx,
- onDismissPlaylistAndShowUndo = { playerViewModel.dismissPlaylistAndShowUndo() },
+ dismissEnabled = dismissMiniPlayerOnSwipe,
+ onSwipeToNext = { playerViewModel.nextSong() },
+ onSwipeToPrevious = { playerViewModel.previousSong() },
+ onDismiss = { playerViewModel.dismissPlaylistAndShowUndo() },
onDismissStarted = { playerViewModel.setMiniPlayerDismissing(true) }
)
@@ -652,7 +648,7 @@ fun UnifiedPlayerSheetV2(
modifier = Modifier
.fillMaxWidth()
.graphicsLayer {
- translationX = offsetAnimatable.value
+ translationX = miniPlayerSwipeOffset.value
scaleX = miniAppearScale
scaleY = visualOvershootScaleY.value * miniAppearScale
alpha = miniReadyAlpha
@@ -726,9 +722,9 @@ fun UnifiedPlayerSheetV2(
placeable.placeRelative(xOffset, 0)
}
}
- .miniPlayerDismissHorizontalGesture(
+ .miniPlayerSwipeHorizontalGesture(
enabled = currentSheetContentState == PlayerSheetState.COLLAPSED,
- handler = miniDismissGestureHandler
+ handler = miniPlayerSwipeGestureHandler
)
.playerSheetVerticalDragGesture(
enabled = sheetInteractionState.canDragSheet,
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/FullPlayerContent.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/FullPlayerContent.kt
index 8a30f6f41d..ad9c5209bf 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/FullPlayerContent.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/FullPlayerContent.kt
@@ -128,7 +128,6 @@ import com.theveloper.pixelplay.presentation.components.subcomps.FetchLyricsDial
import com.theveloper.pixelplay.presentation.viewmodel.LyricsSearchUiState
import com.theveloper.pixelplay.presentation.viewmodel.PlayerSheetState
import com.theveloper.pixelplay.presentation.viewmodel.PlayerViewModel
-import com.theveloper.pixelplay.ui.theme.GoogleSansRounded
import com.theveloper.pixelplay.utils.AudioMetaUtils.mimeTypeToFormat
import com.theveloper.pixelplay.utils.LyricsImportFailureReason
import com.theveloper.pixelplay.utils.LyricsImportSecurity
@@ -956,10 +955,7 @@ fun FullPlayerContent(
onDismissLyricsSearch = { playerViewModel.resetLyricsSearchState() },
lyricsSyncOffset = lyricsSyncOffset,
onLyricsSyncOffsetChange = { currentSong?.id?.let { songId -> playerViewModel.setLyricsSyncOffset(songId, it) } },
- // Use the platform default font (fontFamily = null) for lyrics so extended
- // Unicode glyphs (e.g. Icelandic æ ð þ) render instead of tofu. The bundled
- // Google Sans Rounded variable font drops these codepoints at runtime. (#2427)
- lyricsTextStyle = MaterialTheme.typography.titleLarge.copy(fontFamily = null),
+ lyricsTextStyle = MaterialTheme.typography.titleLarge,
colorScheme = LocalMaterialTheme.current,
onBackClick = { showLyricsSheet = false },
onSaveLyricsToFile = playerViewModel::saveLyricsToFile,
@@ -2151,7 +2147,6 @@ private fun PlayerSongInfo(
}
val titleStyle = MaterialTheme.typography.headlineSmall.copy(
fontWeight = FontWeight.Bold,
- fontFamily = GoogleSansRounded,
color = textColor
)
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/PlayerArtistPickerBottomSheet.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/PlayerArtistPickerBottomSheet.kt
index 162f894b8e..3eb0c716ca 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/PlayerArtistPickerBottomSheet.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/PlayerArtistPickerBottomSheet.kt
@@ -41,7 +41,6 @@ import com.theveloper.pixelplay.R
import com.theveloper.pixelplay.data.model.Artist
import com.theveloper.pixelplay.data.model.Song
import com.theveloper.pixelplay.presentation.components.SmartImage
-import com.theveloper.pixelplay.ui.theme.GoogleSansRounded
import racra.compose.smooth_corner_rect_library.AbsoluteSmoothCornerShape
private data class PlayerArtistShortcutItem(
@@ -110,7 +109,6 @@ internal fun PlayerArtistPickerBottomSheet(
Text(
text = stringResource(R.string.artist_picker_title),
style = MaterialTheme.typography.headlineMedium,
- fontFamily = GoogleSansRounded,
fontWeight = FontWeight.Bold,
color = colorScheme.onSurface
)
@@ -216,7 +214,6 @@ private fun PlayerArtistShortcutCard(
Text(
text = artist.name,
style = MaterialTheme.typography.titleMedium,
- fontFamily = GoogleSansRounded,
fontWeight = FontWeight.SemiBold,
color = contentColor,
maxLines = 1,
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerDismissGestureHandler.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerDismissGestureHandler.kt
deleted file mode 100644
index a745534cad..0000000000
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerDismissGestureHandler.kt
+++ /dev/null
@@ -1,177 +0,0 @@
-package com.theveloper.pixelplay.presentation.components.scoped
-
-import androidx.compose.animation.core.Animatable
-import androidx.compose.animation.core.AnimationVector1D
-import androidx.compose.animation.core.FastOutSlowInEasing
-import androidx.compose.animation.core.Spring
-import androidx.compose.animation.core.spring
-import androidx.compose.animation.core.tween
-import androidx.compose.foundation.gestures.detectHorizontalDragGestures
-import androidx.compose.runtime.Composable
-import androidx.compose.runtime.remember
-import androidx.compose.runtime.rememberUpdatedState
-import androidx.compose.ui.Modifier
-import androidx.compose.ui.hapticfeedback.HapticFeedback
-import androidx.compose.ui.hapticfeedback.HapticFeedbackType
-import androidx.compose.ui.input.pointer.pointerInput
-import androidx.compose.ui.unit.Density
-import androidx.compose.ui.util.lerp
-import kotlinx.coroutines.CoroutineStart
-import kotlinx.coroutines.CoroutineScope
-import kotlinx.coroutines.Job
-import kotlinx.coroutines.launch
-import kotlin.math.abs
-import kotlin.math.sign
-
-private enum class MiniDismissDragPhase { IDLE, TENSION, SNAPPING, FREE_DRAG }
-
-/**
- * Keeps mini-player dismiss gesture behavior isolated from the sheet host.
- * Logic is unchanged; this only centralizes gesture transitions and animation dispatch.
- */
-internal class MiniPlayerDismissGestureHandler(
- private val scope: CoroutineScope,
- private val density: Density,
- private val hapticFeedback: HapticFeedback,
- private val offsetAnimatable: Animatable,
- private val screenWidthPx: Float,
- private val onDismissPlaylistAndShowUndo: () -> Unit,
- private val onDismissStarted: () -> Unit = {}
-) {
- private var dragPhase: MiniDismissDragPhase = MiniDismissDragPhase.IDLE
- private var accumulatedDragX: Float = 0f
- private var offsetJob: Job? = null
-
- fun onDragStart() {
- dragPhase = MiniDismissDragPhase.TENSION
- accumulatedDragX = 0f
- offsetJob?.cancel()
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.stop()
- }
- }
-
- fun onHorizontalDrag(dragAmount: Float) {
- accumulatedDragX += dragAmount
-
- when (dragPhase) {
- MiniDismissDragPhase.TENSION -> {
- val snapThresholdPx = 100f * density.density
- if (abs(accumulatedDragX) < snapThresholdPx) {
- val maxTensionOffsetPx = 30f * density.density
- val dragFraction = (abs(accumulatedDragX) / snapThresholdPx).coerceIn(0f, 1f)
- val tensionOffset = lerp(0f, maxTensionOffsetPx, dragFraction)
- offsetJob?.cancel()
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.snapTo(tensionOffset * accumulatedDragX.sign)
- }
- } else {
- dragPhase = MiniDismissDragPhase.SNAPPING
- }
- }
-
- MiniDismissDragPhase.SNAPPING -> {
- hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
- offsetJob?.cancel()
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.animateTo(
- targetValue = accumulatedDragX,
- animationSpec = spring(
- dampingRatio = 0.8f,
- stiffness = Spring.StiffnessLow
- )
- )
- }
- dragPhase = MiniDismissDragPhase.FREE_DRAG
- }
-
- MiniDismissDragPhase.FREE_DRAG -> {
- offsetJob?.cancel()
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.animateTo(
- targetValue = accumulatedDragX,
- animationSpec = spring(
- dampingRatio = Spring.DampingRatioNoBouncy,
- stiffness = Spring.StiffnessHigh
- )
- )
- }
- }
-
- MiniDismissDragPhase.IDLE -> Unit
- }
- }
-
- fun onDragEnd() {
- dragPhase = MiniDismissDragPhase.IDLE
- offsetJob?.cancel()
- val dismissThreshold = screenWidthPx * 0.4f
- if (abs(accumulatedDragX) > dismissThreshold) {
- onDismissStarted()
- val targetDismissOffset = if (accumulatedDragX < 0) -screenWidthPx else screenWidthPx
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.animateTo(
- targetValue = targetDismissOffset,
- animationSpec = tween(
- durationMillis = 200,
- easing = FastOutSlowInEasing
- )
- )
- onDismissPlaylistAndShowUndo()
- offsetAnimatable.snapTo(0f)
- }
- } else {
- offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
- offsetAnimatable.animateTo(
- targetValue = 0f,
- animationSpec = spring(
- dampingRatio = Spring.DampingRatioMediumBouncy,
- stiffness = Spring.StiffnessMedium
- )
- )
- }
- }
- }
-}
-
-@Composable
-internal fun rememberMiniPlayerDismissGestureHandler(
- scope: CoroutineScope,
- density: Density,
- hapticFeedback: HapticFeedback,
- offsetAnimatable: Animatable,
- screenWidthPx: Float,
- onDismissPlaylistAndShowUndo: () -> Unit,
- onDismissStarted: () -> Unit
-): MiniPlayerDismissGestureHandler {
- val onDismissPlaylistAndShowUndoState = rememberUpdatedState(onDismissPlaylistAndShowUndo)
- val onDismissStartedState = rememberUpdatedState(onDismissStarted)
- return remember(scope, density, hapticFeedback, offsetAnimatable, screenWidthPx) {
- MiniPlayerDismissGestureHandler(
- scope = scope,
- density = density,
- hapticFeedback = hapticFeedback,
- offsetAnimatable = offsetAnimatable,
- screenWidthPx = screenWidthPx,
- onDismissPlaylistAndShowUndo = { onDismissPlaylistAndShowUndoState.value() },
- onDismissStarted = { onDismissStartedState.value() }
- )
- }
-}
-
-internal fun Modifier.miniPlayerDismissHorizontalGesture(
- enabled: Boolean,
- handler: MiniPlayerDismissGestureHandler
-): Modifier {
- if (!enabled) return this
- return this.pointerInput(enabled, handler) {
- detectHorizontalDragGestures(
- onDragStart = { handler.onDragStart() },
- onHorizontalDrag = { change, dragAmount ->
- change.consume()
- handler.onHorizontalDrag(dragAmount)
- },
- onDragEnd = { handler.onDragEnd() }
- )
- }
-}
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerSwipeGestureHandler.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerSwipeGestureHandler.kt
new file mode 100644
index 0000000000..0bcbd83fd8
--- /dev/null
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/components/scoped/MiniPlayerSwipeGestureHandler.kt
@@ -0,0 +1,169 @@
+package com.theveloper.pixelplay.presentation.components.scoped
+
+import androidx.compose.animation.core.Animatable
+import androidx.compose.animation.core.AnimationVector1D
+import androidx.compose.animation.core.FastOutSlowInEasing
+import androidx.compose.animation.core.Spring
+import androidx.compose.animation.core.spring
+import androidx.compose.animation.core.tween
+import androidx.compose.foundation.gestures.detectHorizontalDragGestures
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.rememberUpdatedState
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.hapticfeedback.HapticFeedback
+import androidx.compose.ui.hapticfeedback.HapticFeedbackType
+import androidx.compose.ui.input.pointer.pointerInput
+import androidx.compose.ui.unit.Density
+import androidx.compose.ui.unit.dp
+import kotlinx.coroutines.CoroutineScope
+import kotlinx.coroutines.CoroutineStart
+import kotlinx.coroutines.Job
+import kotlinx.coroutines.launch
+import kotlin.math.abs
+
+private const val TRACK_SWIPE_THRESHOLD_DP = 48f
+private const val DISMISS_SCREEN_WIDTH_FRACTION = 0.4f
+
+/**
+ * Track changes are the default; optional dismiss mode restores swipe-away queue dismissal.
+ */
+internal class MiniPlayerSwipeGestureHandler(
+ private val scope: CoroutineScope,
+ density: Density,
+ private val hapticFeedback: HapticFeedback,
+ private val offsetAnimatable: Animatable,
+ private val screenWidthPx: Float,
+ private val dismissEnabled: Boolean,
+ private val onSwipeToNext: () -> Unit,
+ private val onSwipeToPrevious: () -> Unit,
+ private val onDismiss: () -> Unit,
+ private val onDismissStarted: () -> Unit
+) {
+ private val trackSwipeThresholdPx = with(density) { TRACK_SWIPE_THRESHOLD_DP.dp.toPx() }
+ private var accumulatedDragX = 0f
+ private var trackChanged = false
+ private var offsetJob: Job? = null
+
+ fun onDragStart() {
+ accumulatedDragX = 0f
+ trackChanged = false
+ offsetJob?.cancel()
+ offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
+ offsetAnimatable.stop()
+ }
+ }
+
+ fun onHorizontalDrag(dragAmount: Float) {
+ accumulatedDragX += dragAmount
+ if (dismissEnabled) {
+ offsetJob?.cancel()
+ offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
+ offsetAnimatable.snapTo(accumulatedDragX)
+ }
+ return
+ }
+
+ if (trackChanged || abs(accumulatedDragX) < trackSwipeThresholdPx) return
+ trackChanged = true
+ hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
+ if (accumulatedDragX < 0f) onSwipeToNext() else onSwipeToPrevious()
+ }
+
+ fun onDragEnd() {
+ val dismissalThresholdPx = screenWidthPx * DISMISS_SCREEN_WIDTH_FRACTION
+ val shouldDismiss = dismissEnabled && abs(accumulatedDragX) > dismissalThresholdPx
+ val targetOffset = if (accumulatedDragX < 0f) -screenWidthPx else screenWidthPx
+ offsetJob?.cancel()
+
+ offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
+ if (shouldDismiss) {
+ hapticFeedback.performHapticFeedback(HapticFeedbackType.LongPress)
+ onDismissStarted()
+ offsetAnimatable.animateTo(
+ targetValue = targetOffset,
+ animationSpec = tween(
+ durationMillis = 200,
+ easing = FastOutSlowInEasing
+ )
+ )
+ onDismiss()
+ }
+ offsetAnimatable.animateTo(
+ targetValue = 0f,
+ animationSpec = spring(
+ dampingRatio = Spring.DampingRatioMediumBouncy,
+ stiffness = Spring.StiffnessMedium
+ )
+ )
+ }
+ accumulatedDragX = 0f
+ trackChanged = false
+ }
+
+ fun onDragCancel() {
+ accumulatedDragX = 0f
+ trackChanged = false
+ offsetJob?.cancel()
+ offsetJob = scope.launch(start = CoroutineStart.UNDISPATCHED) {
+ offsetAnimatable.animateTo(
+ targetValue = 0f,
+ animationSpec = spring(
+ dampingRatio = Spring.DampingRatioMediumBouncy,
+ stiffness = Spring.StiffnessMedium
+ )
+ )
+ }
+ }
+}
+
+@Composable
+internal fun rememberMiniPlayerSwipeGestureHandler(
+ scope: CoroutineScope,
+ density: Density,
+ hapticFeedback: HapticFeedback,
+ offsetAnimatable: Animatable,
+ screenWidthPx: Float,
+ dismissEnabled: Boolean,
+ onSwipeToNext: () -> Unit,
+ onSwipeToPrevious: () -> Unit,
+ onDismiss: () -> Unit,
+ onDismissStarted: () -> Unit
+): MiniPlayerSwipeGestureHandler {
+ val onSwipeToNextState = rememberUpdatedState(onSwipeToNext)
+ val onSwipeToPreviousState = rememberUpdatedState(onSwipeToPrevious)
+ val onDismissState = rememberUpdatedState(onDismiss)
+ val onDismissStartedState = rememberUpdatedState(onDismissStarted)
+ return remember(scope, density, hapticFeedback, offsetAnimatable, screenWidthPx, dismissEnabled) {
+ MiniPlayerSwipeGestureHandler(
+ scope = scope,
+ density = density,
+ hapticFeedback = hapticFeedback,
+ offsetAnimatable = offsetAnimatable,
+ screenWidthPx = screenWidthPx,
+ dismissEnabled = dismissEnabled,
+ onSwipeToNext = { onSwipeToNextState.value() },
+ onSwipeToPrevious = { onSwipeToPreviousState.value() },
+ onDismiss = { onDismissState.value() },
+ onDismissStarted = { onDismissStartedState.value() }
+ )
+ }
+}
+
+internal fun Modifier.miniPlayerSwipeHorizontalGesture(
+ enabled: Boolean,
+ handler: MiniPlayerSwipeGestureHandler
+): Modifier {
+ if (!enabled) return this
+ return pointerInput(enabled, handler) {
+ detectHorizontalDragGestures(
+ onDragStart = { handler.onDragStart() },
+ onHorizontalDrag = { change, dragAmount ->
+ change.consume()
+ handler.onHorizontalDrag(dragAmount)
+ },
+ onDragEnd = { handler.onDragEnd() },
+ onDragCancel = { handler.onDragCancel() }
+ )
+ }
+}
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsCategoryScreen.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsCategoryScreen.kt
index dd1672dbc6..7e8a5cef87 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsCategoryScreen.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsCategoryScreen.kt
@@ -771,6 +771,22 @@ fun SettingsCategoryScreen(
)
}
+ SettingsSubsection(title = stringResource(R.string.settings_miniplayer_swipe_section)) {
+ SwitchSettingItem(
+ title = stringResource(R.string.settings_miniplayer_swipe_dismiss_title),
+ subtitle = stringResource(R.string.settings_miniplayer_swipe_dismiss_subtitle),
+ checked = uiState.dismissMiniPlayerOnSwipe,
+ onCheckedChange = settingsViewModel::setDismissMiniPlayerOnSwipe,
+ leadingIcon = {
+ Icon(
+ painterResource(R.drawable.rounded_touch_app_24),
+ null,
+ tint = MaterialTheme.colorScheme.secondary
+ )
+ }
+ )
+ }
+
SettingsSubsection(title = stringResource(R.string.settings_replaygain_section)) {
SwitchSettingItem(
title = stringResource(R.string.settings_replaygain_enable_title),
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolder.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolder.kt
index 1ef56cb287..d475829da3 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolder.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolder.kt
@@ -489,13 +489,32 @@ class PlaybackStateHolder @Inject constructor(
fun previousSong() {
val castSession = castStateHolder.castSession.value
if (castSession != null && castSession.remoteMediaClient != null) {
+ val shouldResumePlayback =
+ !_stablePlayerState.value.playWhenReady && !_stablePlayerState.value.isPlaying &&
+ castSession.remoteMediaClient?.mediaStatus?.let { status ->
+ val queueItems = status.queueItems ?: emptyList()
+ val currentIndex = queueItems.indexOfFirst {
+ it.itemId == status.currentItemId
+ }
+ currentIndex > 0
+ } == true
castStateHolder.castPlayer?.previous()
+ if (shouldResumePlayback) {
+ castStateHolder.castPlayer?.play()
+ }
} else {
val controller = activeLocalPlayer()
- if (controller.currentPosition > 10000) { // 10 seconds
- controller.seekTo(0)
+ val shouldRestartCurrent = controller.currentPosition > 10_000L
+ val shouldResumePlayback =
+ !controller.playWhenReady && !controller.isPlaying &&
+ !shouldRestartCurrent && controller.hasPreviousMediaItem()
+ if (shouldRestartCurrent) {
+ controller.seekTo(0)
} else {
- controller.seekToPrevious()
+ controller.seekToPrevious()
+ }
+ if (shouldResumePlayback) {
+ controller.play()
}
}
}
@@ -503,9 +522,20 @@ class PlaybackStateHolder @Inject constructor(
fun nextSong() {
val castSession = castStateHolder.castSession.value
if (castSession != null && castSession.remoteMediaClient != null) {
+ val shouldResumePlayback =
+ !_stablePlayerState.value.playWhenReady && !_stablePlayerState.value.isPlaying
castStateHolder.castPlayer?.next()
+ if (shouldResumePlayback) {
+ castStateHolder.castPlayer?.play()
+ }
} else {
- activeLocalPlayer().seekToNext()
+ val player = activeLocalPlayer()
+ val shouldResumePlayback =
+ !player.playWhenReady && !player.isPlaying && player.hasNextMediaItem()
+ player.seekToNext()
+ if (shouldResumePlayback) {
+ player.play()
+ }
}
}
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt
index 4ddadbedea..e9960dafd5 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt
@@ -432,6 +432,8 @@ class PlayerViewModel @Inject constructor(
private val _isMiniPlayerDismissing = MutableStateFlow(false)
val isMiniPlayerDismissing: StateFlow = _isMiniPlayerDismissing.asStateFlow()
+ val dismissMiniPlayerOnSwipe: StateFlow = userPreferencesRepository.dismissMiniPlayerOnSwipeFlow
+ .stateIn(viewModelScope, SharingStarted.WhileSubscribed(5000), false)
fun setMiniPlayerDismissing(dismissing: Boolean) {
_isMiniPlayerDismissing.value = dismissing
diff --git a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/SettingsViewModel.kt b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/SettingsViewModel.kt
index abba7eaceb..a2f74d90af 100644
--- a/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/SettingsViewModel.kt
+++ b/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/SettingsViewModel.kt
@@ -71,6 +71,7 @@ data class SettingsUiState(
val pauseOnVolumeZero: Boolean = false,
val resumeOnHeadsetReconnect: Boolean = false,
val showQueueHistory: Boolean = true,
+ val dismissMiniPlayerOnSwipe: Boolean = false,
val isCrossfadeEnabled: Boolean = false,
val hiFiModeEnabled: Boolean = false,
val hiFiModeDeviceSupported: Boolean = true,
@@ -158,6 +159,7 @@ private sealed interface SettingsUiUpdate {
val pauseOnVolumeZero: Boolean,
val resumeOnHeadsetReconnect: Boolean,
val showQueueHistory: Boolean,
+ val dismissMiniPlayerOnSwipe: Boolean,
val isCrossfadeEnabled: Boolean,
val hiFiModeEnabled: Boolean,
val crossfadeDuration: Int,
@@ -651,6 +653,7 @@ class SettingsViewModel @Inject constructor(
userPreferencesRepository.pauseOnVolumeZeroFlow,
userPreferencesRepository.resumeOnHeadsetReconnectFlow,
userPreferencesRepository.showQueueHistoryFlow,
+ userPreferencesRepository.dismissMiniPlayerOnSwipeFlow,
userPreferencesRepository.isCrossfadeEnabledFlow,
userPreferencesRepository.hiFiModeEnabledFlow,
userPreferencesRepository.crossfadeDurationFlow,
@@ -673,21 +676,22 @@ class SettingsViewModel @Inject constructor(
pauseOnVolumeZero = values[2] as Boolean,
resumeOnHeadsetReconnect = values[3] as Boolean,
showQueueHistory = values[4] as Boolean,
- isCrossfadeEnabled = values[5] as Boolean,
- hiFiModeEnabled = values[6] as Boolean,
- crossfadeDuration = values[7] as Int,
- persistentShuffleEnabled = values[8] as Boolean,
- folderBackGestureNavigation = values[9] as Boolean,
- lyricsSourcePreference = values[10] as LyricsSourcePreference,
- autoScanLrcFiles = values[11] as Boolean,
- blockedDirectories = @Suppress("UNCHECKED_CAST") (values[12] as Set),
- hapticsEnabled = values[13] as Boolean,
- immersiveLyricsEnabled = values[14] as Boolean,
- immersiveLyricsTimeout = values[15] as Long,
- animatedLyricsBlurEnabled = values[16] as Boolean,
- animatedLyricsBlurStrength = values[17] as Float,
- disableBlurAllOver = values[18] as Boolean,
- showScrollbar = values[19] as Boolean
+ dismissMiniPlayerOnSwipe = values[5] as Boolean,
+ isCrossfadeEnabled = values[6] as Boolean,
+ hiFiModeEnabled = values[7] as Boolean,
+ crossfadeDuration = values[8] as Int,
+ persistentShuffleEnabled = values[9] as Boolean,
+ folderBackGestureNavigation = values[10] as Boolean,
+ lyricsSourcePreference = values[11] as LyricsSourcePreference,
+ autoScanLrcFiles = values[12] as Boolean,
+ blockedDirectories = @Suppress("UNCHECKED_CAST") (values[13] as Set),
+ hapticsEnabled = values[14] as Boolean,
+ immersiveLyricsEnabled = values[15] as Boolean,
+ immersiveLyricsTimeout = values[16] as Long,
+ animatedLyricsBlurEnabled = values[17] as Boolean,
+ animatedLyricsBlurStrength = values[18] as Float,
+ disableBlurAllOver = values[19] as Boolean,
+ showScrollbar = values[20] as Boolean
)
}.collect { update ->
_uiState.update { state ->
@@ -697,6 +701,7 @@ class SettingsViewModel @Inject constructor(
pauseOnVolumeZero = update.pauseOnVolumeZero,
resumeOnHeadsetReconnect = update.resumeOnHeadsetReconnect,
showQueueHistory = update.showQueueHistory,
+ dismissMiniPlayerOnSwipe = update.dismissMiniPlayerOnSwipe,
isCrossfadeEnabled = update.isCrossfadeEnabled,
hiFiModeEnabled = update.hiFiModeEnabled,
crossfadeDuration = update.crossfadeDuration,
@@ -994,6 +999,12 @@ class SettingsViewModel @Inject constructor(
}
}
+ fun setDismissMiniPlayerOnSwipe(enabled: Boolean) {
+ viewModelScope.launch {
+ userPreferencesRepository.setDismissMiniPlayerOnSwipe(enabled)
+ }
+ }
+
fun setCrossfadeEnabled(enabled: Boolean) {
viewModelScope.launch {
userPreferencesRepository.setCrossfadeEnabled(enabled)
diff --git a/app/src/main/java/com/theveloper/pixelplay/utils/ArtistNameKey.kt b/app/src/main/java/com/theveloper/pixelplay/utils/ArtistNameKey.kt
new file mode 100644
index 0000000000..c8124bfde3
--- /dev/null
+++ b/app/src/main/java/com/theveloper/pixelplay/utils/ArtistNameKey.kt
@@ -0,0 +1,41 @@
+package com.theveloper.pixelplay.utils
+
+import java.util.Locale
+
+/**
+ * Canonical identity key for an artist name.
+ *
+ * Two artist strings that produce the same key are treated as the *same artist*
+ * everywhere in the app: they resolve to one [com.theveloper.pixelplay.data.model.Artist]
+ * row, share one album image, and accumulate one track count.
+ *
+ * The key intentionally only normalises things that are never meaningful in an
+ * artist name:
+ * - leading/trailing whitespace
+ * - runs of internal whitespace ("AC DC" -> "ac dc")
+ * - letter case ("Beyonce" -> "beyonce")
+ *
+ * It deliberately does **not** strip noise words such as "feat.", "- Remastered"
+ * or "The": those can legitimately be part of a real artist's name, and merging
+ * on them would fold genuinely different artists into one row.
+ *
+ * All code that creates or resolves artist rows MUST go through this function.
+ * Previously [com.theveloper.pixelplay.data.worker.SyncWorker] keyed its
+ * existing-artist map on the raw name while
+ * [com.theveloper.pixelplay.data.media.SongMetadataEditor] keyed on
+ * `trim().lowercase()`. The two disagreed, so a resync minted a fresh row for
+ * every case variant of a name that already existed, inflating the artist list
+ * on every scan.
+ *
+ * Note: the SQL-side equivalent used by the DAO/migrations is
+ * `LOWER(TRIM(name))`, which agrees with this function for every real-world case
+ * (case and edge whitespace). It does not collapse *internal* whitespace runs;
+ * in-memory callers must therefore use this function rather than rebuilding the
+ * key by hand.
+ */
+fun artistNameKey(name: String): String =
+ name.trim()
+ .replace(WHITESPACE_RUN, " ")
+ .lowercase(Locale.ROOT)
+
+private val WHITESPACE_RUN = Regex("\\s+")
\ No newline at end of file
diff --git a/app/src/main/res/values/strings_settings.xml b/app/src/main/res/values/strings_settings.xml
index 1c6ae4e284..a868ffc696 100644
--- a/app/src/main/res/values/strings_settings.xml
+++ b/app/src/main/res/values/strings_settings.xml
@@ -261,6 +261,9 @@
Background Playback
+ Mini-player gestures
+ Swipe to dismiss mini-player
+ When off, swipe left or right to change tracks. When on, swipe the mini-player away to dismiss the current queue.
Keep playing after closing
If off, removing the app from recents will stop playback.
Battery Optimization
diff --git a/app/src/test/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtilsTest.kt b/app/src/test/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtilsTest.kt
index fee88c5978..0f7f8b21f7 100644
--- a/app/src/test/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtilsTest.kt
+++ b/app/src/test/java/com/theveloper/pixelplay/data/worker/AlbumGroupingUtilsTest.kt
@@ -146,6 +146,48 @@ class AlbumGroupingUtilsTest {
assertThat(displayArtist).isEqualTo("The Weeknd & Justice")
}
+ @Test
+ fun `resolveAlbumDisplayArtistId resolves names that differ only by case`() {
+ // The map handed to this function is keyed by artistNameKey(), so a lookup
+ // using the raw display-artist string used to miss and silently attribute
+ // the album to the first song's artist instead.
+ val resolved = resolveAlbumDisplayArtistId(
+ displayArtist = "Beyoncé",
+ songs = listOf(testSong(artistName = "Some Other Artist", albumArtist = null)),
+ artistNameToId = mapOf("beyoncé" to 7L),
+ artistDelimiters = listOf(";"),
+ wordDelimiters = listOf("feat.")
+ )
+
+ assertThat(resolved).isEqualTo(7L)
+ }
+
+ @Test
+ fun `resolveAlbumDisplayArtistId resolves names with differing whitespace`() {
+ val resolved = resolveAlbumDisplayArtistId(
+ displayArtist = " Radiohead ",
+ songs = listOf(testSong(artistName = "Some Other Artist", albumArtist = null)),
+ artistNameToId = mapOf("radiohead" to 11L),
+ artistDelimiters = listOf(";"),
+ wordDelimiters = listOf("feat.")
+ )
+
+ assertThat(resolved).isEqualTo(11L)
+ }
+
+ @Test
+ fun `resolveAlbumDisplayArtistId falls back to the first split artist`() {
+ val resolved = resolveAlbumDisplayArtistId(
+ displayArtist = "Justice feat. Dua Lipa",
+ songs = listOf(testSong(artistName = "Some Other Artist", albumArtist = null)),
+ artistNameToId = mapOf("justice" to 5L, "dua lipa" to 6L),
+ artistDelimiters = listOf(";"),
+ wordDelimiters = listOf("feat.")
+ )
+
+ assertThat(resolved).isEqualTo(5L)
+ }
+
private fun testSong(
artistName: String,
albumArtist: String?,
diff --git a/app/src/test/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolderTest.kt b/app/src/test/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolderTest.kt
index bd0bf60471..0b8b85ed21 100644
--- a/app/src/test/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolderTest.kt
+++ b/app/src/test/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolderTest.kt
@@ -10,7 +10,10 @@ import com.theveloper.pixelplay.data.service.player.DualPlayerEngine
import io.mockk.every
import io.mockk.coEvery
import io.mockk.mockk
+import io.mockk.verify
+import io.mockk.verifyOrder
import kotlinx.coroutines.ExperimentalCoroutinesApi
+import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.test.advanceUntilIdle
import kotlinx.coroutines.test.runTest
import org.junit.jupiter.api.Assertions.assertEquals
@@ -102,6 +105,79 @@ class PlaybackStateHolderTest {
assertSame(mainController, holder.mediaController)
}
+ @Test
+ fun `next song resumes playback when paused and another item is available`() {
+ val holder = createHolder()
+ val controller = mockk(relaxed = true)
+ every { castStateHolder.castSession } returns MutableStateFlow(null)
+ every { controller.isConnected } returns true
+ every { controller.playWhenReady } returns false
+ every { controller.isPlaying } returns false
+ every { controller.hasNextMediaItem() } returns true
+ holder.setMediaController(controller)
+
+ holder.nextSong()
+
+ verifyOrder {
+ controller.seekToNext()
+ controller.play()
+ }
+ }
+
+ @Test
+ fun `next song keeps paused playback when there is no next item`() {
+ val holder = createHolder()
+ val controller = mockk(relaxed = true)
+ every { castStateHolder.castSession } returns MutableStateFlow(null)
+ every { controller.isConnected } returns true
+ every { controller.playWhenReady } returns false
+ every { controller.isPlaying } returns false
+ every { controller.hasNextMediaItem() } returns false
+ holder.setMediaController(controller)
+
+ holder.nextSong()
+
+ verify(exactly = 0) { controller.play() }
+ }
+
+ @Test
+ fun `previous song resumes playback when paused and another item is available`() {
+ val holder = createHolder()
+ val controller = mockk(relaxed = true)
+ every { castStateHolder.castSession } returns MutableStateFlow(null)
+ every { controller.isConnected } returns true
+ every { controller.currentPosition } returns 0L
+ every { controller.playWhenReady } returns false
+ every { controller.isPlaying } returns false
+ every { controller.hasPreviousMediaItem() } returns true
+ holder.setMediaController(controller)
+
+ holder.previousSong()
+
+ verifyOrder {
+ controller.seekToPrevious()
+ controller.play()
+ }
+ }
+
+ @Test
+ fun `previous song keeps paused playback when restarting current item`() {
+ val holder = createHolder()
+ val controller = mockk(relaxed = true)
+ every { castStateHolder.castSession } returns MutableStateFlow(null)
+ every { controller.isConnected } returns true
+ every { controller.currentPosition } returns 11_000L
+ every { controller.playWhenReady } returns false
+ every { controller.isPlaying } returns false
+ every { controller.hasPreviousMediaItem() } returns true
+ holder.setMediaController(controller)
+
+ holder.previousSong()
+
+ verify(exactly = 1) { controller.seekTo(0) }
+ verify(exactly = 0) { controller.play() }
+ }
+
@Test
fun `cold start snapshot only applies to the first matching occurrence`() = runTest {
coEvery { userPreferencesRepository.getPlaybackQueueSnapshotOnce() } returns snapshot()
diff --git a/app/src/test/java/com/theveloper/pixelplay/utils/ArtistNameKeyTest.kt b/app/src/test/java/com/theveloper/pixelplay/utils/ArtistNameKeyTest.kt
new file mode 100644
index 0000000000..5fdc2617c8
--- /dev/null
+++ b/app/src/test/java/com/theveloper/pixelplay/utils/ArtistNameKeyTest.kt
@@ -0,0 +1,74 @@
+package com.theveloper.pixelplay.utils
+
+import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.assertNotEquals
+import org.junit.jupiter.api.Test
+
+/**
+ * Guards the canonical artist-identity rule.
+ *
+ * Regression context: SyncWorker keyed its existing-artist map on the raw
+ * `name` while SongMetadataEditor keyed on `trim().lowercase()`. The two
+ * disagreed, so a resync of a library whose tags differ in case from the stored
+ * rows minted a new artist row every scan and the artist list grew without
+ * bound. These tests pin the normalisation that both writers now share.
+ */
+class ArtistNameKeyTest {
+
+ @Test
+ fun `case variants resolve to one key`() {
+ assertEquals(artistNameKey("Beyoncé"), artistNameKey("beyoncé"))
+ assertEquals(artistNameKey("BEYONCÉ"), artistNameKey("beyoncé"))
+ }
+
+ @Test
+ fun `surrounding and internal whitespace is ignored`() {
+ assertEquals(artistNameKey("Radiohead"), artistNameKey(" Radiohead "))
+ assertEquals(artistNameKey("Radiohead"), artistNameKey("Radiohead"))
+ assertEquals(artistNameKey("AC DC"), artistNameKey("AC DC"))
+ assertEquals(artistNameKey("AC DC"), artistNameKey("\tAC \n DC \r"))
+ }
+
+ @Test
+ fun `tabs and newlines are treated as whitespace not as name content`() {
+ assertEquals(artistNameKey("Sigur Rós"), artistNameKey("Sigur\tRós"))
+ assertEquals(artistNameKey("Sigur Rós"), artistNameKey("Sigur\nRós"))
+ }
+
+ @Test
+ fun `key is already lowercase and trimmed`() {
+ assertEquals("radiohead", artistNameKey(" RadioHead "))
+ }
+
+ @Test
+ fun `blank names collapse to the empty key`() {
+ assertEquals("", artistNameKey(""))
+ assertEquals("", artistNameKey(" "))
+ assertEquals("", artistNameKey("\t\n"))
+ }
+
+ @Test
+ fun `distinct artists keep distinct keys`() {
+ assertNotEquals(artistNameKey("The Beatles"), artistNameKey("Beatles"))
+ assertNotEquals(artistNameKey("Radiohead"), artistNameKey("Radiohead Live"))
+ }
+
+ @Test
+ fun `artist names that contain delimiter characters are not collapsed`() {
+ // These must remain separate artists: the app's default delimiters do not
+ // include "&" or "/" precisely so names like these survive.
+ assertNotEquals(artistNameKey("W&W"), artistNameKey("WandW"))
+ assertNotEquals(artistNameKey("AC/DC"), artistNameKey("ACDC"))
+ assertNotEquals(artistNameKey("Black Country, New Road"), artistNameKey("Black Country New Road"))
+ }
+
+ @Test
+ fun `the same key is produced regardless of which surface normalises first`() {
+ // The bug only manifested because two call sites normalised differently.
+ // Feed both a "stored" and an "incoming" spelling through the same helper
+ // and they must agree, which is what keeps a resync from forking a row.
+ val stored = "Beyoncé"
+ val incoming = " beyoncé "
+ assertEquals(artistNameKey(stored), artistNameKey(incoming))
+ }
+}
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 83b824b752..b327aa3918 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -6,8 +6,9 @@ org.gradle.configuration-cache=true
# Adjusted to stay within 3GB limit and avoid thrashing
# Increased heap to 4GB and Metaspace to 1024m to prevent memory exhaustion
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+ParallelRefParsingEnabled
-org.gradle.workers.max=6
+org.gradle.workers.max=2
org.gradle.parallel=true
+kotlin.daemon.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -XX:+UseG1GC -XX:-UseGCOverheadLimit
androidx.benchmark.suppressErrors=EMULATOR,LOW-BATTERY,THERMAL
@@ -29,4 +30,3 @@ android.builtInKotlin=true
android.newDsl=true
ksp.useKSP2=true
-
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index b1b8ef56b4..5097068a8d 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 116d9acdb4..9b7cb4af38 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,9 +1,9 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionSha256Sum=bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f
-distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-9.8.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index b9bb139f79..249efbb032 100755
--- a/gradlew
+++ b/gradlew
@@ -20,7 +20,7 @@
##############################################################################
#
-# Gradle start up script for POSIX generated by Gradle.
+# gradlew start up script for POSIX generated by Gradle.
#
# Important for running:
#
@@ -29,7 +29,7 @@
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
-# ksh Gradle
+# ksh gradlew
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
diff --git a/gradlew.bat b/gradlew.bat
index aa5f10b069..03754c4c3d 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -19,13 +19,40 @@
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
-@rem Gradle startup script for Windows
+@rem gradlew startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables, and ensure extensions are enabled
setlocal EnableExtensions
+@rem Catch executions from older scripts and ensure they exit cleanly.
+@rem This can be removed once we can be reasonably confident that few people
+@rem will be migrating directly to this new wrapper.
+goto afterSafetyNet
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+goto exitWithErrorLevel
+:afterSafetyNet
+
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
@@ -45,13 +72,14 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
-echo. 1>&2
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
-echo. 1>&2
-echo Please set the JAVA_HOME variable in your environment to match the 1>&2
-echo location of your Java installation. 1>&2
+1>&2 echo.
+1>&2 echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+1>&2 echo.
+1>&2 echo Please set the JAVA_HOME variable in your environment to match the
+1>&2 echo location of your Java installation.
"%COMSPEC%" /c exit 1
+goto exitWithErrorLevel
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
@@ -59,24 +87,26 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
-echo. 1>&2
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
-echo. 1>&2
-echo Please set the JAVA_HOME variable in your environment to match the 1>&2
-echo location of your Java installation. 1>&2
+1>&2 echo.
+1>&2 echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+1>&2 echo.
+1>&2 echo Please set the JAVA_HOME variable in your environment to match the
+1>&2 echo location of your Java installation.
"%COMSPEC%" /c exit 1
+goto exitWithErrorLevel
:execute
@rem Setup the command line
-@rem Execute Gradle
+@rem Execute gradlew
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
@rem which allows us to clear the local environment before executing the java command
-endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
+endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel & goto exitWithErrorLevel
+@rem This label must not be changed. We rely on old scripts being able to jump to this point.
:exitWithErrorLevel
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
"%COMSPEC%" /c exit %ERRORLEVEL%
diff --git a/message.txt b/message.txt
deleted file mode 100644
index 167d87d489..0000000000
--- a/message.txt
+++ /dev/null
@@ -1,89 +0,0 @@
-PixelPlayer on master [!] via v9.5.1 via v21.0.11 via v2.4.0
-❯ ./gradlew assembleDebug --no-daemon
-To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/9.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
-Daemon will be stopped at the end of the build
-Calculating task graph as no cached configuration is available for tasks: assembleDebug
-
-> Task :app:stripDebugDebugSymbols
-Unable to strip the following libraries, packaging them as they are: libandroidx.graphics.path.so, libffmpegJNI.so, libtaglib.so, libtdjni.so. Run with --info option to learn more.
-
-> Task :wear:stripDebugDebugSymbols
-Unable to strip the following libraries, packaging them as they are: libandroidx.graphics.path.so. Run with --info option to learn more.
-
-> Task :app:compileDebugKotlin
-w: The argument '-Xannotation-default-target=param-property' is redundant for the current language version 2.4.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt:294:34 The corresponding parameter in the supertype 'Migration' is named 'db'. This may cause problems when calling this function with named arguments.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/database/PixelPlayDatabase.kt:305:34 The corresponding parameter in the supertype 'Migration' is named 'db'. This may cause problems when calling this function with named arguments.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/network/navidrome/NavidromeApiService.kt:518:64 Expression is unused.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/remote/qqmusic/QQSignGenerator.kt:80:29 'var allowFileAccessFromFileURLs: Boolean' is deprecated. Deprecated in Java.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/remote/qqmusic/QQSignGenerator.kt:81:29 'var allowUniversalAccessFromFileURLs: Boolean' is deprecated. Deprecated in Java.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/repository/MediaStoreSongRepository.kt:385:45 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/telegram/TelegramRepository.kt:198:49 'when' expression over a subject of type 'Any?' is not exhaustive. Add a 'null' or 'else' branch.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/data/telegram/TelegramRepository.kt:222:53 'when' expression over a subject of type 'Any?' is not exhaustive. Add a 'null' or 'else' branch.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/AiMetadataSheet.kt:52:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/AiPlaylistSheet.kt:87:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/AlbumMultiSelectionOptionSheet.kt:66:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/CastBottomSheet.kt:336:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/CustomPresetsSheet.kt:54:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/DailyMixMenu.kt:31:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/EditSongSheet.kt:890:30 'fun rememberTransformableState(onTransformation: (Float, Offset, Float) -> Unit): TransformableState' is deprecated. Prefer remembering a TransformableState with a onTransformation lambda that takes the centroid. This centroid (if specified) is the point at which zooming or rotation should happen around which allows for more natural transformations.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/EditSongSheet.kt:1039:37 Condition is always 'true'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/GenreMultiSelectionOptionSheet.kt:68:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/GenreSortBottomSheet.kt:55:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/LibrarySortBottomSheet.kt:80:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/LyricsSheet.kt:457:26 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/MultiSelectionBottomSheet.kt:112:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/PlaylistBottomSheet.kt:67:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/PlaylistMultiSelectionBottomSheet.kt:91:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/ReorderTabsSheet.kt:109:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/ReorderTabsSheet.kt:124:41 'static field FLAG_IGNORE_GLOBAL_SETTING: Int' is deprecated. Deprecated in Java.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/RoundedParallaxCarousell.kt:578:59 Redundant call of conversion method.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/RoundedParallaxCarousell.kt:578:82 Redundant call of conversion method.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/SongInfoBottomSheet.kt:332:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/SongInfoBottomSheet.kt:777:61 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/SongPickerBottomSheet.kt:107:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/StreamingProviderSheet.kt:52:30 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/TimerOptionsBottomSheet.kt:78:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/components/player/FullPlayerContent.kt:983:34 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/DeviceCapabilitiesScreen.kt:307:28 'val LocalClipboardManager: ProvidableCompositionLocal' is deprecated. Use LocalClipboard instead which supports suspend functions.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/HomeScreen.kt:255:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/HomeScreen.kt:256:26 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/LibraryMediaTabs.kt:223:39 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/LibraryMediaTabs.kt:534:39 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/LibraryScreen.kt:2657:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/LibrarySongsTab.kt:225:39 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/MashupScreen.kt:69:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/PlaylistDetailScreen.kt:818:26 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsCategoryScreen.kt:297:39 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/screens/StatsScreen.kt:220:13 Expression is unused.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/telegram/channel/TelegramChannelSearchSheet.kt:78:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/telegram/dashboard/TelegramDashboardScreen.kt:706:22 'fun rememberModalBottomSheetState(skipPartiallyExpanded: Boolean = ..., confirmValueChange: (SheetValue) -> Boolean = ...): SheetState' is deprecated. Use rememberBottomSheetState with Hidden initial value.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:117:67 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:118:62 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:119:66 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:120:56 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:121:70 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/AccountsViewModel.kt:122:68 No cast needed.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/CastStateHolder.kt:199:22 This declaration overrides a deprecated member but is not marked as deprecated itself. Add the '@Deprecated' annotation or suppress the diagnostic.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/CastTransferStateHolder.kt:1036:34 Unnecessary safe call on a non-null receiver of type 'HttpURLConnection'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/ConnectivityStateHolder.kt:334:49 Unnecessary safe call on a non-null receiver of type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/ConnectivityStateHolder.kt:509:33 'val connectionInfo: WifiInfo!' is deprecated. Deprecated in Java.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:161:61 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:198:82 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:199:80 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:281:57 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:282:58 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:284:65 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:296:56 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/GenreDetailViewModel.kt:297:57 Elvis operator (?:) always returns the left operand of non-nullable type 'String'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlaybackStateHolder.kt:701:45 Unnecessary safe call on a non-null receiver of type 'Song'.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt:153:40 'fun set(index: Int, element: Song): PersistentList' is deprecated. Use replacingAt() instead. For more details, read the documentation for this function.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt:159:40 'fun removeAt(index: Int): PersistentList' is deprecated. Use removingAt() instead. For more details, read the documentation for this function.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt:166:10 'fun removeAt(index: Int): PersistentList' is deprecated. Use removingAt() instead. For more details, read the documentation for this function.
-w: file:///home/dae/VZ_Dev/work/PixelPlayer/app/src/main/java/com/theveloper/pixelplay/presentation/viewmodel/PlayerViewModel.kt:167:10 'fun add(index: Int, element: Song): PersistentList' is deprecated. Use addingAt() instead. For more details, read the documentation for this function.
-
-[Incubating] Problems report is available at: file:///home/dae/VZ_Dev/work/PixelPlayer/build/reports/problems/problems-report.html
-
-BUILD SUCCESSFUL in 10m 43s
-115 actionable tasks: 114 executed, 1 up-to-date
-Configuration cache entry stored.