Commit Graph

74 Commits

Author SHA1 Message Date
Anna Schumaker 18743f05c4 Emmental 2.10
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2022-02-25 13:32:32 -05:00
Anna Schumaker db2d122211 lib: Replace version.DEBUG with the __debug__ constant
Implements #27 (Check __debug__ constant instead of a .debug file)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-26 13:18:24 -05:00
Anna Schumaker 10c5fd4cef lib: set version.TESTING based on if the unittest module is loaded
This is cleaner than needing to set an environment variable before
running unit tests.

Implements #28 (Check if unittest is loaded to determine if we are testing)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-26 13:05:08 -05:00
Anna Schumaker 2daefa932c lib: Remove unused files
These are no longer needed now that tagdb has been removed

Implements #24 (Clean up lib/)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-26 10:18:09 -05:00
Anna Schumaker 5aa9f36272 Emmental 2.9
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-12-21 15:43:57 -05:00
Anna Schumaker b62c7f1554 Emmental 2.8
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-19 10:29:59 -05:00
Anna Schumaker 2753480052 lib: Create a custom filter Popover
For displaying errors in the regex that the user has entered

Implements: Issue #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-03 16:11:30 -04:00
Anna Schumaker 3ae543b8e7 lib: Create a custom filter Entry
We check for an exception coming from Regex.set_pattern(), and use it to
set or clear the "warning" css class to let the user know something is
wrong.

Implements: Issue #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-01 13:52:38 -04:00
Anna Schumaker aae99218e0 lib: Create a new Filter class
The intention is to have some common code that can be shared by both the
sidebar and the tracklist so they don't need to re-implement the same
things.

Implements: #4 (Create common filtering widgets)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-01 13:52:38 -04:00
Anna Schumaker 64a6fdca2d lib: Import and configure the gi module
lib needs Gtk for some of its widgets, so do the import here to make
sure everything is configured properly. This prevents some warnings at
the very beginning of testing as well.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-01 13:52:38 -04:00
Anna Schumaker c9d4441256 Emmental 2.7
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-11-01 13:33:06 -04:00
Anna Schumaker 7975988dcc Emmental 2.6
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-18 13:37:50 -04:00
Anna Schumaker 715914c4e3 Emmental 2.5
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-10-07 09:29:24 -04:00
Anna Schumaker 94235b1ce8 Emmental 2.4
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-09-02 16:33:18 -04:00
Anna Schumaker cf912cc9f5 Emmental 2.3
Implemented new code for scanning files using idle tasks. I keep the
thread-based approach for now, since we're still using the tagdb and not
sqlite yet.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-30 15:00:25 -04:00
Anna Schumaker a3ec223064 Emmental 2.2
No real user-facing changes in this release, but I do lay some
groundwork for switching over to sqlite for our data storage.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-24 15:01:26 -04:00
Anna Schumaker 1edc776370 Emmental 2.1
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-08-17 09:21:32 -04:00
Anna Schumaker 66e1ba8b44 Rename the debug file to .debug
And check for existance before reading

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 14:29:40 -04:00
Anna Schumaker e8f9427750 Move testing tracks into data/
And the generate_tracks.py script into tools/

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 10:57:01 -04:00
Anna Schumaker 81be915b09 lib: Remove old idle.py code
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-26 10:26:29 -04:00
Anna Schumaker 171e8a1829 lib: Give tags a track_selected() function
For use when tracks are manually selected. I use this to wire up a
response to double-clicking the playlist view.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:17 -04:00
Anna Schumaker 1fb4c25fc6 playlist: Create a TagModel as a custom GListModel
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:02 -04:00
Anna Schumaker 7b204f2d1b lib: Give Tags __getitem__() support
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:56:02 -04:00
Anna Schumaker 1cd9780cdf trackdb: Have the UpNextPlaylist use Track.remove_from_playlist()
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:55:13 -04:00
Anna Schumaker 1ed25e7d36 lib: Use the new version features for data files
This lets us use a different directory for debugging

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:38 -04:00
Anna Schumaker f08ce13a69 lib: Create a file for getting the current version
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:36 -04:00
Anna Schumaker 52a36a2f83 lib: Add an artistsort() function to the Metadata class
This is used to get the sort order for artists or album artists,
depending on which is set.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:35 -04:00
Anna Schumaker b75d43a304 lib: Create a Counter object
With increment() and decrement() functions that can be used to change
the GtkAdjustment's value. These functions return None if the value did
not change.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:34 -04:00
Anna Schumaker fc82beca3d lib: Don't allow adding a track to a tag multiple times
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:33 -04:00
Anna Schumaker 54498f174a lib: Track the runtime of Tags
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:31 -04:00
Anna Schumaker 3f0fce8c53 lib: Create a fake module for FakeTracks
And anything else that needs it. This lets us define all the fields
expected by other parts of the Emmental system without needed to read a
track file.

I also switch over the test_tag.py and test_tagstore.py files while I'm
at it.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:30 -04:00
Anna Schumaker c3cb3b9847 lib: Add position to the Tag TrackAdded and TrackRemoved publishers
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:29 -04:00
Anna Schumaker 7037483508 lib: Give Tags a stacked() function
This will be called when a tag is added to the tag stack to check if the
current track pointer needs to be reset.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:28 -04:00
Anna Schumaker d51ee8e0e2 lib: Create a metadata parsing class
This will help make Track creation a bit easier

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:26 -04:00
Anna Schumaker 9fe3867eae lib: Give Tags a random next() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:25 -04:00
Anna Schumaker 935087a040 lib: Give Tags an ability to loop during next()
I also provide a can_loop() function that the UI can use to determine
activatability of the loop toogle button.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:24 -04:00
Anna Schumaker 6d2a817a9b lib: Give Tags a next() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:51:22 -04:00
Anna Schumaker 08a055bbe2 lib: Pass sorting information through the TagStore.add() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:50:36 -04:00
Anna Schumaker 1215db01be lib: Allow iterating over all tags in a SuperTagStore
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:50:35 -04:00
Anna Schumaker 322dc04dd5 lib: Give Tags a get_header() function
The sidebar will want this for giving header widgets to some rows

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:50:33 -04:00
Anna Schumaker 7190feddb2 lib: Give tags support for sort order
Sometimes Musicbrainz will give us an albumsort, artistsort, or
albumartistsort field in the tags. We can use this for sorting sidebar
widgets.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-23 12:49:11 -04:00
Anna Schumaker 5c89fc8d85 lib: Test comparisons between Tags and SuperTags
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 13:27:12 -04:00
Anna Schumaker 3493c929b2 lib: Make more things available through the toplevel
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:38 -04:00
Anna Schumaker 04e42d0e37 lib: Implement a Thread class
Basically a wrapper around threading.Thread to make things re-runnable

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:37 -04:00
Anna Schumaker 2d9502f62a lib: Create a TagSuperStore
For storing SuperTags

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:36 -04:00
Anna Schumaker a6b9664231 lib: Create a SuperTag
SuperTags have a parent tag that they are associated with.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:35 -04:00
Anna Schumaker 365c5c6641 lib: Give TagStores item-related functions
For accessing tags by name, iterating over the collected tags, and
finding the number of tags.

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:34 -04:00
Anna Schumaker 4da6c6b36e lib: Give TagStores an init_track() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:33 -04:00
Anna Schumaker def33c625a lib: Give TagStores functions for saving and restoring
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:31 -04:00
Anna Schumaker 0b7d505688 lib: Give TagStores a reset() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2021-07-17 12:33:30 -04:00