ps3mediaserver/ps3mediaserver — pull request #121 by etrunko (2013-11-07 01:36:54+00:00)
Title: Add new sorting method: Random

I find it useful to have this option for randomizing the entries. For instance, I have my music video clips in sorted in various different folders, and I would like to play the clips in a random order. This feature can be implemented in three different ways:

1) Randomize all entries, independent of being files or folders
2) Randomize all entries but respecting the 'folders first' rule
3) Randomize only file entries, keeping folders sorted

I chose to implement the third option on the first patch, this way navigation through folders keep unchanged.

I have also added translation string for 'Random' in pt_BR.

The second patch implements random for playlists. I also keep all my clips in a huge playlist, so I can have easy access to all files without messing with the folder hierarchy. With this, I can achieve something like 'Party mode', by just playing everything randomly. :)

I tried to keep things as simple as possible because I have very little to any experience in Java, so if there are better ways to do this or optimizations, the improvements are very welcome.