I'm going to put all of the main source code into a single subdirectory
under emmental/ and separate out tests into a separate tests/ directory.
Additionally, I have switched over to pytest for running tests to give
me better output (with color!)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
In this case, the call to get_track_index() returns None which can't be
used for the comparisons we're doing. Make sure we handle the None
result explicitely.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We were scheduling the CheckTask, but not following up with a
DirectoryTask to scan for new files. I use this function during the
Gtk.Application startup to automatically update the libraries.
Implements #31 (Automatically update the database during startup)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We don't use this during testing, so put it here instead of in a
submodule.
Implements #26 (Move the EmmentalApplication into emmental.py)
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
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>
This fixes a bug where a different track would be selected when hitting
"Play" after an autopause
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
They aren't doing anything useful to help speed up sorting, so remove
for now and reevaluate later
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
So we can have all the add track functionality in one place that also
allows for keyboard presses to work.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
The playbin's about-to-finish signal triggers in a different thread,
which Gtk is very much not happy about, and often results in both the
about-to-finish and eos handlers getting called (and therefore multiple
tracks getting picked from the queue).
Fix this by checking how much time is left during the regular position
changed timeout function and triggering about-to-finish manually
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
- Commit after adding tracks
- If tracks were added to the Queued Tracks playlist, then set it as the
current playlist in the Player
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
And a CommitTask when we're done. Note: we only load and import the
tagdb if we are creating a new database.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
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>