Commit graph

70 commits

Author SHA1 Message Date
8478a6d6df chore: add missing blogs. all fanciness happening in qt6 branch 2024-11-24 14:26:15 +02:00
Joshua Strobl
fd3b78db37
Update README.md 2024-09-24 19:21:03 +03:00
Joshua Strobl
62f2883849 Implement playback speed and jump forwards / backwards functionality.
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.
2021-08-17 19:27:33 +03:00
Joshua Strobl
22d5bcc777 Update README with ref to Dev Diary 11 blog post 2021-08-12 14:38:35 +03:00
Joshua Strobl
77b4e900e6 Implement initial audiobook UX (some of which is a bit of a WIP).
- 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.
2021-08-10 19:18:46 +03:00
Joshua Strobl
93f3f45adf Cleanup koto_track_helpers_get_name_for_file and ensure we replace underscores with whitespace.
Simplify type check for current_playlist in koto_current_playlist_set_playlist.
2021-07-10 01:54:06 +03:00
Joshua Strobl
ca4873e07f Implement double-click logic in our Track Table to immediately start playback of track and respective playlist.
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.
2021-07-10 01:20:20 +03:00
Joshua Strobl
d8b71b8548 Update blog listing 2021-07-09 20:07:43 +03:00
Joshua Strobl
2de94bf314 Improve granularity of playerbar volume control. 2021-07-09 14:11:26 +03:00
Joshua Strobl
5b2f030cfc Change transition type for our pages stack to make it feel less glitchy. 2021-07-09 11:31:32 +03:00
Joshua Strobl
22d4b6e50c Fixed progress and duration reporting. Leveraging duration from ID3 data when possible, otherwise fall back to GStreamer.
Fixed glib warnings on providing empty string in koto_album_add_track when the provided track has no genres.
2021-07-08 20:02:06 +03:00
Joshua Strobl
381cc9ce4c 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.
2021-07-08 18:37:52 +03:00
Joshua Strobl
812cdc6677 Implement pseudoactive style and apply it to our KotoButton on hover / leave (removal).
Apply our pseudoactive styling to very specific KotoButtons in our KotoNav.
2021-07-08 14:39:39 +03:00
Joshua Strobl
a15f17ac99 Rename "Local Library" buttons to "Library" to be consistent with Podcasts -> Library. 2021-07-07 22:28:19 +03:00
Joshua Strobl
0c1b4d9c47 Ensure the KotoExpander's "label" + icon button is response to clicks.
This increases the overall clickable area rather than limiting it to just the expander pan button.
2021-07-07 22:26:27 +03:00
Joshua Strobl
ddf4b73c46 Fix bottom border on headerbar and enforce our text coloring on headerbar window controls.
This ensures our light and dark theme styling of the headerbar remains consistent regardless of the default stylesheet.
2021-07-07 22:16:51 +03:00
Joshua Strobl
2669eca219 Fix Koto Primary nav selectors and refine spacing. 2021-07-07 22:05:48 +03:00
Joshua Strobl
8f79854679 Fix inconsistent updating of KotoButton iconography noticed via KotoExpander in KotoNav.
Turtles all the way down.
2021-07-07 21:20:05 +03:00
Joshua Strobl
34ca201121 Implemented no albums view and improved indexing of file content directly within an artist.
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.
2021-07-06 13:06:20 +03:00
Joshua Strobl
2bf5aa9388 Have visual track number start at 1 and not 0 in playlist page. 2021-06-29 13:08:50 +03:00
Joshua Strobl
269f422b63 Fix path fetching for Tracks. 2021-06-29 12:57:52 +03:00
Joshua Strobl
44e4564f1c Implement mutli-Library support.
Honestly, not going to bother summarizing this massive changeset. You are welcome to look it over in your own free time.

Fixes #10. Fixes #11
2021-06-22 16:48:13 +03:00
Joshua Strobl
8d823dbbec Add our Dev Diary 9 from end of May. 2021-06-22 13:44:39 +03:00
Joshua Strobl
a11ba1ec77 Separate out our functionality for reading from the database into db/loaders. 2021-06-01 13:10:18 +03:00
Joshua Strobl
7c7fe35b49 Implemented library hashtable, added / removed signals into Cartographer, add / remove / getters (ish).
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.
2021-06-01 12:58:23 +03:00
Joshua Strobl
fc670e266f Fix title in README 2021-05-27 17:38:34 +03:00
Joshua Strobl
e4d6f9b9ef Fix image 2021-05-27 17:38:05 +03:00
Joshua Strobl
c2d34fdf86 Update README 2021-05-27 17:36:01 +03:00
Joshua Strobl
68c1a8eda0 Implement setter in Create Modify Dialog, mostly to remove the TODO. 2021-05-27 17:15:20 +03:00
Joshua Strobl
bfe4891620 Start cleanup of KotoLibrary logic and decoupling other components like Music Local from a specific library.
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.
2021-05-27 17:02:19 +03:00
Joshua Strobl
8334323af8 Implement support for dedicated theme CSS files from our gresource.
Properly implement light and gruvbox themes. Yay!
2021-05-27 15:47:45 +03:00
Joshua Strobl
4cc5c6efd4 Apply formatting 2021-05-27 13:03:24 +03:00
Joshua Strobl
fa19fd23b1 Implement TOML-based configuration support leveraging tomlc99 and custom file writer.
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.
2021-05-27 12:56:36 +03:00
Joshua Strobl
9f0e8dfbc8 Rename all KotoIndexed* to Koto*, KOTO_INDEXED_ to KOTO_, etc. Fixes #9. 2021-05-11 20:08:39 +03:00
Joshua Strobl
62de9c2032 Get to the point where we are fairly happy with our uncrustify config. Fixes #6. 2021-05-11 20:05:04 +03:00
Joshua Strobl
d07d3dfe50 Remove libnotify includes 2021-05-11 18:37:34 +03:00
Joshua Strobl
3e0e21e246 Implement Notification support. Fixes #8.
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.
2021-05-11 18:31:13 +03:00
Joshua Strobl
a3632b8757 Implement modified signal for playlist and hook it into nav and playlist page.
Fixes #4.
2021-05-11 14:43:20 +03:00
Joshua Strobl
b4ffba62c7 Implement koto_utils_is_valid_string to replace repetitive NULL and g_strcmp0 code.
Reduce usage of g_return_if_fail since it results in unnecessary warnings.
2021-05-07 21:57:21 +03:00
Joshua Strobl
0aafa68a35 Update README with latest blog post. 2021-05-07 19:26:12 +03:00
Joshua Strobl
0e2244ba90 Implement Playlist functionality. My god...
Too many changes to summarize.

- Fixes #2.
- Fixes #3.
- Fixes #5.
- Fixes #7.

Start work on uncrustify config.
2021-05-07 16:47:47 +03:00
Joshua Strobl
ddf1987b50 Support custom launch configurations
Added GDB and non-GDB Koto launching so I can stop using GNOME Builder.
2021-04-20 05:35:32 +03:00
Joshua Strobl
f2164b2ade Start work on playlist creation dialog
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.
2021-04-07 13:17:33 +03:00
Joshua Strobl
e18b8ca100 Implement GNOME Settings Daemon MediaKeys handling.
Clean up some warnings.
2021-04-06 15:35:01 +03:00
Joshua Strobl
43ebe6d041 Implement explicit functions for setting track repeat and shuffling in KotoPlaybackEngine.
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.
2021-04-06 13:56:29 +03:00
Joshua Strobl
07c3c00f1e Implement mimetype support reporting for MPRIS, start implementation of bulk of getters.
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.
2021-04-06 10:45:11 +03:00
Joshua Strobl
b1f4460a2e
Add Feb. (B-side) and March (A-side) links 2021-04-06 00:19:09 +03:00
Joshua Strobl
6849e6e4d4 Handle more handlers for the Playerbar progress scrolling / mouse related events.
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.
2021-03-30 22:34:15 +03:00
Joshua Strobl
d957311d75 Implement seeking, volume control, artwork and track info updating 2021-03-25 17:29:45 +02:00
Joshua Strobl
05d90afc58 Implement start of Playback Engine, refactored most classes to leverage KotoCartographer, etc. 2021-03-23 19:50:09 +02:00