Jump to content
speeding_ant

"SimpleFeatures" - iTunes Server Plugin [SUPPORT]

244 posts in this topic Last Reply

Recommended Posts

New update!

 

Please see the main SimpleFeatures post for future updates. This thread has now been relegated to support requests only, or should be removed/merged by mods.

 

http://lime-technology.com/forum/index.php?topic=12698.msg120524#msg120524

 

 

 

 

 

 

 

I've created an iTunes Server plugin! Been wanting something like this for ages, but the old packages didn't have support for the latest iTunes. This package uses the very latest builds of forked-daapd, with no disconnection/timeout issues (hopefully!).

 

It can take a while to scan and load your music library into its database. For my library it took 3-4 hours to load all the metadata into a 45Mb database. Be patient if you have lots of music! The server is useable even if it hasn't scanned everything. If you want to re-scan your library you'll need to stop & start the server.

 

Download from Google Code: simplefeatures_itunesserver.plg

Requires unRAID Version 5 Beta 12 and above.

 

Features:

Forked Daapd Server: Fast & Light iTunes Server

WebGui Control: Stop/Start your iTunes server, control location of music database & server name. Check logs & version numbers.

 

Let me know what other features you might be wanting.

 

Install Instructions:

 

1. Download the PLG file. SimpleFeatures Base package is recommended.

 

2. Copy simplefeatures_itunesserver.plg to /boot(flash)/config/plugins/

 

3. Remove any older simpleFeatures-itunes-speeding_ant.tgz packages from /boot/packages

 

4. Reboot or use installplg /boot/config/plugins/simplefeatures_itunesserver.plg

 

Change Log:

0.2 - Fixed user creation on install.

 

0.1 - Initial Plugin

Screen_Shot_2012-04-14_at_11_59.35_PM.png.99e5932a1a00f394596588b9dd21cc93.png

Screen_Shot_2012-04-14_at_11_59.45_PM.png.c07bcd466be9d74e77e3f0a6764114f3.png

Share this post


Link to post

Looks very nice. Can't wait to try it out.

 

 

Can you use any Apple device to access it or just AppleTV? And is it only for songs or can you serve any media that is supported by iTunes?

Share this post


Link to post

Hey speeding_ant!  Thanks for this.  this helps my needs immensely!

 

Quick question...  Does it support spaces in the directory path?  I have a space in my music directory path, and when i click to apply after enabling, i don't get a status of started and my forked-daapd.log is empty.

 

Also one potential interface quirk...  When clicking on a log and then closing it, the log links no longer look like links (not blue, no underline).  they are still clickable though.  Also the form elements remain "disabled".

 

thanks!

Share this post


Link to post

Hi speeding_ant,

 

thanks for this plugin. works great.

 

....but you don't create the daapd user in your scripts, the users have to do it themselves.

Maybe you could mention this in your first post.

 

spidi

Share this post


Link to post

am getting the following - is this a prob?

 

Verifying package simpleFeatures-itunes-speeding_ant.tgz.
Installing package simpleFeatures-itunes-speeding_ant.tgz:
PACKAGE DESCRIPTION:
Executing install script for simpleFeatures-itunes-speeding_ant.tgz.
install/doinst.sh: line 550: /boot/config/plugins/sf_itunesserver/sf_itunesserver.cfg: No such file or directory
Package simpleFeatures-itunes-speeding_ant.tgz installed.

 

Myk

 

Share this post


Link to post

User creation bug is fixed - please re-download the PLG file and follow the install instructions. Please take note to remove the older /boot/packages/simpleFeatures-itunes-speeding_ant.tgz file.

 

Cheers!

Share this post


Link to post

Very cool..  So, ashaneil's question is the same as mine.  Can it serve any media files?  Since itunes has movies and tv shows available, that is how i currently view them through the apple tv.

Share this post


Link to post

Puzzled...

 

I have set up a simple test server (my main rig is still on 4.7 and i did not want to mess with my backup server which is on 5.0b14).  So, I have put together an i3-2125 CPU, 4G Ram, Asrock H67M-ITX motherboard and a 500GB hard drive (recycling my Hackintosh until I want to play with it again).  Basic unRAID 5.0b14 works on this hardware.  I have the base level Simplefeatures installed, and then I added the iTunes plugin.  I have some music loaded into a share, and I have set up paths to the music folder and to a folder for the database creation.  When I start the iTunes server, it opens a database file, opens the log files and then stops.

 

This is what's in the config.log...

 

Start: April 15, 2012 01:20:09 PM
SERVICE: enable
MUSICDIR: /mnt/user/TESTMUSIC
NAME: %h Media
DATADIR: /mnt/user/DB/songs3.db
LOGLEVEL: log
RUNAS: daapd

CMD: sed -i -e '/^loglevel/cloglevel = "log"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^directories/cdirectories = { "/mnt/user/TESTMUSIC" }' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^name/c ame = "%h Media"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^db_path/cdb_path = "/mnt/user/DB/songs3.db"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

Results:

CMD: chmod -R 0777 "/mnt/user/DB"
Results:


CMD: sed -i -e '/^loglevel/cloglevel = "log"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^directories/cdirectories = { "/mnt/user/TESTMUSIC" }' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^name/c ame = "%h Media"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^db_path/cdb_path = "/mnt/user/DB/songs3.db"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

Results:

CMD: chmod -R 0777 "/mnt/user/DB"
Results:


CMD: /etc/rc.d/rc.forked-daapd stop
Results: Stopping RSP and DAAP media server: Not running!

CMD: /etc/rc.d/rc.forked-daapd start
Results: forked-daapd.

End: April 15, 2012 01:20:10 PM

 

And here's the forked-daapd.log...

 

[2012-04-15 13:20:10] main: Forked Media Server Version 0.19 taking off
[2012-04-15 13:20:10] main: mDNS init
[2012-04-15 13:20:10] mdns: Avahi state change: Client connecting
[2012-04-15 13:20:11] mdns: Failed to create service browser: Bad state
[2012-04-15 13:20:11] player: Could not add mDNS browser for AirTunes devices
[2012-04-15 13:20:11] main: Player thread failed to start
[2012-04-15 13:20:11] main: File scanner deinit
[2012-04-15 13:20:11] main: Database deinit
[2012-04-15 13:20:11] main: mDNS deinit
[2012-04-15 13:20:11] main: Exiting.

 

I am at a loss as to know what to look for.  I am a long time user of Firefly (mt-daapd before the code was forked) and I am used to some of its many quirks, but this is a new one.

 

Any ideas welcome.  Thanks.

Share this post


Link to post

What does it bring up if you enable debug logging?

Thanks for responding.  I get this in the forked-daapd.log

 

[2012-04-15 23:29:58] main: Forked Media Server Version 0.19 taking off
[2012-04-15 23:29:58] main: Initialized with gcrypt 1.5.0
[2012-04-15 23:29:58] main: PID: 2898
[2012-04-15 23:29:58] main: mDNS init
[2012-04-15 23:29:58] mdns: Initializing Avahi mDNS
[2012-04-15 23:29:58] mdns: Avahi state change: Client connecting
[2012-04-15 23:29:58] main: Initializing database
[2012-04-15 23:29:58] db: Running query 'SELECT value FROM admin WHERE key = 'schema_version';'
[2012-04-15 23:29:58] db: Running query 'ANALYZE;'
[2012-04-15 23:29:58] db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0;'
[2012-04-15 23:29:58] db: Running query 'SELECT COUNT(*) FROM playlists p WHERE p.disabled = 0;'
[2012-04-15 23:29:58] db: Database OK with 0 active files and 4 active playlists
[2012-04-15 23:29:58] db: Running query 'DELETE FROM inotify;'
[2012-04-15 23:29:58] db: Running query 'SELECT s.selected, s.volume FROM speakers s WHERE s.id = 0;'
[2012-04-15 23:29:58] db: Running query 'DELETE FROM groups;'
[2012-04-15 23:29:58] raop: Timing IPv4 port: 39458
[2012-04-15 23:29:58] raop: Control IPv4 port: 52358
[2012-04-15 23:29:58] mdns: Adding service browser for type _raop._tcp
[2012-04-15 23:29:58] mdns: Failed to create service browser: Bad state
[2012-04-15 23:29:58] player: Could not add mDNS browser for AirTunes devices
[2012-04-15 23:29:58] main: Player thread failed to start
[2012-04-15 23:29:58] main: File scanner deinit
[2012-04-15 23:29:58] db: Running query 'UPDATE files SET songalbumid = daap_songalbumid(album_artist, album);'
[2012-04-15 23:29:58] db: Running post-scan DB maintenance tasks...
[2012-04-15 23:29:58] db: Running query 'ANALYZE;'
[2012-04-15 23:29:58] db: Done with post-scan DB maintenance
[2012-04-15 23:29:58] main: Database deinit
[2012-04-15 23:29:58] main: mDNS deinit
[2012-04-15 23:29:58] main: Exiting.

 

The config.log is very similar to previously...

 

Start: April 15, 2012 11:29:57 PM
SERVICE: enable
MUSICDIR: /mnt/user/TESTMUSIC
NAME: %h Media
DATADIR: /mnt/user/DB/songs3.db
LOGLEVEL: debug
RUNAS: daapd

CMD: sed -i -e '/^loglevel/cloglevel = "debug"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^directories/cdirectories = { "/mnt/user/TESTMUSIC" }' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^name/c ame = "%h Media"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^db_path/cdb_path = "/mnt/user/DB/songs3.db"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

Results:

CMD: chmod -R 0777 "/mnt/user/DB"
Results:


CMD: sed -i -e '/^loglevel/cloglevel = "debug"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^directories/cdirectories = { "/mnt/user/TESTMUSIC" }' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^name/c ame = "%h Media"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

CMD: sed -i -e '/^db_path/cdb_path = "/mnt/user/DB/songs3.db"' /boot/config/plugins/sf_itunesserver/forked-daapd.conf
Results:

Results:

CMD: chmod -R 0777 "/mnt/user/DB"
Results:


CMD: /etc/rc.d/rc.forked-daapd stop
Results: Stopping RSP and DAAP media server: Not running!

CMD: /etc/rc.d/rc.forked-daapd start
Results: forked-daapd.

End: April 15, 2012 11:29:58 PM

 

Any thoughts?

Share this post


Link to post

Make sure all of your network settings are solid. Also see if enabling AFP makes a difference. It's failing on the mDNS service creation, not too sure why that would be.

Share this post


Link to post

Make sure all of your network settings are solid. Also see if enabling AFP makes a difference. It's failing on the mDNS service creation, not too sure why that would be.

Wow!  Genius! 

 

It seems to need AFP enabled for some reason.  Am now about to set up with my full library.  Will report back

 

Thanks again!

Share this post


Link to post

Hmmm,  I'll need to look into that. It seems Avahi isn't enabled until AFP is enabled. I'll need to turn on Avahi beforehand, hopefully that won't interfere with AFP/SMB service discovery.

Share this post


Link to post

My library of 14,030 tracks (mostly Apple Lossless, about 350GB) scanned in 13 minutes with the database going onto the same physical disk as the media, so that's not too bad.  It would be quite a bit faster if I had this in my main server.  On that machine I currently I use Firefly SVN-1696 under unRAID 4.7 and I keep the database on the cache drive which helps a lot with the scanning.  I get the feeling I'm not far from migrating this motherboard into that machine and taking it up to unRAID v5.

 

I am currently playing four different files via two SoundBridges and also through iTunes on a couple of Windows machines (because I can, I guess).  It just works.  Most impressed.

Share this post


Link to post

Hey S80-  Do you have any video files in your library?  Currently, I have 3 separate directories.  One for mp3's, one for movies, one for tv shows.  Is this setup compatible with this plugin?

 

If so, I will need to upgrade my unRaid version as I am on the released version not the beta.

Share this post


Link to post

Uploaded new version of the PLG installer. Fixed so Avahi is started before iTunes Server. No need for AFP to be enabled now.

 

Please re-download and install!

 

Share this post


Link to post

Hey S80-  Do you have any video files in your library?  Currently, I have 3 separate directories....

Sorry - no.  I have video files played by XBMC clients, so I use standard samba shares.

Share this post


Link to post

Uploaded new version of the PLG installer. Fixed so Avahi is started before iTunes Server. No need for AFP to be enabled now.

 

Please re-download and install!

That works!

 

I did a quick check - set AFP to No, restarted server to check problem was still visible.  It was.  Then I deleted the previous .tgz, copied over the new .plg, left the previous sf settings folder in place, rebooted the server.  iTunes server is now up and running again without having to have AFP enabled.  Perfect.

 

Thanks again for this (and for SimpleFeatures).  :)

Share this post


Link to post

I keep getting permission denied in accessing the various music folders, i'm guessing i've missed a step here?  When looking at ownership it's root, but the app is running as daapd... (even though the music folder was created at setup of the itunes plugin)

 

Edit:  seems while my folder was 755 the subfolders were not.  weird...

 

Share this post


Link to post

Thanks S80.  Based on the way it seems to be setup, looks like it will be for music only at this point.  I guess I will need to continue to use an additional PC to run itunes.

 

Nice job though speeding ant.  Very cool!

 

Edit:  Is it possible to add two more fields in addition to the music field?  One for TV and one for movies?  I would think the database could be stored in the same location.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.