Implement Album and Track metadata for duration and genres.

For tracks, we will fetch the duration from the ID3 tag information, alongside genres. These genres will be used for multiple purposes, e.g. search. At the moment however, it is used in koto_album_add_track to collate a list of genres that apply to the album based on the contents of it.

We can have multiple genres, we separate them by semi-column as is the case for TagLib. We will attempt to filter and rename some select genres to enforce consistency.

Changed position and playback position from guint to guint64.

Implemented multiple koto utility functions:

- koto_utils_join_string_list
- koto_utils_string_contains_substring
- koto_utils_string_to_string_list

Drastically simplified koto_utils_replace_string_all.

Implement koto_track_helpers_init to initialize our hashtable.

Fixed a segfault during first load of Koto where we were attempting to get the playback engine last used volume in koto_config_save, when the KotoPlaybackEngine was not yet initialized. Default it to 1.0.
This commit is contained in:
Joshua Strobl 2021-07-08 18:37:52 +03:00
parent 812cdc6677
commit 381cc9ce4c
15 changed files with 387 additions and 44 deletions

View file

@ -22,6 +22,7 @@
#include "db/cartographer.h"
#include "db/db.h"
#include "db/loaders.h"
#include "indexer/track-helpers.h"
#include "playback/engine.h"
#include "playback/media-keys.h"
#include "playback/mimes.h"
@ -88,6 +89,7 @@ int main (
gtk_init();
gst_init(&argc, &argv);
koto_track_helpers_init(); // Init our track helpers (primarily our genre replacement hashtable)
koto_paths_setup(); // Set up our required paths
supported_mimes_hash = g_hash_table_new(g_str_hash, g_str_equal);