Some clients aren't really capable of authenticating + some users probably
don't want to enter a password for the web interface. This option allows
clients on for instance the local network to connect without authentication.
Make it easier to add new parameters later, get rid of redundant code, clean
up, align between httpd_xxx modules and introduce new bugs. Yes, the refactor
got a bit out of hand.
For people who want to avoid the web login, or want to get around pairing
problems. This is also added because commit #e59a1a1 means that all
Remotes are now subject to auth, not just those with a user-agent name that
starts with "Remote".
Commit 190e37e was wrong, we can't just update revision number every time, we
should not do it when we are called with 0 or 1 as revision-number. In those
cases we must return the revision number the client should use, which should
either be the current pending (if other clients are waiting) or the number
following what was used last time we were called with > 1 rev num.
Hopefully this fixes Hyperfine issues.
In preparation for the new endpoints the following refactorings where
done in lastfm.c:
- Initialize lastfm.c in main.c instead of on first scrobble attempt
(necessary to retrieve the correct lastfm status)
- Return error messages if login attempt failed
- Add api function for status and logout
- Notify about Last.fm status changes
Unrelated changes in lastfm.c are:
- Refactoring of request_post
- Add request parameters sorted alphabetically and remove calling the
sort method in request_post
Artwork in embedded files not showing up in non-legacy mode if the artwork does
not require rescaling. The bug is that we are by mistake sending a chunk of the
embedded file, not the artwork in it.
The bug affected Hyperfine Remote, which would not call back with a playstatusupdate
when it got a cmsr which had the same value as the previous (a value of 2)