How to shuffle all content?

Need help? Post your questions here.

Moderator: moderators

How to shuffle all content?

Postby erikfig » Wed Oct 16, 2013 10:53 pm

Hey all!

After some research I did not find an answer to my questions so I decided to post it here and hopefully someone can help.

I run Windows Home server 2011 and installed Subsonic on it... Everything was really easy to setup and configure. Now, I cannot find a way to shuffle all my music content on the android app or on my computer. I don't just want to shuffle music on a specific folder, I want to shuffle all the music I have on my server. Is there such feature available with Subsonic?

The music structure setup is a simple folder named music and under that folder are all the artist.

I will appreciate any help. The paid subscription depends on this. :cry:

Thanks
erikfig
 
Posts: 16
Joined: Wed Oct 16, 2013 10:42 pm

Re: How to shuffle all content?

Postby gurutech » Thu Oct 17, 2013 3:02 am

only way I have been able to do this (although I do this for my audiobooks), is to get iTunes, create a playlist there and export it to a *.m3u8 file. Then run this short script on the file you created (adjust path names to match your setup!)

Code: Select all
fixlist.cmd (create this file first)

@echo off
D:
cd \share\media\playlists
for %%A in ("*.m3u8") DO cscript //nologo fixlist.vbs "%%A" "D:\share\Media" "\madsonic\media"
for %%A in ("*.m3u8") DO cscript //nologo fixlist.vbs "%%A" "\" "/"


Code: Select all
fixlist.vbs (create this file second)

'usage: cscript replace.vbs Filename "StringToFind" "stringToReplace"

Option Explicit
Dim fso,strFilename,strSearch,strReplace,objFile,oldContent,newContent

strFilename=WScript.Arguments.Item(0)
strSearch=WScript.Arguments.Item(1)
strReplace=WScript.Arguments.Item(2)

'Does file exist?
Set fso=CreateObject("Scripting.FileSystemObject")
if fso.FileExists(strFilename)=false then
   wscript.echo "file not found!"
   wscript.Quit
end if

'Read file
set objFile=fso.OpenTextFile(strFilename,1)
oldContent=objFile.ReadAll

'Write file
newContent=replace(oldContent,strSearch,strReplace,1,-1,0)
set objFile=fso.OpenTextFile(strFilename,2)
objFile.Write newContent
objFile.Close


In the first file (CMD file), you need to change to the drive letter and path to where your playlist file is stored (not where your media is)
The last two lines of the CMD file will run the VBS file with the proper parameters.
Open the m3u8 file you created with a text editor (ie. notepad), to see how it's defining your music path.
On the second to last line (with D:\share\media, and \madsonic\media) need to be changed to where your music is stored. The first path shows the "root" of where your music is stored. The second path is the "root" of how your media folder is set up in Subsonic.

On the last line, this is only needed if your Subsonic server is running on Linux, which it doesn't appear that it is, so you can place "REM" at the beginning of this line to comment it out. (The line changes all \ to / )

I recommend both of these files be placed in the same folder as the m3u8 file.
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 21 guests