Sharing iTunes Playlists with Subsonic

Tutorials, tips and tricks.

Moderator: moderators

Sharing iTunes Playlists with Subsonic

Postby un_dave » Thu Sep 16, 2010 5:17 am

The back-story:
I have a pretty large library, and my girlfriend uses iTunes to create awesome playlists, and sync with her iPod. Not having the musical prowess, or the time and patience to create my own playlists within subsonic, I wanted those playlists in subsonic.

So, the other day, I worked our I could right click a playlist in iTunes, and save it to a m3u file. Then when it was dropped in the appropriate folder, I could access from within subsonic.

However, we have 50+ playlists, and they get updated and edited on a semi-frequent basis. So how to get them into subsonic, and sync'd on a regular basis?

The solution:
I found the aptly named "iTunes Export" tool, and download the command line version:
http://www.ericdaugherty.com/dev/itunesexport/

I then setup a scheduled task that calls a batch file, with the following content:
Code: Select all
"c:\Program Files (x86)\Java\jre6\bin\java.exe" -mx1024m -jar itunesexport.jar -outputDir="C:\subsonic\playlists"


Essentially this will auto-find your iTunes library, and dump out all the playlists to the specified folder. Default action is to overwrite existing playlists, so any updated playlists will overwrite the existing.

I've only had it running for a few days, but so far it seems to be working perfectly.

EDIT: Due to a number of PMs requesting more information, please see the screenshots below for more information!

The setup:

Windows left to right, top to bottom...
1. The task is scheduled.
2. The task is calling the batch file.
3. The c:\subsonic\getplaylists folder contains the batch file, and the itunesexport.jar file from the Console Application zip file.
4. The batch file contains the command.

Image

Setting the playlist path in subsonic:
Image

Accessing the list of playlists in subsonic:
Image

If you have any questions, let me know!
Last edited by un_dave on Tue Dec 21, 2010 1:27 am, edited 1 time in total.
un_dave
 
Posts: 4
Joined: Tue Sep 14, 2010 5:02 am

Error when adding playlist

Postby erik » Thu Oct 14, 2010 9:58 pm

Hi!
I followed your tutorial, and I'm getting the m3u-playlists OK. They play without problems in any local media player, so there seems to be nothing wrong with the lists as such. However, when I try to play them in subsonic, I encounter some difficulties. First, I must admit I was having difficulties finding out how to find them in subsonic in the first place, even though they were in the folder specified in the settings. Then, I found the "Add playlist"-function next to the playlist, and tried to add it there. For the first few attempts, nothing happened, except subsonic bringing me back to the "home"-screen. Then, I encountered an error message. The message reads as follows:

Error

Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.
Exception java.lang.NullPointerException
Message null
Java version Sun Microsystems Inc. 1.6.0_18
Operating system Windows 7 6.1
Server jetty-6.1.x
Memory Used 51 of 96 MB
Stack trace java.lang.NullPointerException at net.sourceforge.subsonic.service.SecurityService.isInMusicFolder(SecurityService.java:213) at net.sourceforge.subsonic.service.SecurityService.isReadAllowed(SecurityService.java:179) at net.sourceforge.subsonic.service.MusicFileService.getMusicFile(MusicFileService.java:67) at net.sourceforge.subsonic.controller.NowPlayingController.handleRequestInternal(NowPlayingController.java:56) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:54) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:313) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Is there a way to fix this? Am I doing anything wrong? I'd love to be able to use my playlists from iTunes on work etc.

Thanks!
erik
 
Posts: 74
Joined: Thu Oct 14, 2010 8:20 pm

Postby un_dave » Thu Oct 14, 2010 11:40 pm

I'm not sure how you're attempting to load a playlist, but I go to the player window on the bottom of the page, select the combo box to the left of "Settings" that says "More actions..."

Then select Playlist, Load.

It should then show a listing of all playlists in your nominated directory.

I admit, it took me a while to find it too. Does that help?
un_dave
 
Posts: 4
Joined: Tue Sep 14, 2010 5:02 am

Postby erik » Fri Oct 15, 2010 5:55 am

Ah, sorry, my post wasn't very clear on that process, and also my subsonic player is in norwegian, so I had to guess on a few of the names of the menu options.

Yes, I
go to the player window on the bottom of the page, select the combo box to the left of "Settings" that says "More actions..."

Then select Playlist, Load.
And it does then show a listing of all playlists in my nominated directory, as you say. But when I choose one of them and press the "Add"-link (or something like that, again, norwegian...), I only return to the "Now playing" or "Home" window. Yesterday, I got those errors I posted, today I'm back to nothing else happening than seeing the "Now playing" window (which looks more like a "Last played" window to me).

Any ideas?
erik
 
Posts: 74
Joined: Thu Oct 14, 2010 8:20 pm

Postby un_dave » Fri Oct 15, 2010 6:25 am

When I click Load, as shown on this screenshot,
Image

I get page refresh, then my playlist at the bottom populates with the contents of the m3u playlist...

I think if that process is failing, you may want to make a post in the Help forum. I don't know much about the technical side of subsonic.

Sorry I can't help more!
un_dave
 
Posts: 4
Joined: Tue Sep 14, 2010 5:02 am

Problem ... solved?

Postby erik » Fri Oct 15, 2010 3:54 pm

When I pressed "Load playlist", I got he same window as you, exept I didn't have the option to delete or download the playlists, and when I pressed "Load" I got a page refresh - that took me back to the "Home" page. :(

Then today I wasn't able to play music at all. Albums would add to may playlist, then refuse to play. The playlists were as ineffective as always. Nothing I did helped. Then I decided to test if this was only happening for the Admin account, so I created a new account for myself, and Voila, I was able to use the playlists as described. I still don't know what's wrong with the Admin account, but at least I found a workaround.

Thanks a bunch for all help!
erik
 
Posts: 74
Joined: Thu Oct 14, 2010 8:20 pm

Mem

Postby columbiabbs » Mon Nov 08, 2010 3:25 pm

I found most of my stuff would not work when I was using the Admin Account
untill I added more MEM. U show using 50 from 90.

under Windows xp
I have bumped this BBS up to 512 from 768 total.

under OS X i am using 1024 out of 2048

the system likes mem. It works so much better..

WT.
columbiabbs
 
Posts: 52
Joined: Sun Oct 03, 2010 3:10 am
Location: COLUMBIA,SC


Return to Tutorials

Who is online

Users browsing this forum: No registered users and 19 guests