Custom Random Playlists
I ended up writing a pretty basic program (Windows-only, .NET 4 required) to read all the files in a folder and put them all in random order into an m3u playlist file. Then I setup a scheduled task in Windows to run that every hour.
For anyone else wanting to set this up, I put the little program on GitHub. The exe can be downloaded here: https://github.com/gabeluci/Random-Play ... ses/latest
In its simplest form, you run this:
So for example, in my case I run (Yes, this is mainly for the kids):
That creates the file "K:\Video\Baby Einstein\Random Baby Einstein.m3u" with all the media files inside that folder listed. It will only include audio OR video files, but not both.
There are more options. For example, you can include several folders and search all subfolders. Here are all the options:
- Code:
Random.Playlist.exe [-d folder1 folder2] [-p playlistName] [-r] [-t audio|video]
[-m maxLength] [-x types] [-i types] [-h]
-d A list of folders to include, separated by spaces.
If this is not included, the current folder is used.
-p The name of the playlist file. If not specified,
the playlist will be named after the first folder being searched,
preceded by the word Random. e.g. Random Music.m3u
-r Recurse subfolders.
-t Specify whether to look for audio or video files. If not specified,
the first file found will determine if it looks for audio or video
files. e.g. If it comes across an audio file first, then only audio
files will be included.
-m Limit the playlist to this many files.
-x A list of file extensions to exclude, separated by semicolons.
e.g. -x m4a;wav
-i A list of file extensions to include, separated by semicolons.
All other files will be ignored. e.g. -i mp3;m4a
-h Show this help screen
Set that up as a scheduled task in Windows to run, say, every hour, and Serviio will pick up the changes when they happen.
If you want to create multiple playlists, it's simpler to create a batch file and list each one:
Then set up the scheduled task to run that batch file.
I hope this helps someone! I tried a *ton* of different DLNA server software, and Serviio fit my needs the best. This was the only feature I wanted that Serviio didn't have.