ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Mon Feb 03, 2014 9:22 pm

Bewick Place wrote:This is no longer true I now see the ROAP msg. In the original attempt I had not re-paired the remote and was probably relying on the fact that I had previously paired with the Remote for iTunes.
I've installed Shairport on my Pi, but I did not get the RAOP messages. I would be very surprised if it had anything to do with remote, since the raop code is quite independent of that. It's more likely that the file format has some influence on whether the messages appear. Which format where you playing when they came?

Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Mon Feb 03, 2014 9:27 pm

ejurgensen wrote:
Bewick Place wrote:This is no longer true I now see the ROAP msg. In the original attempt I had not re-paired the remote and was probably relying on the fact that I had previously paired with the Remote for iTunes.
I've installed Shairport on my Pi, but I did not get the RAOP messages. I would be very surprised if it had anything to do with remote, since the raop code is quite independent of that. It's more likely that the file format has some influence on whether the messages appear. Which format where you playing when they came?
Most of my library are .mp3 files with embedded artwork. The message comes once per second.

Thanks

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Tue Feb 04, 2014 8:44 am

Playing my mp3 files did not produce the messages, so I guess I was wrong about the file format. I need to find out how to reproduce it to fix it. Maybe your log files have a clue?

Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Tue Feb 04, 2014 10:49 am

ejurgensen wrote:Playing my mp3 files did not produce the messages, so I guess I was wrong about the file format. I need to find out how to reproduce it to fix it. Maybe your log files have a clue?
Thanks for looking at this.

Here is the log file, set to debug to try to give you something to go at.

Code: Select all

[2014-02-03 10:46:36]     main: Forked Media Server Version 0.19 taking off
[2014-02-03 10:46:36]     main: Initialized with gcrypt 1.5.0
[2014-02-03 10:46:36]     main: PID: 2647
[2014-02-03 10:46:36]     main: mDNS init
[2014-02-03 10:46:36]     mdns: Initializing Avahi mDNS
[2014-02-03 10:46:36]     mdns: Avahi state change: Client running
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: No entries yet... skipping service create
[2014-02-03 10:46:36]     main: Initializing database
[2014-02-03 10:46:36]       db: Running query 'SELECT value FROM admin WHERE key = 'schema_version';'
[2014-02-03 10:46:36]       db: Running query 'ANALYZE;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_library' set with query 'UPDATE playlists SET title = 'Library' WHERE type = 1 AND special_id = 0;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_music' set with query 'UPDATE playlists SET title = 'Music' WHERE type = 1 AND special_id = 6;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_movies' set with query 'UPDATE playlists SET title = 'Movies' WHERE type = 1 AND special_id = 4;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_tvshows' set with query 'UPDATE playlists SET title = 'TV Shows' WHERE type = 1 AND special_id = 5;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_podcasts' set with query 'UPDATE playlists SET title = 'Podcasts' WHERE type = 1 AND special_id = 1;'
[2014-02-03 10:46:36]       db: Playlist title for config item 'name_audiobooks' set with query 'UPDATE playlists SET title = 'Audiobooks' WHERE type = 1 AND special_id = 7;'
[2014-02-03 10:46:36]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0;'
[2014-02-03 10:46:36]       db: Running query 'SELECT COUNT(*) FROM playlists p WHERE p.disabled = 0;'
[2014-02-03 10:46:36]       db: Database OK with 23 active files and 6 active playlists
[2014-02-03 10:46:36]       db: Running query 'SELECT s.selected, s.volume FROM speakers s WHERE s.id = 0;'
[2014-02-03 10:46:36]       db: Running query 'DELETE FROM inotify;'
[2014-02-03 10:46:36]       db: Running query 'DELETE FROM groups;'
[2014-02-03 10:46:36]     raop: Timing IPv4 port: 35173
[2014-02-03 10:46:36]     raop: Control IPv4 port: 42103
[2014-02-03 10:46:36]     mdns: Adding service browser for type _raop._tcp
[2014-02-03 10:46:36]       db: Running query 'UPDATE files SET songartistid = daap_songalbumid(album_artist, '');'
[2014-02-03 10:46:36]     mdns: Adding service browser for type _touch-remote._tcp
[2014-02-03 10:46:36]     main: Registering rendezvous names
[2014-02-03 10:46:36]     mdns: Adding mDNS service My Music on WiPi-Air/_http._tcp
[2014-02-03 10:46:36]     mdns: Added key txtvers=1
[2014-02-03 10:46:36]     mdns: Added key Database ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine Name=My Music on WiPi-Air
[2014-02-03 10:46:36]     mdns: Added key mtd-version=0.19
[2014-02-03 10:46:36]     mdns: Added key iTSh Version=131073
[2014-02-03 10:46:36]     mdns: Added key Version=196610
[2014-02-03 10:46:36]     mdns: Added key Password=false
[2014-02-03 10:46:36]     mdns: Added key ffid=16e2dbb9
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_http._tcp
[2014-02-03 10:46:36]     mdns: Adding mDNS service My Music on WiPi-Air/_rsp._tcp
[2014-02-03 10:46:36]     mdns: Added key txtvers=1
[2014-02-03 10:46:36]     mdns: Added key Database ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine Name=My Music on WiPi-Air
[2014-02-03 10:46:36]     mdns: Added key mtd-version=0.19
[2014-02-03 10:46:36]     mdns: Added key iTSh Version=131073
[2014-02-03 10:46:36]     mdns: Added key Version=196610
[2014-02-03 10:46:36]     mdns: Added key Password=false
[2014-02-03 10:46:36]     mdns: Added key ffid=16e2dbb9
[2014-02-03 10:46:36]     mdns: Resetting mDNS group
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_rsp._tcp
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_http._tcp
[2014-02-03 10:46:36]     mdns: Adding mDNS service My Music on WiPi-Air/_daap._tcp
[2014-02-03 10:46:36]     mdns: Added key txtvers=1
[2014-02-03 10:46:36]     mdns: Added key Database ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine ID=5C727F4B
[2014-02-03 10:46:36]     mdns: Added key Machine Name=My Music on WiPi-Air
[2014-02-03 10:46:36]     mdns: Added key mtd-version=0.19
[2014-02-03 10:46:36]     mdns: Added key iTSh Version=131073
[2014-02-03 10:46:36]     mdns: Added key Version=196610
[2014-02-03 10:46:36]     mdns: Added key Password=false
[2014-02-03 10:46:36]     mdns: Added key ffid=16e2dbb9
[2014-02-03 10:46:36]     mdns: Resetting mDNS group
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Creating service group
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_daap._tcp
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_rsp._tcp
[2014-02-03 10:46:36]     mdns: Re-registering My Music on WiPi-Air/_http._tcp
[2014-02-03 10:46:37]     mdns: Adding mDNS service 4BB9777336CE7B22/_touch-able._tcp
[2014-02-03 10:46:37]     mdns: Added key txtvers=1
[2014-02-03 10:46:37]     mdns: Added key DbId=4BB9777336CE7B22
[2014-02-03 10:46:37]     mdns: Added key DvTy=iTunes
[2014-02-03 10:46:37]     mdns: Added key DvSv=2306
[2014-02-03 10:46:37]     mdns: Added key Ver=131073
[2014-02-03 10:46:37]     mdns: Added key OSsi=0x1F5
[2014-02-03 10:46:37]     mdns: Added key CtlN=My Music on WiPi-Air
[2014-02-03 10:46:37]     mdns: Resetting mDNS group
[2014-02-03 10:46:37]     mdns: Creating service group
[2014-02-03 10:46:37]     mdns: Creating service group
[2014-02-03 10:46:37]     mdns: Re-registering 4BB9777336CE7B22/_touch-able._tcp
[2014-02-03 10:46:37]     mdns: Re-registering My Music on WiPi-Air/_daap._tcp
[2014-02-03 10:46:37]     mdns: Re-registering My Music on WiPi-Air/_rsp._tcp
[2014-02-03 10:46:37]       db: Running query 'UPDATE files SET songalbumid = daap_songalbumid(album_artist, album);'
[2014-02-03 10:46:37]     mdns: Re-registering My Music on WiPi-Air/_http._tcp
[2014-02-03 10:46:37]     mdns: Avahi Browser: NEW service '808AC3DE9A1F@WiPi-Air' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     mdns: Avahi Browser: NEW service '001FF302B836@Conservatory' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     mdns: Avahi Browser: NEW service '33FA00A66F2E@Kitchen' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     mdns: Avahi Browser (_raop._tcp): no more results (CACHE_EXHAUSTED)
[2014-02-03 10:46:37]     mdns: Avahi Browser (_raop._tcp): no more results (ALL_FOR_NOW)
[2014-02-03 10:46:37]     mdns: Avahi Browser (_touch-remote._tcp): no more results (CACHE_EXHAUSTED)
[2014-02-03 10:46:37]     mdns: Avahi Browser (_touch-remote._tcp): no more results (ALL_FOR_NOW)
[2014-02-03 10:46:37]     mdns: Group registering
[2014-02-03 10:46:37]     mdns: Group uncommitted
[2014-02-03 10:46:37]     mdns: Group registering
[2014-02-03 10:46:37]     mdns: Group uncommitted
[2014-02-03 10:46:37]     mdns: Group registering
[2014-02-03 10:46:37]     mdns: Group uncommitted
[2014-02-03 10:46:37]     mdns: Group registering
[2014-02-03 10:46:37]     scan: Processing directory /mnt/storage/Music (flags = 0x1)
[2014-02-03 10:46:37]       db: Running query 'INSERT INTO inotify (wd, cookie, path) VALUES (1, 0, '/mnt/storage/Music');'
[2014-02-03 10:46:37]     scan: Processing directory /mnt/storage/Music/Adele (flags = 0x1)
[2014-02-03 10:46:37]       db: Running query 'INSERT INTO inotify (wd, cookie, path) VALUES (2, 0, '/mnt/storage/Music/Adele');'
[2014-02-03 10:46:37]     mdns: Avahi Resolver: resolved service '808AC3DE9A1F@WiPi-Air' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     mdns: Service 808AC3DE9A1F@WiPi-Air, hostname WiPi-Air.local resolved to 192.168.4.42
[2014-02-03 10:46:37]   player: Event for AirTunes device 808ac3de9a1f/WiPi-Air (5002)
[2014-02-03 10:46:37]   player: AirTunes 808AC3DE9A1F@WiPi-Air: no am field in TXT record, assuming old Airport Express
[2014-02-03 10:46:37]   player: AirTunes 808AC3DE9A1F@WiPi-Air: no md field in TXT record!
[2014-02-03 10:46:37]   player: AirTunes device 808AC3DE9A1F@WiPi-Air: password: no, type AirPort Express 802.11g
[2014-02-03 10:46:37]       db: Running query 'SELECT s.selected, s.volume FROM speakers s WHERE s.id = 141333479987743;'
[2014-02-03 10:46:37]     mdns: Avahi Resolver: resolved service '33FA00A66F2E@Kitchen' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     scan: Processing directory /mnt/storage/Music/Adele/19 (flags = 0x1)
[2014-02-03 10:46:37]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/01 - Daydreams.mp3';'
[2014-02-03 10:46:37]       db: Running query 'UPDATE files SET db_timestamp = 1391424397, disabled = 0 WHERE id = 1;'
[2014-02-03 10:46:37]     mdns: Service 33FA00A66F2E@Kitchen, hostname Kitchen-Pi.local resolved to 192.168.4.18
[2014-02-03 10:46:37]   player: Event for AirTunes device 33fa00a66f2e/Kitchen (5002)
[2014-02-03 10:46:37]   player: AirTunes 33FA00A66F2E@Kitchen: no am field in TXT record, assuming old Airport Express
[2014-02-03 10:46:37]   player: AirTunes 33FA00A66F2E@Kitchen: no md field in TXT record!
[2014-02-03 10:46:37]   player: AirTunes device 33FA00A66F2E@Kitchen: password: no, type AirPort Express 802.11g
[2014-02-03 10:46:37]       db: Running query 'SELECT s.selected, s.volume FROM speakers s WHERE s.id = 57148845748014;'
[2014-02-03 10:46:37]     mdns: Avahi Resolver: resolved service '001FF302B836@Conservatory' type '_raop._tcp' proto 0
[2014-02-03 10:46:37]     mdns: Discarding IPv4 LL, not interested (service 001FF302B836@Conservatory)
[2014-02-03 10:46:37]     mdns: Service 001FF302B836@Conservatory, hostname Conservatory-AirPlay.local resolved to 192.168.4.55
[2014-02-03 10:46:37]   player: Event for AirTunes device 1ff302b836/Conservatory (5000)
[2014-02-03 10:46:37]   player: AirTunes 001FF302B836@Conservatory: no md field in TXT record!
[2014-02-03 10:46:37]   player: AirTunes device 001FF302B836@Conservatory: password: no, type AirPort Express 802.11n
[2014-02-03 10:46:37]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/02 - Best For Last.mp3';'
[2014-02-03 10:46:37]       db: Running query 'UPDATE files SET db_timestamp = 1391424397, disabled = 0 WHERE id = 2;'
[2014-02-03 10:46:38]       db: Running query 'SELECT s.selected, s.volume FROM speakers s WHERE s.id = 137221027894;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/07 - First Love.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 3;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/09 - Make You Feel My Love.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 4;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/12 - Hometown Glory.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 5;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/05 - Crazy For You.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 6;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/03 - Chasing Pavements.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 7;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/10 - My Same.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 8;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/06 - Melt My Heart To Stone.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 9;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/04 - Cold Shoulder.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 10;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/08 - Right As Rain.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 11;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/19/11 - Tired.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 12;'
[2014-02-03 10:46:38]       db: Running query 'INSERT INTO inotify (wd, cookie, path) VALUES (3, 0, '/mnt/storage/Music/Adele/19');'
[2014-02-03 10:46:38]     scan: Processing directory /mnt/storage/Music/Adele/21 (flags = 0x1)
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/03 - Turning Tables.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 13;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/09 - One And Only.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 14;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/02 - Rumour Has It.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 15;'
[2014-02-03 10:46:38]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/10 - Lovesong.mp3';'
[2014-02-03 10:46:38]       db: Running query 'UPDATE files SET db_timestamp = 1391424398, disabled = 0 WHERE id = 16;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/06 - He Won''t Go.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 17;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/05 - Set Fire To The Rain.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 18;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/01 - Rolling In The Deep.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 19;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/11 - Someone Like You.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 20;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/04 - Don''t You Remember.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 21;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/08 - I''ll Be Waiting.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 22;'
[2014-02-03 10:46:39]       db: Running query 'SELECT f.id, f.db_timestamp FROM files f WHERE f.path = '/mnt/storage/Music/Adele/21/07 - Take It All.mp3';'
[2014-02-03 10:46:39]       db: Running query 'UPDATE files SET db_timestamp = 1391424399, disabled = 0 WHERE id = 23;'
[2014-02-03 10:46:40]       db: Running query 'INSERT INTO inotify (wd, cookie, path) VALUES (4, 0, '/mnt/storage/Music/Adele/21');'
[2014-02-03 10:46:40]     scan: Purging old database content
[2014-02-03 10:46:40]       db: Running purge query 'DELETE FROM playlistitems WHERE playlistid IN (SELECT id FROM playlists p WHERE p.type <> 1 AND p.db_timestamp < 1391424397);'
[2014-02-03 10:46:40]       db: Purged 0 rows
[2014-02-03 10:46:40]       db: Running purge query 'DELETE FROM playlists WHERE type <> 1 AND db_timestamp < 1391424397;'
[2014-02-03 10:46:40]       db: Purged 0 rows
[2014-02-03 10:46:40]       db: Running purge query 'DELETE FROM files WHERE db_timestamp < 1391424397;'
[2014-02-03 10:46:40]       db: Purged 0 rows
[2014-02-03 10:46:40]     scan: Bulk library scan complete

Edited to reduce size....


[2014-02-03 10:46:53]    httpd: Found query string
[2014-02-03 10:46:53]     dacp: DACP request: /ctrl-int/1/playqueue-edit?command=clear&mode=0x6D61696E&session-id=100
[2014-02-03 10:46:53]   player: Player status: stopped
[2014-02-03 10:46:53]    httpd: Found query string
[2014-02-03 10:46:53]     dacp: DACP request: /ctrl-int/1/playqueue-edit?command=add&query='dmap.itemid:21'&queuefilter=album:6164213040857413199&sort=album&mode=1&session-id=100
[2014-02-03 10:46:53]     daap: Trying DAAP query -'dmap.itemid:21'-
[2014-02-03 10:46:53]     daap: DAAP SQL query: -(f.id = 21)-
[2014-02-03 10:46:53]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND (f.id = 21);'
[2014-02-03 10:46:53]       db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND (f.id = 21)  LIMIT 1;'
[2014-02-03 10:46:53]   player: Found index song
[2014-02-03 10:46:53]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND f.songalbumid = 6164213040857413199;'
[2014-02-03 10:46:53]       db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND f.songalbumid = 6164213040857413199 ORDER BY f.album_sort ASC, f.disc ASC, f.track ASC;'
[2014-02-03 10:46:53]   player: Player queue query returned 11 items
[2014-02-03 10:46:53]   player: Added song id 19 (Rolling In The Deep)
[2014-02-03 10:46:53]   player: Added song id 15 (Rumour Has It)
[2014-02-03 10:46:53]   player: Added song id 13 (Turning Tables)
[2014-02-03 10:46:53]   player: Added song id 21 (Don't You Remember)
[2014-02-03 10:46:53]   player: Added song id 18 (Set Fire To The Rain)
[2014-02-03 10:46:53]   player: Added song id 17 (He Won't Go)
[2014-02-03 10:46:53]   player: Added song id 23 (Take It All)
[2014-02-03 10:46:53]   player: Added song id 22 (I'll Be Waiting)
[2014-02-03 10:46:53]   player: Added song id 14 (One And Only)
[2014-02-03 10:46:53]   player: Added song id 16 (Lovesong)
[2014-02-03 10:46:53]   player: Added song id 20 (Someone Like You)
[2014-02-03 10:46:53]       db: End of query results
[2014-02-03 10:46:53]     dacp: Song queue built, playback starting at index 3
[2014-02-03 10:46:53]       db: Running query 'SELECT f.* FROM files f WHERE f.id = 21;'
[2014-02-03 10:46:53]   player: Opening /mnt/storage/Music/Adele/21/04 - Don't You Remember.mp3
[2014-02-03 10:46:53]   ffmpeg: Probed with size=65536 and score=51
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition separate: 1; 1
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition combined: 1; 1
[2014-02-03 10:46:53]   ffmpeg: max_analyze_duration reached
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition separate: 1; 1
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition combined: 1; 1
[2014-02-03 10:46:53]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND id = 21;'
[2014-02-03 10:46:53]       db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND id = 21 ;'
[2014-02-03 10:46:53]  artwork: Trying own artwork file /mnt/storage/Music/Adele/21/04 - Don't You Remember.jpg
[2014-02-03 10:46:53]  artwork: Trying own artwork file /mnt/storage/Music/Adele/21/04 - Don't You Remember.png
[2014-02-03 10:46:53]  artwork: Trying directory artwork file /mnt/storage/Music/Adele/21/artwork.jpg
[2014-02-03 10:46:53]  artwork: Trying directory artwork file /mnt/storage/Music/Adele/21/artwork.png
[2014-02-03 10:46:53]  artwork: Trying directory artwork file /mnt/storage/Music/Adele/21/cover.jpg
[2014-02-03 10:46:53]  artwork: Trying directory artwork file /mnt/storage/Music/Adele/21/cover.png
[2014-02-03 10:46:53]  artwork: Trying directory artwork file /mnt/storage/Music/Adele/21/Folder.jpg
[2014-02-03 10:46:53]  artwork: Artwork request parameters: max w = 600, max h = 600
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition separate: 1; 1
[2014-02-03 10:46:53]   ffmpeg: err{or,}_recognition combined: 1; 1
[2014-02-03 10:46:53]   ffmpeg: Unsupported bit depth: 0
[2014-02-03 10:46:53]   ffmpeg: buffer too small, expanding to 20477 bytes
[2014-02-03 10:46:53]   ffmpeg: marker=d8 avail_size_in_buf=20477
[2014-02-03 10:46:53]   ffmpeg: marker parser used 0 bytes (0 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=e0 avail_size_in_buf=20475
[2014-02-03 10:46:53]   ffmpeg: marker parser used 16 bytes (128 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=db avail_size_in_buf=20457
[2014-02-03 10:46:53]   ffmpeg: index=0
[2014-02-03 10:46:53]   ffmpeg: qscale[0]: 0
[2014-02-03 10:46:53]   ffmpeg: marker parser used 67 bytes (536 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=db avail_size_in_buf=20388
[2014-02-03 10:46:53]   ffmpeg: index=1
[2014-02-03 10:46:53]   ffmpeg: qscale[1]: 0
[2014-02-03 10:46:53]   ffmpeg: marker parser used 67 bytes (536 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=c0 avail_size_in_buf=20319
[2014-02-03 10:46:53]   ffmpeg: sof0: picture: 200x200
[2014-02-03 10:46:53]   ffmpeg: component 0 2:2 id: 0 quant:0
[2014-02-03 10:46:53]   ffmpeg: component 1 1:1 id: 1 quant:1
[2014-02-03 10:46:53]   ffmpeg: component 2 1:1 id: 2 quant:1
[2014-02-03 10:46:53]   ffmpeg: pix fmt id 22111100
[2014-02-03 10:46:53]   ffmpeg: marker parser used 17 bytes (136 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=c4 avail_size_in_buf=20300
[2014-02-03 10:46:53]   ffmpeg: class=0 index=0 nb_codes=12
[2014-02-03 10:46:53]   ffmpeg: marker parser used 31 bytes (248 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=c4 avail_size_in_buf=20267
[2014-02-03 10:46:53]   ffmpeg: class=1 index=0 nb_codes=251
[2014-02-03 10:46:53]   ffmpeg: marker parser used 181 bytes (1448 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=c4 avail_size_in_buf=20084
[2014-02-03 10:46:53]   ffmpeg: class=0 index=1 nb_codes=12
[2014-02-03 10:46:53]   ffmpeg: marker parser used 31 bytes (248 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=c4 avail_size_in_buf=20051
[2014-02-03 10:46:53]   ffmpeg: class=1 index=1 nb_codes=251
[2014-02-03 10:46:53]   ffmpeg: marker parser used 181 bytes (1448 bits)
[2014-02-03 10:46:53]   ffmpeg: escaping removed 134 bytes
[2014-02-03 10:46:53]   ffmpeg: marker=da avail_size_in_buf=19868
[2014-02-03 10:46:53]   ffmpeg: component: 0
[2014-02-03 10:46:53]   ffmpeg: component: 1
[2014-02-03 10:46:53]   ffmpeg: component: 2
[2014-02-03 10:46:53]   ffmpeg: marker parser used 19733 bytes (157863 bits)
[2014-02-03 10:46:53]   ffmpeg: marker=d9 avail_size_in_buf=0
[2014-02-03 10:46:53]   ffmpeg: mjpeg decode frame unused 0 bytes
[2014-02-03 10:46:53]  artwork: Original image '/mnt/storage/Music/Adele/21/Folder.jpg': w 200 h 200
[2014-02-03 10:46:53]  artwork: Raw destination width 200 height 200
[2014-02-03 10:46:53]  artwork: Destination width 200 height 200
[2014-02-03 10:46:53]     raop: Building OPTIONS for WiPi-Air
[2014-02-03 10:46:53]     raop: Local address: 192.168.4.42 (LL: no) port 43975
[2014-02-03 10:46:53]     raop: Building ANNOUNCE for WiPi-Air
[2014-02-03 10:46:53]     raop: Building SETUP for WiPi-Air
[2014-02-03 10:46:53]     raop: token: unicast
[2014-02-03 10:46:53]     raop: token: interleaved
[2014-02-03 10:46:53]     raop: token: 0-1
[2014-02-03 10:46:53]     raop: token: mode
[2014-02-03 10:46:53]     raop: token: record
[2014-02-03 10:46:53]     raop: token: control_port
[2014-02-03 10:46:53]     raop: token: timing_port
[2014-02-03 10:46:53]     raop: token: server_port
[2014-02-03 10:46:53]     raop: Negotiated AirTunes v2 UDP streaming session 1; ports s=57276 c=42103 t=35173
[2014-02-03 10:46:53]     raop: Building RECORD for WiPi-Air
[2014-02-03 10:46:53]     raop: RECORD reply from WiPi-Air did not have an Audio-Latency header
[2014-02-03 10:46:53]     raop: Building SET_PARAMETER for WiPi-Air
[2014-02-03 10:46:53]    httpd: Found query string
[2014-02-03 10:46:53]     daap: DAAP request: /databases/1/containers/1/items?session-id=100&meta=dmap.itemname,dmap.itemid,daap.songartist,daap.songalbum,daap.songalbum,daap.songtime,daap.songuserrating,daap.songtracknumber&type=music&sort=album&query='dmap.itemid:-1'
[2014-02-03 10:46:53]     daap: Fetching song list for playlist 1
[2014-02-03 10:46:53]     daap: Asking for 8 meta tags
[2014-02-03 10:46:53]     daap: Parser will ignore duplicate occurrence of meta field 'daap.songalbum'
[2014-02-03 10:46:53]     daap: Found 7 meta tags
[2014-02-03 10:46:53]     daap: Sorting songlist by album
[2014-02-03 10:46:53]     daap: DAAP browse query filter: 'dmap.itemid:-1'
[2014-02-03 10:46:53]     daap: Trying DAAP query -'dmap.itemid:-1'-
[2014-02-03 10:46:53]     daap: DAAP SQL query: -(f.id = -1)-
[2014-02-03 10:46:53]       db: Running query 'SELECT p.* FROM playlists p WHERE p.id = 1;'
[2014-02-03 10:46:53]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND 1 = 1;'
[2014-02-03 10:46:53]       db: Running query 'SELECT COUNT(*) FROM files f WHERE f.disabled = 0 AND (f.id = -1) AND 1 = 1;'
[2014-02-03 10:46:53]    xcode: Custom get_buffer, not allowed by ffmpeg/libav. Setting to default.
[2014-02-03 10:46:53]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:53]       db: Starting query 'SELECT f.* FROM files f WHERE f.disabled = 0 AND 1 = 1 AND (f.id = -1) ORDER BY f.album_sort ASC, f.disc ASC, f.track ASC LIMIT -1 OFFSET 0;'
[2014-02-03 10:46:53]       db: End of query results
[2014-02-03 10:46:53]     daap: Done with song list, 0 songs
[2014-02-03 10:46:54]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:55]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:56]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:57]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:58]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:46:59]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:00]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:01]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:02]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:03]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:04]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:05]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:06]     raop: Packet header doesn't match retransmit request
[2014-02-03 10:47:07]     raop: Packet header doesn't match retransmit request
I also thought I would try and build my own copy so I can trace the problem, but am having trouble with the build dependencies. Am missing appropriate event header files so I assume I need libevent1-dev; where should I get it from?

Regards,

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Tue Feb 04, 2014 11:20 am

You can get it from my repository, but since the package has the same name as the 2.0 version you need to specifiy the version. I think it is something like this:

sudo apt-get install libevent-dev=1.4.13-stable-1

keab
Posts: 3
Joined: Tue Feb 04, 2014 7:42 pm

Re: Improved forked-daapd (iTunes server)

Tue Feb 04, 2014 8:10 pm

Rasbmc specials
Hi and thanks for a good work!
However the Raspmc distro uses "Upstart" to start services and that doesn't work together with your normal startup scrip since forked-daapd will (at boot) start before avahi-daemon, which causes f-d to fail and exit. I solved it by removing the normal start/stop mechanism:

Code: Select all

sudo insserv --remove forked-daapd
and then creating the file /etc/init/forked-daapd.conf with content:

Code: Select all

# forked-daapd service
description "forked-daapd service"
author "Andreas Bergvall"
#Note: starting avahi-daemon seems to be controlled by some raspbmc setting, but I'm not sure 
#          which one. Verify that avahi-daemon is running with    ps -e | grep avahi-daemon
start on started avahi-daemon
stop on runlevel [!2345]
exec /usr/sbin/forked-daapd -f
The only problem is that if I upgrade forked-daapd I assume that I must run the insserv command again. If not I could perhaps get two forked-daapd running (or ?). Would there be a way for your installation script to detect the raspbmc distro (I have no idea how) and create an upstart script instead of using the init.d script?

Another issue was the local audio output. I got it working by reinstalling alsa (I think this is what finally did the trick). It might help someone else.

Code: Select all

sudo apt-get remove alsa
sudo apt-get install alsa

Bewick Place
Posts: 18
Joined: Wed Jan 01, 2014 3:50 pm

Re: Improved forked-daapd (iTunes server)

Wed Feb 05, 2014 11:58 am

ejurgensen wrote:Playing my mp3 files did not produce the messages, so I guess I was wrong about the file format. I need to find out how to reproduce it to fix it. Maybe your log files have a clue?
Thanks for looking at this.

The rouge messages were 0x90:0xd4 & 0x80:0xd4 - basically sync messages.

However I noted that you didn't observe the problem and Shairport has had an update in the last week or so around this area. Once I'd built a new Shairport and tried it the issue has gone away.

Now I'll go back to the remote niggle, but as you say Retune seems to work ok.

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Wed Feb 05, 2014 12:26 pm

keab wrote:If not I could perhaps get two forked-daapd running (or ?). Would there be a way for your installation script to detect the raspbmc distro (I have no idea how) and create an upstart script instead of using the init.d script?
If you try to start forked-daapd while it is already running, it will fail because it can't bind to port 3689. So you won't end up with two instances. Maybe it's possible that the second instance messes up the first instance before it stops, I have never tested that.

I'm going to look into Upstart and see how other packages solve the problem you mention. Maybe I can just include an upstart conf file along with the init.d script? Avahi seems to have both in Ubuntu 13. If you come across an example of a good solution let me know.

@Bewick place: Good to hear, hope it really has been fixed. Notice that I've sent you a PM yesterday.

Thorium232
Posts: 1
Joined: Fri Feb 07, 2014 6:00 pm

Re: Improved forked-daapd (iTunes server)

Fri Feb 07, 2014 9:56 pm

ejurgensen wrote:When I got my Raspberry I wanted to do the same. I already had my music on a NAS, and just wanted to mount it as a NFS or Samba share. However, like you have found out, this means that forked-daapd will not detect library changes.
I'm in a similar situation. I was wondering if there is a way to tell forked-daapd to start a light scan (not the .force-rescan way) other than restarting the daemon (ex. kill -HUP). With a cron script I could resolve this and have the library at most a few minutes outdated.

Great work BTW.

Osvaldo.

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sat Feb 08, 2014 10:05 am

Right now the only way to trigger a light rescan is by restarting the server. You should be able to use "/etc/init.d/forked-daapd restart". You could make a cron job that restarts the server once a day at some convenient time? Maybe at a later time I'll add something similar to .force-rescan for light rescans.

ikke4
Posts: 27
Joined: Thu Jan 02, 2014 4:18 pm

Re: Improved forked-daapd (iTunes server)

Sat Feb 08, 2014 10:52 am

hi,

i have used forked-daapd a couple of weeks and now i installed the squeezeplug raspbian version on my sd-card. and installed the latest version of forked-daapd without the embedded artwork of libav 9.

everthing works BUT i only have the airplay options of my RPi and my apple Tv on my itunes remote on my iphone .. forked-daapd/itunes remote can't find my two airport express. (there on the same network and are working from itunes)

grt jochem

update: itunes was also running on the mac of the children ... when i turned of itunes .. everything was ok!

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Re: Improved forked-daapd (iTunes server)

Sun Feb 09, 2014 10:55 am

What is the best way of installing the latest version of forked-daapd in a new
copy of Rasbian?

Looking through the forum one seems to be faced with a lot of steps building one version and then updating somebody else's fork with a load more steps

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sun Feb 09, 2014 11:24 am

Just follow the instructions in my original post and you should be set. You don't need to build anything yourself.

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Re: Improved forked-daapd (iTunes server)

Sun Feb 09, 2014 12:47 pm

Okay I have it installed, but don't see how to access from my ipad. I have remote app installed, but it does not allow me to add an itunes library, it wants me to input a 4 digit pass code to access. The only other option seems to be home sharing which I thought forked-daapd did not support.

keab
Posts: 3
Joined: Tue Feb 04, 2014 7:42 pm

External drive issue Re: Improved forked-daapd (iTunes serve

Mon Feb 10, 2014 3:21 am

I have my music stored on an external hard drive. At boot, forked-daapd is started before the drive is mounted, so the library isn't scanned.
The log says
scan: Skipping library directory /media/RPiHDD/Audio/, could not dereference: No such file or directory

I solved it by adding a fixed startup delay for forked-daapd in the upstart script (I'm running raspbmc) , but it would be nice if you could configure forked-daapd to wait some time until the library root(s) exist

(Note: with 'upstart' it should be possible to add the mounting event as a condition but I couldn't get it to work. If anyone knows how to do it then I'm happy to hear. Tried: start on mounted MOUNTPOINT=/media/RPiHDD It seems that the mounted event is only sent for internal drives)

KeithSloan
Posts: 321
Joined: Tue Dec 27, 2011 9:09 pm

Re: Improved forked-daapd (iTunes server)

Tue Feb 11, 2014 9:40 am

Okay I have it installed, but don't see how to access from my ipad. I have remote app installed, but it does not allow me to add an itunes library, it wants me to input a 4 digit pass code to access. The only other option seems to be home sharing which I thought forked-daapd did not support.
Okay found instructions on how to pair ipad with forked-daapd in the laters README file.

keab
Posts: 3
Joined: Tue Feb 04, 2014 7:42 pm

Re: External drive issue Re: Improved forked-daapd (iTunes s

Wed Feb 12, 2014 9:07 pm

keab wrote: (Note: with 'upstart' it should be possible to add the mounting event as a condition but I couldn't get it to work. If anyone knows how to do it then I'm happy to hear.
I finally solved this myself (And remember that this is for Raspbmc):
In /etc/udisks-glue.conf, there is a filter named 'disks'. Add a post_mount_command which emits a 'mounted' event:

Code: Select all

match disks {
   [keep original lines]
    post_mount_command = "initctl emit --no-wait mounted MOUNTPOINT=%mount_point"
}
Then you can use the following start condition in /etc/init/forked-daapd.conf

Code: Select all

start on started avahi-daemon and mounted MOUNTPOINT=/media/YourExternalDriveLabel
Tip while you're editing udisks-glue.conf : If you hard drive doesn't spin down after 30minutes, try changing

Code: Select all

post_insertion_command = "udisks --set-spindown %device_file --spindown-timeout 1800 --mount %device_file --mount-options sync,noatime"
to

Code: Select all

post_insertion_command = "udisks --mount %device_file --mount-options sync,noatime ; hdparm -S 241 %device_file"
It seems that some drives, such as my Seagate Expansion, can't be controlled with the udisks command.

dmgmit
Posts: 1
Joined: Fri Feb 14, 2014 11:56 am

Re: Improved forked-daapd (iTunes server)

Fri Feb 14, 2014 12:08 pm

Forked-daapd works fine in my raspberry. However, I would like to autoplay randomly when I turn on and launch the raspi without any help of client daapd.
Are there any script or command for this task?

Thank in advance.

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sat Feb 15, 2014 1:04 pm

If you install curl you might be able to accomplish that with these two commands:

Code: Select all

curl "http://localhost:3689/login?pairing-guid=0x1"
curl "http://localhost:3689/ctrl-int/1/playqueue-edit?command=add&query='dmap.itemid:X'&queuefilter=playlist:2&sort=name&mode=2&session-id=100"
You must replace X with a valid songid in forked-daapd's database. You can see more about that here. Note that the above might not work if forked-daapd has not just started, because then session-id 100 might be invalid (you will get a HTTP error 403 in that case).

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Sun Feb 16, 2014 3:36 pm

I've made a new release, this one is version 20.0.26, and it has the following improvements:
- config option for max volume (important so my new AirPlay-capable receiver doesn't blow my speakers)
- start/stop issues in Raspbmc fixed
- better support for WMA files
- misc bug fixes
- major version bump - leaving 0.19 behind and leaping to 20.0

Enjoy!

marioscube
Posts: 52
Joined: Mon Dec 09, 2013 8:26 pm

Re: Improved forked-daapd (iTunes server)

Wed Feb 19, 2014 12:13 pm

A short while ago I posted here about my ARM5 device (so not a Raspberry Pi) and a previous version of forked-daapd.
The problem was that forked-daapd lost connection with my Airport Express (1st generation) and my AppleTV 3 a few seconds into a track (both flac and mp3). There were no problems if I used forked-daapd as a daap server for iTunes.

Now with the latest version of forked-daapd, I compiled from source, the ARM5 device plays (at least) a whole track (and sometimes several) before losing connection. The music stops playing always between tracks on the Airport Express/AppleTV 3. If I stop/start the track again with the remote app on an iPad or iPhone the music plays from where the app shows it to be. Rewind or fast forward on the slider also does the trick.
It looks to me like a timing problem (as it were timing updates to forked-daapd that almost ;) fixed my problems.

There is nothing significant in the log files and forked-daapd does not spike (cpu %) in top.

Does anyone have any idea where an how to fix this? Maybe changing some lines with timings in the forked-daapd code?

misenhower
Posts: 3
Joined: Fri Feb 21, 2014 1:42 am

Re: Improved forked-daapd (iTunes server)

Fri Feb 21, 2014 3:18 am

Hi ejurgensen,

I'm the developer of Remote for Windows Phone (http://wp8remote.com). I've had a few users who were interested in using my app with your version of forked-daapd on the Raspberry Pi. I made a few changes a while back to improve compatibility and for the most part things seem to be working very well.

One issue I'm seeing relates to viewing albums and songs from specific artists. When a server reports that it supports the play queue feature, my app expects to receive the daap.songartistid property (asri) when requesting the list of artists (via /databases/#/groups). The asri property was added with iTunes 11 and it is usually equal to the artist's persistent ID (mper).

When asri is included in the response, its value is then used in a few other requests, for example, when retrieving a list of albums or songs for a particular artist. Rather than querying the artist by name with ('daap.songartist:Artist Name','daap.songalbumartist:Artist Name'), the artist's ID is specified simply as ('daap.songartistid:12345').

It looks like Apple's Remote for iOS reverts back to querying with songartist/songalbumartist when the songartistid is left unspecified. Normally I would match that behavior, but this value is also used for playqueue-edit requests. One of the possible queuefilter values is "artist:12345" (where 12345 is the value of asri). I looked briefly at your code and it looks like artist is the only missing queuefilter type.

You can test the "artist" queuefilter from Apple's Remote for iOS by going to the list of artists, tapping and holding an artist, and selecting one of the play queue options. (Note that asri needs to be specified for this to work correctly, otherwise you'll end up with an invalid request like "/ctrl-int/1/playqueue-edit?command=add&mode=3&session-id=106").

I noticed also in your code that you detect a "quirky" query that has an itemid but no queuefilter. I think that might be caused by the lack of asri -- Apple's Remote seems to leave out the queuefilter when no songartistid is specified.

I'm including some sample requests from my app below. Please let me know if you need any more information. Thanks,
Matt

Requesting the list of artists:

Code: Select all

/databases/72/groups?meta=dmap.itemname,dmap.itemid,dmap.persistentid,daap.songartist,daap.songdatereleased,dmap.itemcount,daap.songtime,dmap.persistentid,daap.songartistid&type=music&group-type=artists&include-sort-headers=1&sort=album&query=('daap.songartist!:'+('com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32'))&session-id=133734685
Requesting albums for a specific artist:

Code: Select all

/databases/72/groups?meta=dmap.itemname,dmap.itemid,dmap.persistentid,daap.songartist,daap.songdatereleased,dmap.itemcount,daap.songtime,dmap.persistentid,daap.songartistid&type=music&group-type=albums&sort=album&query=('daap.songartistid:18164806100072657908'+('daap.songalbum!:'+('com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32')))&session-id=133734685
Requesting songs for a specific artist:

Code: Select all

/databases/72/containers/11885/items?meta=dmap.itemname,dmap.itemid,daap.songartist,daap.songalbumartist,daap.songalbum,com.apple.itunes.cloud-id,dmap.containeritemid,com.apple.itunes.has-video,com.apple.itunes.itms-songid,com.apple.itunes.extended-media-kind,dmap.downloadstatus,daap.songdisabled,com.apple.itunes.cloud-id,daap.songartistid,daap.songalbumid,dmap.persistentid,dmap.downloadstatus,daap.songalbum,daap.songtime,daap.songhasbeenplayed,daap.songuserplaycount,daap.songcodectype,daap.songbitrate&type=music&sort=album&query=('daap.songartistid:18164806100072657908'+('com.apple.itunes.extended-media-kind:1','com.apple.itunes.extended-media-kind:32'))&session-id=133734685
Playing artist songs, starting from a specific song: (should queue all songs from an artist, ordered by album, starting from the specified song)

Code: Select all

/ctrl-int/1/playqueue-edit?command=add&query='dmap.itemid:9864'&mode=1&sort=album&clear-previous=1&queuefilter=artist:18164806100072657908&session-id=133734685
Queueing a specific song from the list of an artist's songs: (should queue only that song, mode could be 0 or 3)

Code: Select all

/ctrl-int/1/playqueue-edit?command=add&query='dmap.itemid:11408'&mode=3&sort=album&queuefilter=artist:18164806100072657908&session-id=133734685
Shuffling all songs for an artist:

Code: Select all

/ctrl-int/1/playqueue-edit?command=add&query='daap.songartistid:18164806100072657908'&mode=2&sort=album&session-id=133734685

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Fri Feb 21, 2014 12:03 pm

Thanks, that was some great info. It was always a mystery to me why Apple Remote did not send a queuefilter when selecting songs from the artist tab. I’ll make sure to correct forked-daapd. I wish I had a way of testing with Remote for Windows, so I could check for myself if it’s working. Is there a way to do that? - given that I don’t have a Windows Phone, and I only have Windows 7…

Also, may I ask how you get your knowledge of the protocol? Is it by listening in on Apple Remote and iTunes?

misenhower
Posts: 3
Joined: Fri Feb 21, 2014 1:42 am

Re: Improved forked-daapd (iTunes server)

Fri Feb 21, 2014 5:11 pm

Unfortunately there isn't really a secure way for me to send a copy of the app to you for testing. There is a beta distribution channel through the Windows Phone Store, but you have to have a physical device to be able to sign into a Microsoft account to download it.

For the most part I just use Wireshark to intercept requests between Apple's Remote and iTunes. I also made a simple console application that lets me test out arbitrary requests, similar to the Python script on this page: http://dacp.jsharkey.org/ (under "Handy utilities"). One thing to note is that iTunes won't respond to your HTTP requests unless you include the "Viewer-Only-Client: 1" header. Also, with more recent versions of iTunes, you have to include another header to get access to the full range of features, "Client-DAAP-Version: 3.11" -- this allows you to see more than one database in the /databases response and I think it enables a few other features as well.

Matt

ejurgensen
Posts: 626
Joined: Thu Jul 04, 2013 8:11 pm
Location: Denmark

Re: Improved forked-daapd (iTunes server)

Fri Feb 21, 2014 8:17 pm

I've made a commit which I hope fixes the songartistid thing. It also adds the artist queuefilter. I've tested that asri is now returned when requested. For some reason Remote on iPad still sends the "quirky" query (even though it now gets asri), while Remote on iPod Touch now sends a sane query with an artist queuefilter.

Let me know if this fixes the issues with Remote for Windows Phone, or if more fixing is required.

Return to “Raspberry Pi OS”