Commit Graph

3277 Commits

Author SHA1 Message Date
chme
912635e737 [db] Update queue_version for changed queue items 2017-12-09 11:01:41 +01:00
chme
91573752d9 [db] Update v19.05 to v19.06
- queue table: define id column as AUTOINCREMENT (requires drop+create)
- queue table: add column queue_version
- files table: update http-stream virtual paths (constructing the
virtual path for http-streams changed in pr #449, this migrates existing
databases to be consistent to the newly created paths)
2017-12-09 11:01:41 +01:00
chme
7083c65314 [main/httpd] Configurable web root directory over cli parameter 2017-12-03 10:46:50 +01:00
chme
8776aa36e2 [player] Trigger SPEAKER event after finishing the command speaker_set 2017-12-03 10:46:03 +01:00
chme
d839e8cabb [listener/player] Adjust code comment for LISTENER_SPEAKER event 2017-12-03 10:46:03 +01:00
chme
1689182432 [player/raop] Trigger the SPEAKER event if device verification
succeeded/failed
2017-12-03 10:46:03 +01:00
chme
eece4ce768 [ws] Listen and notify about output events 2017-12-03 10:46:03 +01:00
chme
80c1ef3114 [jsonapi] New endpoints for outputs and device verification 2017-12-03 10:46:03 +01:00
chme
f696229fff [player/dacp/mpd] Pass additional information to speaker enum callback 2017-12-03 10:46:03 +01:00
Wolfgang Scherer
b363c0dac2 [mpd] Consistent playlist name setup (#450) 2017-12-02 16:45:11 +01:00
Wolfgang Scherer
bb451802d2 [db] Queue notification when metadata changes (#448) 2017-12-02 16:44:29 +01:00
Wolfgang Scherer
0d006904da [scan] Consistent HTTP virtual paths (#449) 2017-12-02 16:44:01 +01:00
ejurgensen
617a0992d0 [http] Align indentation with the rest of the code 2017-11-27 17:53:59 +01:00
Wolfgang Scherer
8f899f2051 [http] .pls playlists (#447) 2017-11-27 09:48:17 +01:00
Wolfgang Scherer
dcc6fcf206 [mpd] Close connection for close command (#444) 2017-11-21 19:29:17 +01:00
chme
4800f9943b [db] Rename 'ADMIN_*' defines to 'DB_ADMIN_*' 2017-11-19 22:08:23 +01:00
chme
96bcaa9102 [mpd] Fix noidle command returning an error; fix format error in stats
command
2017-11-19 22:08:23 +01:00
chme
65444bba47 [mpd] Fix missing free for query_params.filter (mostly in case an error
occured)
2017-11-19 22:08:23 +01:00
chme
360439f448 [mpd] Cosmetic changes: fix indentation, use bool instead of int 2017-11-19 22:08:23 +01:00
chme
a0a6b7d473 [mpd] Send correct value for uptime in 'stats' command 2017-11-19 22:08:23 +01:00
chme
f49a3c888a [db] Store start time in admin table 2017-11-19 22:08:23 +01:00
chme
38ab4b9676 [db] Functions to read/store int in the admin table and introduce
constants for admin table keys
2017-11-19 22:08:23 +01:00
ejurgensen
5315bdf83e [raop] Make sure to set requires_auth if we get RTSP_FORBIDDEN 2017-11-19 20:11:42 +01:00
Wolfgang Scherer
fa76b6380c [mpd] correct handling of noidle command 2017-11-18 07:15:45 +01:00
chme
8d130cdc7c [listener] Support passing multiple events in a single notify call 2017-11-18 07:15:45 +01:00
chme
1e24b3656a [mpd] Fix idle command (idle events got lost if they happened while the
client was not in idle mode)
2017-11-18 07:15:45 +01:00
chme
4fe4bee809 [db] Only trigger the library update callback, if a query changed at
least one row
2017-11-17 19:40:04 +01:00
chme
1cdb9f450d [library/mpd] Store db update time in admin table and trigger DATABASE
event on init/rescan only if an update/insert occurred
2017-11-17 19:40:04 +01:00
chme
ea0cc64aa3 [db] Add functions to read/store int64 values in admin table 2017-11-17 18:12:03 +01:00
Wolfgang Scherer
37aaf73f6a [library] Deferrable library update time with persistence (TBD) 2017-11-17 18:12:03 +01:00
Wolfgang Scherer
e7e2b2c9a6 [library] Decrease library update delay and clarify purpose 2017-11-17 18:12:03 +01:00
Wolfgang Scherer
9f11a69c79 [mpd] enable database and update events for idle clients 2017-11-17 18:12:03 +01:00
ejurgensen
a6fab4ac0d [httpd/mpd] Adjustments to commit #69ff42f 2017-11-15 23:13:20 +01:00
Wolfgang Scherer
69ff42fc6a [mpd] apply trusted_networks to MPD 2017-11-15 22:29:22 +01:00
Wolfgang Scherer
ef767a08a4 [db] Report directory names that end in spaces 2017-11-15 22:25:12 +01:00
Wolfgang Scherer
3d43721cd0 [scan] After rescan, fullrescan inotify must be enabled 2017-11-13 19:52:17 +01:00
ejurgensen
3d5aeda7aa [httpd] Implement "trusted_networks" option
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.
2017-11-12 21:29:57 +01:00
ejurgensen
6d937469f5 [httpd] Decrease log level of stream complete messages 2017-11-11 22:20:09 +01:00
ejurgensen
473a29ef8a [httpd] More refactoring, reduce code duplication in the httpd_xxx modules 2017-11-11 22:20:09 +01:00
ejurgensen
9ed810d9df [httpd] Refactor httpd.c
- move stuff around and clean up
- put oauth out in own module like the other modules
2017-11-11 22:20:09 +01:00
ejurgensen
709d99d4c4 [httpd] Major refactor of the httpd request handling
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.
2017-11-11 22:20:09 +01:00
ejurgensen
0ebdd89715 [httpd_dacp] Log unrecognised requests 2017-11-11 22:20:09 +01:00
ejurgensen
d9f6097886 [httpd_dacp] Update to align with master 2017-11-11 22:20:09 +01:00
ejurgensen
20937ea4c9 [httpd_daap] Try to use revision as it is supposed to be used 2017-11-11 22:20:09 +01:00
ejurgensen
725319789e [httpd_dacp] Add debug logging of our playstatusupdates
Might help trace why some remotes sometimes show incorrect status
2017-11-11 22:20:09 +01:00
ejurgensen
fdc9054890 [httpd_daap] Improve code clarity a bit 2017-11-11 22:20:09 +01:00
ejurgensen
7b97503f04 [spotify] Protect against weird artwork data size from libspotify
For some reason libspotify sometimes returns >1GB sizes?
2017-11-11 22:20:09 +01:00
ejurgensen
eff9e6ebeb [httpd] Add promiscuous mode option, i.e. no auth requirements
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".
2017-11-11 22:20:09 +01:00
ejurgensen
8e7c47cce9 [httpd_daapd] Refactor daap 2017-11-11 22:20:09 +01:00
ejurgensen
50638223ac [dmap] Add a function able to make generate dmap errors without also sending them 2017-11-11 22:20:09 +01:00
ejurgensen
b710d728f8 [db] Add a free_query_params function 2017-11-11 22:20:09 +01:00
ejurgensen
75b14b85e9
Merge pull request #435 from wolfmanx/mpd-argument-unquoting
[mpd] Quoted argument unescaping fixed
2017-11-11 10:04:57 +01:00
ejurgensen
430d3f9f41
Merge pull request #437 from wolfmanx/mpd-password
[mpd] password command
2017-11-11 08:25:02 +01:00
Wolfgang Scherer
c48b819170 [mpd] password command 2017-11-10 09:55:44 +01:00
ejurgensen
5c3f1e9263 [filescanner] Fixup code style 2017-11-10 00:09:31 +01:00
Wolfgang Scherer
16fa1e77b2 [scan] Configuration option to follow symlinks 2017-11-09 01:16:44 +01:00
Wolfgang Scherer
5a960a3450 [mpd] Quoted argument unescaping fixed 2017-11-08 23:03:32 +01:00
Wolfgang Scherer
540d771648 [pulseaudio] allow specification of pulseaudio server 2017-11-05 19:33:14 +01:00
ejurgensen
04dc5956ed [mpd] Fix crash-on-exit because evconnlistener_free() doesn't ignore NULL pointers (issue #430) 2017-10-30 23:07:10 +01:00
ejurgensen
b7f5070ad3 [httpd_dacp] New fix attempt for issue #423 - revision number handling
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.
2017-10-30 20:16:34 +01:00
ejurgensen
79b2cf4fd7 [db] Log path to db on error, so it's easier to debug 2017-10-29 22:07:58 +01:00
ejurgensen
0c9a23e8d2 [pairing] Better log messages for failed pairing attempts 2017-10-28 21:23:21 +02:00
chme
f82b22042f [lastfm/jsonapi/ws/main] New JSON-API-endpoints for Last.fm integration
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
2017-10-28 12:22:45 +02:00
ejurgensen
b64d282f32 [artwork] Fix for issue #427, some embedded file artwork not showing
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.
2017-10-27 19:51:37 +02:00
ejurgensen
66a46173fa [httpd_daap.c] Improve user_agent_filter() code
E.g. remove hardcoded values of DATA_KIND_x
2017-10-21 19:19:51 +02:00
ejurgensen
2beb2fc4cf [httpd_dacp] Fixup temp log line 2017-10-20 22:46:00 +02:00
ejurgensen
190e37e537 [httpd_dacp] Fix bug where not always increasing revision number (issue #423)
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)
2017-10-20 22:28:31 +02:00
ejurgensen
a94fda38cc [mpd] Some minor fixup 2017-10-20 19:49:17 +02:00
ejurgensen
64dd6b93da [filescanner] Add missing timestamp update in itunes scanner 2017-10-17 23:12:30 +02:00
ejurgensen
e9e8567e8c [filescanner] Make sure to split in transactions even when playlist tracks are unknown 2017-10-17 23:12:30 +02:00
ejurgensen
2d54d0d8fe [filescanner] More alignment of iTunes scanner with the playlist scanner
I.e. use transactions and don't scan unmodified files
2017-10-17 23:11:31 +02:00
ejurgensen
bf8fa1c3f0 [db] Remove poorly performing and now unused _bymatch() functions 2017-10-17 23:11:31 +02:00
ejurgensen
322abb8274 [filescanner] Copy playlist scan optimisations to itunes scanner 2017-10-17 23:11:31 +02:00
ejurgensen
3520ab030e [filescanner] Fix wrong param in filescanner_playlist.c 2017-10-17 23:11:31 +02:00
ejurgensen
a57f7fc188 [httpd_dacp] Clean up code, remove dead stores 2017-10-17 23:11:31 +02:00
ejurgensen
1070f507a2 [filescanner] Add some const's and various fixup 2017-10-17 23:11:31 +02:00
ejurgensen
78dd8c89b6 [filescanner] Log message modifications 2017-10-17 23:11:31 +02:00
ejurgensen
00b7b97382 [db] Make I_FNAME index case insensitive and search fname using COLLATE NOCASE
Also some cleaning up
2017-10-17 23:11:31 +02:00
ejurgensen
88a565ea2c [db] Replace sqlite3_xxx() calls outside db.c/cache.c so they are abstracted 2017-10-17 23:11:31 +02:00
ejurgensen
659b5c70c4 [db] Faster size check in db.c's db_snprintf() 2017-10-17 23:11:31 +02:00
ejurgensen
47585d0d03 [db] Add methods db_mprintf() and db_snprintf() which wrap sqlite 2017-10-17 23:11:31 +02:00
ejurgensen
4d47307a02 [db/filescanner] Add index on fname, change playlist matching (wip) 2017-10-17 23:11:31 +02:00
ejurgensen
45bd2d6cc8 [filescanner] Protect URL items in playlists from purge after scan 2017-10-17 23:11:31 +02:00
ejurgensen
65b4c579f3 [db] Add method db_pl_ping_items_bymatch() 2017-10-17 23:10:21 +02:00
ejurgensen
b9621102f4 [db] Remove db_file_stamp_bypath(), not required any more 2017-10-17 23:10:21 +02:00
ejurgensen
4928d2c155 [spotify] Replace db_file_stamp_bypath with db_file_ping 2017-10-17 23:10:21 +02:00
ejurgensen
d6b30f5a64 [spotify] Add MEDIA_KIND_MUSIC and move DATA_KIND_SPOTIFY 2017-10-17 23:10:21 +02:00
ejurgensen
c8edd2ff64 [spotify] Use db_file_ping_bypath() + refactor + fix small memleak
Align with other scanners to use 1-query db_file_ping_bypath(). Also refactor to
reduce indent level and fix memleak of mfi->album + mfi->album_artist.
2017-10-17 23:10:21 +02:00
ejurgensen
10bd30c036 [filescanner] Update playlist scanner to use db_file_ping_bypath() to save queries 2017-10-17 23:10:21 +02:00
ejurgensen
fa2b4b810f [filescanner] Reduce number of queries during scan
Instead of SELECT'ing timestamp and then UPDATE'ing with a ping if file is
unchanged, skip the SELECT and just do a conditional UPDATE.
2017-10-17 23:10:21 +02:00
ejurgensen
fe731c0993 [db] Add new method db_file_ping_bypath() + cleanup malloc->calloc and char->const char 2017-10-17 23:10:21 +02:00
ejurgensen
95121e7157 [filescanner] Improve playlist scan speed with transactions (WIP - not working for URL's) 2017-10-17 23:10:21 +02:00
ejurgensen
0c2773039b [-] Fix alsa.c null pointer deref + some minor bugs and do some housekeeping
Thanks to Denis Denisov and cppcheck for notifying about the below. The leaks
are edge cases, but the warning of dereference of avail in alsa.c points at
a bug that could probably cause actual crashes.

[src/evrtsp/rtsp.c:1352]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/httpd_daap.c:228]: (error) Memory leak: s
[src/library.c:280]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library.c:284]: (warning) %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
[src/library/filescanner_playlist.c:251]: (error) Resource leak: fp
[src/library/filescanner_playlist.c:273]: (error) Resource leak: fp
[src/outputs/alsa.c:143]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/alsa.c:657]: (warning) Possible null pointer dereference: avail
[src/outputs/dummy.c:75]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/fifo.c:245]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1806]: (warning) Assignment of function parameter has no effect outside the function. Did you forget dereferencing it?
[src/outputs/raop.c:1371]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop.c:1471]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'.
[src/outputs/raop_verification.c:705] -> [src/outputs/raop_verification.c:667]: (warning) Either the condition 'if(len_M)' is redundant or there is possible null pointer dereference: len_M.
2017-10-05 22:13:01 +02:00
ejurgensen
1c377035f1 [raop] Restore ATV4/tvOS11 support by removing needless requirement for timing_port (closes #422) 2017-09-26 21:41:53 +02:00
ejurgensen
c75097b02e [transcode] Log pix_fmt by name instead of enum 2017-09-17 00:00:24 +02:00
ejurgensen
eec98e3b7e [main/transcode] Fix some libav compability + log what ffmpeg/libav we are using 2017-09-16 23:01:42 +02:00
ejurgensen
7cc9a8b02b [httpd] Fix unused label when compiling without libwebsockets 2017-09-16 17:01:51 +02:00
chme
6c45b808c0 [httpd/jsonapi] Fix unused variables when compiling without (#421)
--enable-spotify
2017-09-16 12:37:32 +02:00
ejurgensen
507bec8b8e [-] Fixup ifdef WEBSOCKET->HAVE_LIBWEBSOCKETS that I missed 2017-09-16 01:25:47 +02:00
ejurgensen
ef6f465aa8 [httpd_jsonapi] Add missing include 2017-09-16 00:10:26 +02:00