And wire up the bg-enabled and bg-volume properties from the header to
the playbin properties with the same name.
Implements: #50 ("Background Music Mode")
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This links together our ReplayGain filter with a volume element that is
set to the user configured background volume when background listening
mode is enabled, and 100% when background listening mode is disabled.
Implements: #50 ("Background Music Mode")
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Setting this to True will cause the Player to change state to PAUSED
during the next emission of the "file-loaded" signal.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I extract the artist, length, mbid, mtime, tracknumber, and title from
the tags to use when constructing Tracks.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I am going to use this to determine if a track has been played or not.
Gstreamer resets the clock when seeking, so I do some extra work to save
the play time just before seeking and add it back later.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This class reads the tags in an audio file and parses them into a format
we can use later to build our database playlist objects.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And use it to track the existence of artwork for the current file. This
could either be a cover.jpg file in the same directory as the currently
playing track or embedded artwork found in the Gst.TagList.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And make sure we are able to watch for changes when tracks are loaded. I
also export it as mpris' mpris:length metadata field.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
These functions are set up to take an unused argument list so they can
be connected to signals directly. I also add a 'playing' property to
track the current state of the playbin and a 'status' property to
translate 'playing' into something mpris understands.
Implements: #7 (Implement MPRIS2 Support)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I set these properties when the bus sends us tag messages, and wire them
up do the mpris2.Player object to notify dbus of their values.
These properties are cleared on both EOS and when a new file is started.
This is to account for the user changing the file mid-playback.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Either through the command line, mpris2, or the open button in the
header.
Implements: #7 (Add MPRIS2 Support)
Implements: #47 (Signal that the track has changed when it actually changes)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>