Cache character pictures and songs on disk
Character pictures are kept in characters/ next to the settings, with an index.json of when the server last changed each one and when it was downloaded. Only new or changed pictures are downloaded, using the server's new /character/details. Older servers fall back to the name list, and pictures are downloaded again after 7 days. Downloaded songs are written to songs/ and only their paths are kept in memory. The folder is emptied when the game starts and when the playlist resets.
This commit is contained in:
1 parent
62fa63fd8b
commit
240c331ab2
17 files changed
+912
-48
No files matched your search
@@ -64,7 +64,9 @@ func test_fetch_song_downloads_queues_and_adds_the_song() -> void:
|
||||
.contains_exactly(["/music/rand", "/music/addQue", "/music/info"])
|
||||
var song: SongObject = Playlist.song_object_array[0]
|
||||
assert_str(song.song_title).is_equal("Corridors of Time")
|
||||
assert_object(song.song).is_not_null()
|
||||
assert_object(song.song).override_failure_message("Songs are kept on disk").is_null()
|
||||
assert_str(song.song_path.get_base_dir()).is_equal(Playlist.songs_folder())
|
||||
assert_object(Playlist.get_song(0)).is_not_null()
|
||||
assert_bool(Playlist.is_song_downloading).is_false()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user