-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
1,480 additions
and
630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 0 additions & 40 deletions
40
app/src/main/java/io/github/zyrouge/symphony/services/database/CacheDatabase.kt
This file was deleted.
Oops, something went wrong.
42 changes: 36 additions & 6 deletions
42
app/src/main/java/io/github/zyrouge/symphony/services/database/Database.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
package io.github.zyrouge.symphony.services.database | ||
|
||
import io.github.zyrouge.symphony.Symphony | ||
import io.github.zyrouge.symphony.services.database.store.ArtworkCacheStore | ||
import io.github.zyrouge.symphony.services.database.store.LyricsCacheStore | ||
import io.github.zyrouge.symphony.services.database.store.ArtworkStore | ||
import io.github.zyrouge.symphony.utils.KeyGenerator | ||
|
||
class Database(symphony: Symphony) { | ||
private val cache = CacheDatabase.create(symphony) | ||
private val persistent = PersistentDatabase.create(symphony) | ||
|
||
val artworkCache = ArtworkCacheStore(symphony) | ||
val lyricsCache = LyricsCacheStore(symphony) | ||
val songCache get() = cache.songs() | ||
val albumArtistSongsIdGenerator = KeyGenerator.TimeIncremental() | ||
val albumArtistsIdGenerator = KeyGenerator.TimeIncremental() | ||
val albumSongsIdGenerator = KeyGenerator.TimeIncremental() | ||
val albumsIdGenerator = KeyGenerator.TimeIncremental() | ||
val artistSongsIdGenerator = KeyGenerator.TimeIncremental() | ||
val artistsIdGenerator = KeyGenerator.TimeIncremental() | ||
val mediaTreeFoldersIdGenerator = KeyGenerator.TimeIncremental() | ||
val mediaTreeSongFilesIdGenerator = KeyGenerator.TimeIncremental() | ||
val mediaTreeLyricsFilesIdGenerator = KeyGenerator.TimeIncremental() | ||
val genreSongsIdGenerator = KeyGenerator.TimeIncremental() | ||
val genreIdGenerator = KeyGenerator.TimeIncremental() | ||
val playlistSongsIdGenerator = KeyGenerator.TimeIncremental() | ||
val playlistsIdGenerator = KeyGenerator.TimeIncremental() | ||
val songFilesIdGenerator = KeyGenerator.TimeIncremental() | ||
val songLyricsIdGenerator = KeyGenerator.TimeIncremental() | ||
val songsIdGenerator = KeyGenerator.TimeIncremental() | ||
|
||
val albumArtistSongs get() = persistent.albumArtistSongs() | ||
val albumArtists get() = persistent.albumArtists() | ||
val albumSongs get() = persistent.albumSongs() | ||
val albums get() = persistent.albums() | ||
val artistSongs get() = persistent.artistSongs() | ||
val artists get() = persistent.artists() | ||
val artwork = ArtworkStore(symphony) | ||
val artworkIndices get() = persistent.artworkIndices() | ||
val genreSongs get() = persistent.genreSongs() | ||
val genre get() = persistent.genre() | ||
val mediaTreeFolders get() = persistent.mediaTreeFolders() | ||
val mediaTreeSongFiles get() = persistent.mediaTreeSongFiles() | ||
val mediaTreeLyricsFiles get() = persistent.mediaTreeLyricsFiles() | ||
val playlistSongs get() = persistent.playlistSongs() | ||
val playlists get() = persistent.playlists() | ||
val songFiles get() = persistent.songFiles() | ||
val songLyrics get() = persistent.songLyrics() | ||
val songs get() = persistent.songs() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.