Skip to content

Commit

Permalink
clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
ZTFtrue committed Feb 1, 2024
1 parent 4b84473 commit 8f170c1
Show file tree
Hide file tree
Showing 35 changed files with 726 additions and 349 deletions.
6 changes: 5 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ android {
vectorDrawables {
useSupportLibrary = true
}

ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
}

buildTypes {
Expand Down Expand Up @@ -112,7 +116,7 @@ dependencies {
implementation ("be.tarsos.dsp:core:2.5")

implementation("androidx.core:core-ktx:1.12.0")
implementation("androidx.collection:collection-ktx:1.3.0")
implementation("androidx.collection:collection-ktx:1.4.0")
implementation("androidx.fragment:fragment-ktx:1.6.2")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0")

Expand Down
344 changes: 344 additions & 0 deletions app/schemas/com.ztftrue.music.sqlData.MusicDatabase/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,344 @@
{
"formatVersion": 1,
"database": {
"version": 2,
"identityHash": "7612f82a538157fcffbf8aa079662086",
"entities": [
{
"tableName": "aux",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `speed` REAL NOT NULL, `pitch` REAL NOT NULL, `echo` INTEGER NOT NULL, `echoDelay` REAL NOT NULL, `echoDecay` REAL NOT NULL, `echoRevert` INTEGER NOT NULL, `equalizer` INTEGER NOT NULL, `equalizerBand` TEXT NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "speed",
"columnName": "speed",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "pitch",
"columnName": "pitch",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "echo",
"columnName": "echo",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "echoDelay",
"columnName": "echoDelay",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "echoDecay",
"columnName": "echoDecay",
"affinity": "REAL",
"notNull": true
},
{
"fieldPath": "echoRevert",
"columnName": "echoRevert",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "equalizer",
"columnName": "equalizer",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "equalizerBand",
"columnName": "equalizerBand",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "CurrentList",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER, `listID` INTEGER NOT NULL, `type` TEXT NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "listID",
"columnName": "listID",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "main_tab",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER, `name` TEXT NOT NULL, `type` TEXT NOT NULL, `priority` INTEGER NOT NULL, `isShow` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "type",
"columnName": "type",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "priority",
"columnName": "priority",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isShow",
"columnName": "isShow",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "PlayConfig",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `repeatModel` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "repeatModel",
"columnName": "repeatModel",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "queue",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tableId` INTEGER, `id` INTEGER NOT NULL, `name` TEXT NOT NULL, `path` TEXT NOT NULL, `duration` INTEGER NOT NULL, `displayName` TEXT NOT NULL, `album` TEXT NOT NULL, `albumId` INTEGER NOT NULL, `artist` TEXT NOT NULL, `artistId` INTEGER NOT NULL, `genre` TEXT NOT NULL, `genreId` INTEGER NOT NULL, `year` INTEGER NOT NULL, `songNumber` INTEGER NOT NULL, `priority` INTEGER NOT NULL, `isFavorite` INTEGER NOT NULL, PRIMARY KEY(`tableId`))",
"fields": [
{
"fieldPath": "tableId",
"columnName": "tableId",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "path",
"columnName": "path",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "duration",
"columnName": "duration",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "displayName",
"columnName": "displayName",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "album",
"columnName": "album",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "albumId",
"columnName": "albumId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "artist",
"columnName": "artist",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "artistId",
"columnName": "artistId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "genre",
"columnName": "genre",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "genreId",
"columnName": "genreId",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "year",
"columnName": "year",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "songNumber",
"columnName": "songNumber",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "priority",
"columnName": "priority",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "isFavorite",
"columnName": "isFavorite",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"tableId"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "dictionary_app",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER, `name` TEXT NOT NULL, `package_name` TEXT NOT NULL, `label` TEXT NOT NULL, `isShow` INTEGER NOT NULL, `autoGo` INTEGER NOT NULL, PRIMARY KEY(`id`))",
"fields": [
{
"fieldPath": "id",
"columnName": "id",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "label",
"columnName": "label",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "isShow",
"columnName": "isShow",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "autoGo",
"columnName": "autoGo",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"id"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '7612f82a538157fcffbf8aa079662086')"
]
}
}
Loading

0 comments on commit 8f170c1

Please sign in to comment.