Anna Schumaker
4ce1e33fe4
curds: Pass library to new-track callback and trak.lookup()
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-15 17:32:48 -05:00
Anna Schumaker
6e0df49528
curds: Store trackid in playlists instead of filepath
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-15 17:06:17 -05:00
Anna Schumaker
a25a4eb62d
rind: Replace some calls to trak.lookup() with trackdb.track.Track()
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-14 16:56:28 -05:00
Anna Schumaker
31ba549c51
rind: Have the playbin load the absolute path of the uri
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 16:46:17 -05:00
Anna Schumaker
f7b354be05
curds: Remove most code from curds.trak.__init__.py
...
Strip out all the unused stuff now that we're switching over to the
trackdb
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 16:08:51 -05:00
Anna Schumaker
e6dd4113d4
curds: Scan library paths using the TrackDB code
...
Rather than implementing this as part of the LibraryPlaylist
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 15:57:03 -05:00
Anna Schumaker
6fc3c451f4
curds: Remove unused TagFile class
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 15:29:55 -05:00
Anna Schumaker
e55894752b
emmental: Replace curds.trak.Track class with trackdb.track.Track
...
We switch to our new track class as the first step in switching over to
the new trackdb.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 15:28:01 -05:00
Anna Schumaker
fcbfa0af2e
curds: Remove Track.sort_key() function
...
It has been reimplemented in the Playlist class
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 09:03:35 -05:00
Anna Schumaker
8a2c817de0
curds: Pass key_func() to sort.bisect()
...
Rather than relying on giving objects their own sort_key() func. This is
needed to switch over to the new Track class.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-11-01 08:59:37 -05:00
Anna Schumaker
027b89fadd
trackdb: Pass library to TrackAdded and TrackRemoved
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-31 11:29:19 -04:00
Anna Schumaker
a1d4d9e418
trackdb: Load saved files
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-26 17:39:15 -04:00
Anna Schumaker
a63dc5586b
trackdb: Implement saving through an idle task
...
And register with the various subscribers that modify anything in the
trackdb.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-26 17:39:13 -04:00
Anna Schumaker
ebb39d0600
trackdb: Library scanning fixups
...
- Fixup locking order
- Release library locks after each track so saving can progress
- Pass the track to the TrackAdded observer instead of the filepath
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-26 17:32:43 -04:00
Anna Schumaker
a1fcf032b5
lib: Create a library for idle callbacks
...
I use a fake idle queue for testing, but fall back on the main GLib idle
code for production. I made the fake idle queue threadsafe just to be
cautious.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-26 17:25:21 -04:00
Anna Schumaker
98d4709954
trackdb: Create an observer for when tracks are updated
...
And publish a notification after marking tracks as played.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-20 11:10:04 -04:00
Anna Schumaker
a29bcabc6c
trackdb: Give library paths a getstate and setstate functions
...
Pickle doesn't like pickling threads or locks, so we need to clear these
out of the state dictionary and then reinitialize them when loading.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-19 15:52:55 -04:00
Anna Schumaker
cc2b74eaa3
lib: Convert DataFiles to using pathlib Paths
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 17:16:11 -04:00
Anna Schumaker
08a37fef87
lib: Copy over existing DataFile class
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 16:25:49 -04:00
Anna Schumaker
7707f896b7
trackdb: Store Track objects in LibraryPaths
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 15:12:27 -04:00
Anna Schumaker
c98cec1b28
trackdb: Calculate a track's decade
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 13:38:27 -04:00
Anna Schumaker
89b40ab905
tools: Add a script for finding what files are missing a tag
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 13:27:31 -04:00
Anna Schumaker
0fc49912ed
trackdb: Add support for genre lists
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 13:27:00 -04:00
Anna Schumaker
31d89d4729
trackdb: Pull out the tags we need from audio files
...
I have some fallbacks in place in case a tag is missing, and we can
always add more tags later if something interests us.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-18 12:53:57 -04:00
Anna Schumaker
4e4cac25e0
trackdb: Use mutagen to read track tags
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-12 17:02:13 -04:00
Anna Schumaker
7afa16b57d
trackdb: Add Track class
...
I don't read tags yet, but I set up some other variables that will be
useful later.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-12 16:22:27 -04:00
Anna Schumaker
c46f73cbc6
trackdb: Add lookup methods for track ids
...
Playlists will want to use this when reading saved state to figure out
what tracks they hold.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-11 10:03:16 -04:00
Anna Schumaker
977c89068e
trackdb: Store tracks in a dictionary instead of a list
...
And assign unique ID values to each for future use by playlists.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-11 09:50:12 -04:00
Anna Schumaker
3f8ef5812e
trackdb: Implement a library reset function
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-10 20:23:28 -04:00
Anna Schumaker
b3510f059a
trackdb: Add library added and library removed notifications
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-10 20:07:53 -04:00
Anna Schumaker
66128e2144
trackdb: Send track added and track removed notifications
...
Note that these happen in the scanning thread, so callers may need to do
some work to put them in the main thread if needed.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-10 18:13:08 -04:00
Anna Schumaker
eea6e0999a
trackdb: Spin up a thread to scan library paths
...
This can be pretty slow, so we don't want to do it in the main thread.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-07 16:19:07 -04:00
Anna Schumaker
4327763af8
trackdb: Expand LibraryPath scan() to update the tracklist
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-07 15:52:56 -04:00
Anna Schumaker
27441b9b79
trackdb: Add a LibraryPath class for tracking multiple audio sources
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-04 15:28:30 -04:00
Anna Schumaker
a9f0ff8f8d
trackdb: Add scaffolding for handling library paths
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-04 12:58:15 -04:00
Anna Schumaker
54d7ba6556
lib: Add a class for doing the Publisher / Subscriber pattern
...
This will eventually replace my current notifications system. Hopefully
it'll be a little easier to work with and maintain
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-04 10:30:52 -04:00
Anna Schumaker
f7318f0bc7
Tools: Add a script for finding common tags of music files
...
I want to know the bare minimum of what tags can be relied on in my
music, so this script can help me set default / fallback tags.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-03 09:33:44 -04:00
Anna Schumaker
3eb55713f2
Tools: Add a script for showing the metadata of a file
...
This seems generally useful for determining what we should save or try
to display in the track database.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-10-03 08:47:44 -04:00
Anna Schumaker
4e1e2b0d0a
rind: Set album artwork through an idle task
...
This lets us set the album art once per track, rather than up to three
times.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-01-02 17:25:11 -05:00
Anna Schumaker
1891bc8f61
rind: Calculate a fixed height for album art
...
And make sure we center the pixbuf in the GtkImage by allowing the image
to expand to its maximum width.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2020-01-02 16:40:49 -05:00
Anna Schumaker
a7438b2be3
rind: Set a default image when there is no artwork
...
This acts as a placeholder, and keeps the sidebar from bouncing around
when tracks are changed.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 10:55:35 -05:00
Anna Schumaker
0b334ddbee
rind: Scale artwork when the sidebar position is changed
...
I always scale from the original reference image, and never from the
displayed pixbuf. This avoids artifacts due to lossy scaling algorithms.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 10:27:54 -05:00
Anna Schumaker
d2c71f83a8
rind: Add an artwork widget
...
And look for the "image" tag from the gstreamer pipeline when setting.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-31 08:41:55 -05:00
Anna Schumaker
37c2260ebc
Add an application icon
...
I took inspiration from a few other icons I found online, but I hacked
up my own version in Inkscape.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-30 20:41:05 -05:00
Anna Schumaker
21c23cf944
curds: Remove unused tags/ directory
...
I'm honestly surprised that this is still here
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-19 13:42:29 -05:00
Anna Schumaker
b728137588
curds: Remove icon argument from lookup() and alloc_child()
...
We were ignoring this argument and setting whatever is appropriate in
alloc_child(), so let's just remove it entirely.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-17 12:22:52 -05:00
Anna Schumaker
7f2864ec07
curds: Move the PreviousPlaylist into special.py
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-17 11:55:06 -05:00
Anna Schumaker
9fdf837046
curds: Move the UpNext playlist into special.py
...
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-17 10:49:21 -05:00
Anna Schumaker
e4709a80e2
curds: Collection playlist cleanups
...
- Use constants for icon and sort fields
- Move into a new special.py file
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-17 10:49:11 -05:00
Anna Schumaker
ebd330098a
curds: Move the NewPlaylist() into user.py
...
This could exist as its own file, but it is only ever used from user.py.
Merging helps to simplify the code a little.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
2019-12-17 10:01:53 -05:00