Ref #14.
Additionally fixed some bugs around the KotoButton showing the badge text label when it shouldn't, styling related to margins, and various legacy null and string valid checks.
- Renamed various components and moved them to src/components.
- Renamed KOTO_PREFERRED_MODEL* to KOTO_PREFERRED_PLAYLIST*
- Renamed koto string utility functions to always be prefixed with koto_utils_string_ for consistency.
- Added configuration options for show / hiding various album information, as well as preferred sort type.
- Changed db schema to reflect various metadata changes (sorry).
- Implemented genre, narrator, year aggregation from KotoTrack to KotoAlbum for use in KotoAlbumInfo and audiobooks.
- Rearchitected our playlist functionality for KotoAlbums to always have an inner KotoPlaylist that is used.
- Added various getters / setters for new koto_album functionality.
- Implement aggregation of KotoAlbum pointer aggregation in the KotoArtist as a GQueue and GListStore instead of GList so we can get all the albums associated with an artist and use the GListStore for the audiobook view.
- Implement some initial album sorting in Artists (more work to do on this front).
- Many improvements to file indexing logic for CD and position detection, various new koto_track_helpers.
- Add new logic for knowing when to hide playlists given we generate them for each Album now.
- Fix missing updates of KotoPlaylist in KotoNav.
- Added playback position to KotoPlayerbar, renamed bar refs to self.
- New Playlist state saving.
- Updated track ticking logic for track in KotoPlaybackEngine.
- Fixed playback position detection in our KotoPlaybackEngine by swapping from GST_FORMAT_DEFAULT to GST_FORMAT_TIME.
- Changed our get_progress to divide by GST_SECOND.
- Fixed missing type checks in various KotoPlaybackEngine functions.
Fixes#13. Fixes#14. Fixes#15.
Rewrote some legacy KotoCurrentPlaylist code that relied on communicating KotoPlaylist change via a property change. Changed to using a signal.
Implemented new koto_album_create_playlist function so we can use our KotoPlaylist generation in the KotoActionBar. Prior to this change, clicking "Play" on a given track in a DiscView would only play that specific track and never give you the opportunity to go backwards or forwards. Now we will use our "continue on playlist" config to determine that behaviour and dynamically generate a playlist when the actionbar is relative to an Album. This functionality is leveraged with a change to koto_current_playlist_set_playlist that now requires a gboolean for determining if we should play immediately as well.
Added type checks in our KotoPlayerbar progress / range usage. Prior to this change, you would get a (harmless) GLib Warning when closing the application.
Fixed KotoPlayerbar info updating returning early when it failed to get an Album for a track, resulting in the artwork never being reset.
Fixed multiple warnings when missing metadata and using g_variants in our koto_playback_set_track_by_uuid.
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.
Every KotoArtist now has a dedicated KotoPlaylist that is dynamically generated during KotoArtist initialization and contains references to all KotoTracks.
Fixed weird parsing error with some track names that had single quote (ew) and made changes so various parts of the UX would not freak out when we didn't have an album associated with a track.
Added KOTO_IS_CARTOGRAPHER macro and added that type check across all cartographer functions. Added more type checks and dropped use of g_object_get for UUIDs where possible.
Implemented koto_album_get_uuid function to be on parity with other structs like Artist, Playlist, Track.
Fix the displaying of discs and tracks in an album on initial index due to missing cartographer add track call.
Cleanup lots of double empty newlines. Updated ptr spacing in uncrustify config to enforce consistency in pointer char (`*`) spacing.
Fix code related to changing from temporary playlists to permanent ones.
Implement new centralized Koto Paths for defining our variables and revdns name for consistency.
Updated Album View to leverage KotoCoverArtButton component.
Started refactoring our theming to support multiple variants. It isn't where I want it yet but we'll get there.
Implemented Notification support using notify-send as opposed to libnotify. This is because notify_notification_send does a synchronous dbus call to org.freedesktop.Notification and typically results in DBus timeouts. In the near future we will rewrite this to just use our own proxy and do an async send.
Refactored our GVariant metadata generation for a KotoIndexedTrack into a dedicated koto_indexed_track_get_metadata_vardict function. This can then be used across our playback engine and MPRIS.
Started work on the playlist creation dialog. To facilitate my desired UX for dialogs, I changed the immediate child of KotoWindow to being a GtkOverlay, with the "child" being the primary layout GtkBox and the "overlay" being any active dialog.
There is no background on the dialogs yet, or really anything meaningful in it besides the GtkImage to show the playlist image as well as a GtkEntry for the label. Upon clicking the image, you will be presented with a GtkFileChooserNative, which will allow us to support various platforms aside from Linux (if we desire) but more importantly support desktop portals and the appropriate picker for each desktop environment.
This dialog is currently hooked into the + button in the Playlist nav section.
The intent is to also support drag-and-drop when possible, so you can drag an image file onto the GtkImage for it to set it to the playlist image.
Fixed various compiler warnings, such as:
- Unused variables (cast these as void so compiler knows to ignore them).
- Use g_hash_table_add instead of g_hash_table_insert since value does not matter and will complain about not casting TRUE as a pointer.
- Fixed some casting.
Fixed up Desktop file and fleshed out Appstream data. Use validate-relax in the appstream test or it gets cranky about screenshots missing. I know...the app is not ready yet. Get over it AppStream.
Added Visual Studio Code tasks and some C/C++ Extension setting files.
Use these new functions as well as new signals to simplify toggle state in playerbar, as well as ensure changes over MPRIS allow for the updating of our UX.
Implement method handlers and relevant setters for MPRIS support, as well as a koto_update_mpris_playback_state used to notify on state changes.
Clean up some debugging.
Implemented the following getters for MPRIS:
- CanQuit
- CanRaise
- HasTrackList
- Identity
- DesktopEntry
- SupportedUriSchemas
- SupportedMimeTypes
- Metadata
- CanPlay / CanPause / CanSeek
- CanControl
- PlaybackStatus
Implemented a koto_push_track_info_to_builder function that enables us to easily push KotoIndexedTrack as well as associated album and artist info to a GVariantBuilder for use in a GVariant for various getters.
Implemented a koto_update_mpris_info_for_track function that emits a signal for PropertiesChanged + "Metadata" when our track info changes.
Implemented playlist shuffling and repeat toggle button functionality.
Swapped out a considerable amount of NULL checks for proper KOTO_IS_BUTTON and GTK_IS_VOLUME_BUTTON macro checks.
Implemented GQueue played_tracks add / removal functions for KotoPlaylist, ensure randomizing works properly.
Start work on MPRIS.