We need to change both the sensitivity and the current state based on
the random and can_random playlist variables.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This way, we control it all from one place instead of needing to derive
a new playlist to set these values. Additionally, the UI can use these
values to enable or disable the corresponding buttons
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
These don't show up when running normally, but they can show up during
testing when gtk signals show up after their corresponding test ends.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I have a few tracks that have their album art embedded as a separate
stream. This results in emmental popping up a window with an image, and
sending an EOS when the image is closed. Suppress any video elements by
setting a fakesink instead of letting the playbin handle this
automatically.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Images were getting cut off when descending into the node tree, so
automatically changing the sizes keeps the icon visible
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We need to be able to see what's going on in order to fix the code, so
let's not fail silently and pretend that nothing went wrong.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This cleans up the test a bit and makes it more straightforward.
Additionally, it checks some extra cases that we hadn't checked up until
then.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
We already have the filtered path, so it doesn't take too much work to
convert it to the child path and look up the corresponding node.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I want these two functions to be the foundation of the NodeTreeModel, so
they have to be defined without using the GtkTreeModel interface.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Making it easy to look up a PlaylistNode by the python object id means
we can use the object id in the GtkTreeIter rather than storing the
entire path
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I noticed that the toplevel playlist siblings were always set to None,
so make sure we're properly setting these so they can be used.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
If the node is a playlist, then we can use their natural height.
Otherwise, we set a height based on the first playlist in the model.
This way every row has the same height.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm going to take a different approach with setting the row heights
directly, so start by removing the newline here.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
I'm transitioning this class to be a PlaylistNode, and nodes can easily
access their parent through a .parent pointer
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
Nothing else inherits from this class anymore, so let's merge it into
one to make it easier to deal with going forward.
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>