owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.05k stars 235 forks source link

Missing iTunes Smart Playlists #261

Closed suiluj closed 8 years ago

suiluj commented 8 years ago

Hello :) At first i have to say thank you very much for this fantastic program! I use your precompiled jessie version on my new Raspberry Pi 3 on Raspbian and and works perfectly just "out of the box".

Currently I tried streaming to iTunes and remote controlling with the offical remote app on my iPhone (connected via your nice pairing script). Now i have an AppleTV deluxe, haha ;)

I created a small itunes test library with some test playlists and copied the iTunes folder on my raspberrypi. The itunes xml file override option is activated in the config.

Now to my question:

Is it possible to include my iTunes smart playlists? Normal playlists are shown but for some reason the smart playlist which i created for the test is missing.

Regards Julius

ejurgensen commented 8 years ago

It seems that when forked-daapd imports the iTunes xml file it ignores smart playlists on purpose. I'm not quite sure why that is. Maybe because forked-daapd would only be able to import a static version of the playlist, so it wouldn't really be a smart playlist any more. It would only change when the xml file was updated. But maybe that would be good enough?

As you may have noticed, you can make real smart playlists in forked-daapd by following this guide. Not quite as simple as exporting from iTunes, of course.

suiluj commented 8 years ago

I really would like an option to include the itunes xml smartplaylist. Even a static copy would be okay. Then the static copy of a smart playlist could get updated on next restart or with a cronjob.

The smart playlist feature is nice but as you said it's better to have the playlists simple from iTunes.

ejurgensen commented 8 years ago

Are you able to compile from git? Then you can try this branch, where I have made such an option: https://github.com/ejurgensen/forked-daapd/tree/scansmartpl

I've only tested it once, so it would be good if you could test as well. Otherwise you will have to wait until I have tested some more and made a new RPi release.

suiluj commented 8 years ago

ah thank you. I am not an expert yet so I would like to ask some questions before I try this version. So far I'm happy with my setup. What happens if I install this version over the existing? Does it keep my configuration and only changes the program part? And how do I go back to your good working RPi release? Is it enough to just sudo apt-get install forked-daapdagain?

Thanks again for your nice help and this fantastic program 👍

ejurgensen commented 8 years ago

Here is a test deb you can try (download and then dpkg -i [filename] to install): http://www.gyfgafguf.dk/raspbian/testing/armhf/forked-daapd_24.1.54~rc1-1_armhf.deb

When you install this, everything will be kept, but you will have to update the conf file for the new setting to take effect. You shouldn't need to go back from this version (it is very much the same as you already have), and once I make a new release you should get it with a normal apt-get upgrade.

EDIT: Updated the link (typo)

suiluj commented 8 years ago

Yes! 👍 Works perfectly with my test smart playlist which shows every song with 5 Star rating! Now I'm gonna mirror my complete iTunes folder to the rpi via syncthing. :) If there are some bugs I will write here but I think everything will work fine because forked-daapd scans the iTunes xml on every startup and looks for changes. Thanks a lot! 💯 ;)