Commit Graph

134 Commits

Author SHA1 Message Date
ejurgensen d722b18817 Add optional request-session-id to login request
- should make it easier to write curl scripts to control forked-daapd
since you avoid the need to parse the replies just to find a valid
session id
2014-04-01 22:47:04 +02:00
ejurgensen 7e2f47f9ca Minor adjustment so Valgrind is happy with string handling in user_agent_filter 2014-04-01 21:51:07 +02:00
ejurgensen aef908b093 Don't announce support for playlist editing 2014-03-28 20:44:19 +01:00
ejurgensen 7d410fb6e7 Disable aeMk in databases reply since we don't calculate it properly 2014-03-28 19:25:15 +01:00
ejurgensen 35f8dd4233 DAAP modifications to properly show media kind shares in iTunes 2014-03-26 23:59:28 +01:00
ejurgensen 3ff4fa77be Merge branch 'libevent2' into dev 2014-03-24 04:59:08 +01:00
ejurgensen 7c3da47eb7 Small DAAP changes to align with iTunes 2014-03-23 00:23:34 +01:00
ejurgensen 687f349927 Let configure check libevent version and include according to version 2014-03-13 23:33:35 +01:00
ejurgensen 7ed6cc98c3 Add support for Spotify (squashed commit), and:
- Try to not return items which a client can't play
    - Remove inotify subscription to IN_MODIFY and IN_CREATE
    - Fix crash on unknown codec type in transcode.c
    - Probably added some new bugs...
2014-03-11 23:20:29 +01:00
ejurgensen 21fe5ac3a6 Don't reject daap login if no user-agent (for Roomie remote) 2014-01-27 20:43:22 +01:00
ejurgensen 02a73e3638 Artwork support for iTunes 11 (credit @torta) and related improvements 2013-12-25 23:06:41 +01:00
ejurgensen ab86e30be4 Fix bug where sort fields were not implemented in group replies 2013-12-18 19:14:39 +01:00
ejurgensen 392f34bf85 Don't announce smart playlists with no items 2013-12-17 23:27:37 +01:00
ejurgensen e79e11108e Ignore duplicate tags in DAAP requests 2013-12-16 22:09:18 +01:00
ejurgensen d1a51ef45d 1) Protect against uninitialised fl in daap_sort_build and 2) Don't
add blank items in daap group reply
2013-12-12 23:27:50 +01:00
ejurgensen 34a5fdb2ab Sort by name if sort=releasedate (Podcasts)
We don't know release date, so use name since it's better than random
2013-12-04 21:29:58 +01:00
ejurgensen c6119c5aa5 Force sane sorting in group replies
(because Hyperfine Remote will ask for artists sorted by album...)
2013-12-03 23:35:36 +01:00
ejurgensen a30069c0c7 Honor sorting in more daap replies and some minor restructuring of http_daapd.c 2013-12-03 23:16:07 +01:00
ejurgensen 10e4a138a3 Fix crash after special (malformed?) TunesRemote SE daap request
Request has comma before &query:
/databases/1/containers/1/items?session-id=100&meta=dmap.itemname,[...],daap.songcompilation,&query=('com.apple...
2013-12-02 20:55:16 +01:00
ejurgensen d85eb171cb Lower log level to spam for metadata message in httpd_daap.c 2013-11-16 22:52:53 +01:00
ejurgensen 7bb2fef25f Lower log level to spam for DMAP investigation and add dmap_add_raw_uint32() for later use 2013-11-14 23:08:20 +01:00
ejurgensen 28b485c595 Fix malformed DAAP packages 2013-11-10 12:35:24 +01:00
ejurgensen 9b190fe282 Fix group-type-type 2013-08-29 22:43:59 +02:00
ejurgensen 95fc525beb Add support for artist group request (experimental)
The purpose of this is mainly to support Hyperfine Remote for Android
2013-08-29 22:00:37 +02:00
Craig Markwardt c2e6eeda32 Fixes for Amarok and Banshee clients which don't send
revision-number in their update request.

Details: Banshee (v1.6.1) and Amarok client players send an
update request but do not send the revision-number parameter.
iTunes version 10 (and perhaps earlier) does send this parameter.
See: https://github.com/jasonmc/forked-daapd/issues/78

Fix: function daap_reply_update() now warns when revision-number
is not submitted by the client, but does not reply with an error.
In that case the server assumes a revision-number which insures
an update is sent back to the client.

Testing:
I verified that the following clients were able to connect succesfully
and retrieve a library listing:
  * iTunes 10.5.2
  * iTunes 10.4.2
  * iTunes 9.7.1
  * Rhythmbox 0.12.8
  * Banshee 1.6.1
I can't test with Amarok since I don't have this client.
2012-01-02 04:22:39 -05:00
Craig Markwardt bd10978d52 Fixes for iTunes v10.5 time-outs.
Details:

iTunes v10.5 clients changed how they responded to DAAP
protocol, and started disconnecting when the forked-daapd server
sent an empty "refresh" reply ("mupd" protocol).  This problem is
also coupled with session-timeout ("mstm" and "msal"); when these
server capabilities were enabled, iTunes 10.x clients did not poll
for updates and eventually disconnected.

I investigated DAAP network packets using Wireshark.  I found that
a true iTunes server sends a set of server capabilities in a specific
order, and order matters to the client.  When the correct order is used,
the client correctly polls for updates and does not disconnect.

This change:
  1. Send server capabilities in different order (daap_reply_server_info).
  2. Disables 5-minute update refresh.
  3. Disables 30-minute inactivity time-out.

Testing:
This server version successfully stayed connected to the
following clients:
  * iTunes 10.5.2
  * iTunes 10.4.2
  * iTunes 9.7.1
  * Rhythmbox 0.12.8
The clients stayed connected for at least several hours,
sometimes days, with activity or no activity.
2012-01-02 02:15:18 -05:00
Julien BLACHE 4be0d86aa0 Revert "Disable session expiration"
This reverts commit c70caad87e.
2011-09-10 18:44:37 +02:00
Julien BLACHE 9f06848d43 Reply to update requests periodically to avoid 30-minute iTunes timeout
Craig Markwardt <craig.markwardt@gmail.com> found out that the 30-minute
timeout in iTunes was caused by the lack of reply to update requests.

We now send out replies every 5 minutes, avoiding the timeout and
disconnection.

Thanks to Craig for digging into this, producing code to demonstrate the fix
and trying out a few more ideas for update support beyond this fix.
2011-09-10 18:37:16 +02:00
Julien BLACHE a70a45d925 Fix DAAP songlist generation after code move to dmap_common
Handling of the sort tags was left into httpd_daap.c where the code runs
after the song is added to the songlist - effectively adding the sort tags
to the *next* song, leading to incorrect sort tags on the current song.
2011-04-28 18:25:14 +02:00
Julien BLACHE 718d1e9487 Migrate file metadata encoding to DMAP common code 2011-04-09 10:11:35 +02:00
Julien BLACHE 07df6bb4aa Move dmap_add_field() to DMAP common code 2011-04-09 10:11:35 +02:00
Julien BLACHE 39542aee27 Move DMAP fields list and hash table to DMAP common code 2011-04-09 10:11:34 +02:00
Julien BLACHE 52691d6c4d Rename dmap_helpers.[ch] to dmap_common.[ch] 2011-04-09 10:11:34 +02:00
Julien BLACHE e23f02c7c0 Replace AVL tree in DAAP by a static hash using gperf 2011-04-02 09:52:19 +02:00
Julien BLACHE 303a3329eb Replace AVL tree in DAAP query by a static hash using gperf 2011-04-02 09:52:19 +02:00
Julien BLACHE 204c9681ca Enable and handle JPEG artwork in DAAP 2011-04-01 22:02:51 +02:00
Julien BLACHE c7209ab699 Add support for JPEG as a valid artwork output format
Reduce CPU usage by avoiding unneeded JPEG -> PNG conversions; it appears
all the clients we care about support JPEG as well as PNG.
2011-03-30 21:50:29 +02:00
Julien BLACHE f5b167080b Use title_sort for DAAP sort headers 2011-03-21 18:48:00 +01:00
Kai Elwert 4dce6390ea Switch to using db_query_fetch_string_sort() in daap_reply_browse() 2011-03-21 18:48:00 +01:00
Kai Elwert bf86cf45bd Always include sort tags in songlist 2011-03-21 18:47:59 +01:00
Julien BLACHE c70caad87e Disable session expiration
Auto-logout currently doesn't work as expected and breaks streaming etc once
the timeout occurs. Disable it until we can make it work as expected.

Maybe we'll need to upgrade the DAAP version.
2010-11-11 10:44:57 +01:00
Kai Elwert e5af78fe9f Implement sort=artist for DAAP queries 2010-10-09 16:06:00 +02:00
Kai Elwert ee7b976eeb Advertise DAAP updates support in server-info
We don't send out DAAP updates, but Remote requires this to work.
2010-10-09 15:54:53 +02:00
Julien BLACHE f7c2bf756a Remove duplicate mstm tag in server-info reply 2010-09-18 22:50:26 +02:00
Julien BLACHE 535d691a4a Fix full_uri memory leak in error path 2010-09-10 18:47:42 +02:00
Kai Elwert de8884c8df Add sort-headers support to DAAP song lists 2010-09-04 10:58:25 +02:00
Kai Elwert ee294753e1 Add sort-headers support to DAAP groups query 2010-08-29 12:07:08 +02:00
Kai Elwert 8a2d76895c Add sort-headers support to DAAP browse query 2010-08-29 12:07:08 +02:00
Kai Elwert eaaaec91a1 Introduce DAAP sort-headers helpers 2010-08-29 12:07:07 +02:00
Kai Elwert d4f341aff0 Handle include-sort-headers parameter in DAAP queries 2010-08-29 12:07:07 +02:00