danieloeh/AntennaPod — pull request #192 by ortylp (2013-05-12 19:42:35+00:00)
Title:  organize queue: add menu items for sorting queue by type: audio to top or video to top

I have added option for sorting audio or video to the top of the queue.
Use case:
* I want to listen to audio files when I am on the go: move audio to the top.
* I can watch video and want "spare" audio for later: move video to the top.

Issues to be cleared:
* Semantically these two menu entries should go into 'Organize queue" and not parallel to it.
On the other hand I can spare a few taps when my "organising" is limited to sorting by media type.
* I could not find any protection for queue. How can I make sure, that no other thread modifies queue/database while I am in the middle of sorting? One case I can think of is at the end of playback deleting first entry from the queue. Is there any locking mechanism I could use?