The Cube - Assimilating Technology

The Cube

Minirok

For Humans only


Print E-mail
Sunday, 14 February 2010 18:38

I recently discovered Minirok - a minimalistic pleayer enspired by Amarok, which uses the filesystem as the base for the music selection. No library manager. This is exactly what I want.

Below my changes/additions to this very nice application.

 

New right-click menu option in playlist manager.

The first thing my biggest user (ie my wife) requested was the ability to be able to remove selected tracks from the playlist.

The crop feature does do that, but you have to select all the tracks you want to keep (so it works inverse to a simple 'remove this track' option)

I thus added a new menu option, which removes the selected track(s)

Below is the patch: (download)


user@pygmy:/usr/share/minirok/minirok$ diff -c playlist.py_ori playlist.py
*** playlist.py_ori 2010-02-14 18:03:35.128477864 +0800
--- playlist.py 2010-02-14 18:11:14.214724875 +0800
***************
*** 1116,1126 ****
--- 1116,1128 ----

if len(selected_indexes) == 1:
enqueue_action = menu.addAction('Enqueue track')
+ remove_action = menu.addAction('Remove track')
if index.data(Playlist.RoleQueuePosition).toInt()[0] > 0:
enqueue_action.setCheckable(True)
enqueue_action.setChecked(True)
else:
enqueue_action = menu.addAction('Enqueue/Dequeue tracks')
+ remove_action = menu.addAction('Remove selected tracks')

stop_after_action = menu.addAction('Stop playing after this track')

***************
*** 1140,1145 ****
--- 1142,1150 ----
self.model().toggle_stop_after(index)
elif selected_action == crop_action:
self.model().removeItemsCmd(self.unselectedIndexes())
+ elif selected_action == remove_action:
+ self.model().removeItemsCmd(selected_indexes)
+

else:
return QtGui.QTreeView.mousePressEvent(self, event)
 
Share on facebook