Playlist questions [Solved]

Need help? Post your questions here.

Moderator: moderators

Playlist questions [Solved]

Postby kyomi7502 » Mon Jul 01, 2013 11:22 pm

First of all, is there any way to auto-generate UTF-8 m3u8 playlists from folders in Subsonic? I know there is a playlist directory you should be able to drop playlists in that pull it into SS, but I haven't heard if it just imports or imports and replaces.

The main reason behind this, is that I store all of my music first in a loosely defined genre folder (for example "Metal"). I like to have playlists with just all of the stuff in that folder and then create one massive "All Music" playlist. This is getting to be a giant pain whenever I modify the contents of those folders because it will invalidate the playlist unless I sit through making another one in SS.

Is there any way to perform operations on playlists (add/delete/download the playlist only.. not every file in the playlist) without having to click on them and wait for them to load first? It keeps throwing me every time that the "Download" link decides it wants to download every file in that playlist instead of just the playlist itself. I've tried the "Export" option, but that's pretty useless unless you're playing it on the server since it exports it as D:\shares\music\whatever\ instead of http://<subsonic server address>.com/<path to file>.

I'm looking for any options, even external programs or something I could make myself to do it.

Thanks
Last edited by kyomi7502 on Tue Jul 22, 2014 1:13 pm, edited 1 time in total.
User avatar
kyomi7502
 
Posts: 69
Joined: Mon May 21, 2012 2:13 pm

Re: Playlist questions

Postby kyomi7502 » Mon Oct 28, 2013 5:08 pm

Anyone have any suggestions on this?
User avatar
kyomi7502
 
Posts: 69
Joined: Mon May 21, 2012 2:13 pm

Re: Playlist questions

Postby kyomi7502 » Tue Jul 22, 2014 12:54 pm

So... extremely old post but I have found a solution to this using a simple batch file for windows :) .
(I assume it can work with other OSes.. just needs a similar command, I've explained them all below to make that easier).

It basically goes something like this:
Code: Select all
@echo off
)
chcp 65001
dir /A:-D /s /b <music directory> > <playlist save location>.m3u8
chcp 850
(

Above explained:

chcp 65001 -- Change codepage to unicode, otherwise you get strange symbols in the playlist file and it doesn't work.

dir /A:-D /s /b -- This is the meat of it with quite a few switches
    * dir - List all files in a directory
    * /A:-D - List only files that are not directories
    * /s - Recursive listing
    * /b - List in "bare" format (only the absolute location of each file, no stats)
<music directory> > <playlist save location>.m3u8 -- The '>' is important here because it tells cmd to output to a file and overwrite if anything is already there

chcp 850 -- Change the codepage back to the default

I'm not sure why the ( )'s are important but it won't work without it. For example to create a Gothic playlist on my server for Subsonic:
Code: Select all
dir /A:-D /s /b "d:\shares\music\Gothic" > "c:\subsonic\Playlists\Gothic.m3u8"

And then after you've added all your individual playlists with the above command, use this one to make an "everything" or "All music" playlist
Code: Select all
type "c:\subsonic\Playlists\Gothic.m3u8" >> "c:\subsonic\Playlists\All music.m3u8"

Notice that it is a '>>' this time. This makes cmd capture the output to file and append it to what's already there.

It took like an hour or so to make this and test it last night... if you have more than one directory or want more playlists, just add another line of the same and change the directory/file name :)

I have this set to run every night at 01:00 (2 hours before the Subsonic library/database refresh).
To check, I deleted all of my playlists in Subsonic and checked this morning and all of the playlists in the "Playlists" folder have been successfully imported :)

The only differences in my version is I just add a few echoes to show what's currently going on and delete all the playlists at the beginning.

tl;dr version: I created a dynamically updating playlist creation tool for constantly changing music directories.
Use the above code at your own risk; I've tested it on Windows 7 Ultimate x64 and Windows Home Server V1 (aka - modified Server 2003) with no issues.
User avatar
kyomi7502
 
Posts: 69
Joined: Mon May 21, 2012 2:13 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 32 guests