This lets us move up and down the Previous playlist through the buttons,
in case we go back too far by accident.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
With a callback to notify when the current playlist changes.
Additionally, I make sure to reset playlist.current if the playlist has
previously finished playing.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This is used to query for the next or previous track. The Playlist layer
will implement our playlist stack as one of these objects, and set it on
the Player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
By responding to the about-to-finish signal. If it looks like we're
about to pause, then we let the EOS handler handle it instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Putting this in the playlist layer was an experiment, but it's easier to
do from the Player now that we've abstracted out all the Gstreamer stuff
into the BassClass
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It now sets artwork based on the signals sent by the player, allowing us
to move it out of the Player class and create instances based on the
global Player instead.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
For calculating what percentage of a song has been played, which is used
to determine if a track can be marked as played or not
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I use the state change callbacks to send a position-changed signal on a
regular interval when playback is going. Seeking is handled by setting
the position property to a new value.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
To set either Gst.State.PLAYING or Gst.State.PAUSED on the playbin. I
also add two signals for playback-start and playback-paused that the
PlayPause button can use.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
My intention is to use this to handle GStreamer stuff so I can separate
out the higher level functions like next(), previous(), and load_track()
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
It now uses the TrackTitle and TrackArtist labels. Additonally, I move
it out of the Player class and create a shortcut function for
instantiating one using the global Player instance
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Mark the track as played if it has run for more than 2/3 of the running
time. Also check the "continue" field when choosing the next song from
the stack.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I provide a way to load, play, and pause tracks. I also add functions
for picking the next and previous tracks from the tagdb.Stack
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>