Commit Graph

5868 Commits

Author SHA1 Message Date
chme b550ea4025 [README] Update smart playlist readme 2018-04-15 22:11:40 +02:00
chme d15018cb99 [httpd/jsonapi] Add cache control headers to some json api endpoints
Adds utility functions to httpd.c for checking the request headers for
either an "If-None-Match" or an "If-Not-Modified-Since" headers. If the
header value is found and it matches the current value for the requested
resource, we return early with a http response code 403 (Not Modified).
If the request header value is not present or does not match we add the
current ETag/Last-Modified values to the response headers and process
the request normally.
2018-04-15 22:11:40 +02:00
chme 99a812ad9a [jsonapi] Add new endpoints for artist/album/playlist/seek 2018-04-15 22:11:40 +02:00
chme 33459bd4ef [jsonapi] Extend search endpoint to support queries in smartpl language 2018-04-15 22:11:40 +02:00
chme f1c7672426 [db] Fix total results for album group query
The query did not respect the filter and therefor always returned the
number of albums in the library and not the number of albums for the
given query.
2018-04-15 22:11:40 +02:00
chme 6bdcda1524 [db/filescanner] Upgrade database to v19.08 and support limit/order by
in smart playlist files
2018-04-15 22:11:40 +02:00
chme 5189fe2305 [smartpl/filescanner] Refactor smart playlist parsing
Moves the actual parsing with ANTLR3 out of filescanner.c to allow
future reuse in different context (JSON api)
2018-04-15 22:11:40 +02:00
chme 9708e26dd1 [db] Add support for ORDER BY and HAVING clause in query parameter 2018-04-15 22:11:40 +02:00
chme 84f262401e [smartpl.g] Add ORDER BY, LIMIT and HAVING to smart playlist grammar 2018-04-15 22:11:40 +02:00
chme 7dd8955a92 [filescanner] Add http stream to the library prior to adding to a
persistent playlist
2018-04-15 22:09:28 +02:00
chme 60ebac076b Refactor adding non library items to the queue
Instead of asking a client to first scan the path into a media_file_info
object and afterwards add it to the queue, we now offer a library
function to directly add a path.

The library-source that can handle the given path translates the path
into new queue item(s) and adds them to the queue.
2018-04-15 22:09:28 +02:00
ejurgensen acd5bd3272 [raop] Always try to get volumes from devices at keep_alive intervals
Should be ok, even if the device does not support GET_PARAMETER for
volume, no harm done, we will just stop querying.
2018-04-14 22:19:53 +02:00
ejurgensen d9a67b6dce [raop] Use GET_PARAMETER of volume to keep connection alive and get speaker volume 2018-04-11 22:29:07 +02:00
ejurgensen fe05f80822
Merge pull request #509 from chme/smartplstartswith
[smartpl] Add "starts with" to smart playlist language
2018-04-11 19:04:30 +02:00
MSN-06 f33175a4b2 Fixed issues in README.md (#516) 2018-04-02 22:10:31 +02:00
ejurgensen 3c356c861f
Merge pull request #512 from sshambar/update-spec
[config] Update rpm spec to version 26.0
2018-03-19 12:56:20 +01:00
Scott Shambarger c03f05c5ce [config] Update rpm spec to version 26.0
- Added new web interface files.
- Updated with/without options to reflect configure defaults.
- Updated build dependencies.
- systemd no longer a hard requirement.
- Other cleanups to match Redhat standards.
2018-03-18 21:08:21 -07:00
chme b3dbce7109 [README] Add "starts with" operator to README_SMARTPL 2018-03-17 13:23:48 +01:00
chme 879307f3ac [smartpl] Support "starts with" operator for string fields 2018-03-17 13:23:48 +01:00
ejurgensen ea4ea072cd
Merge pull request #499 from chme/jsonapi
New endpoints for the JSON api (library, queue)
2018-03-17 09:38:02 +01:00
chme 4addb47589 [README] Add new endpoints for library and queue to the JSON API docs 2018-03-14 19:22:13 +01:00
chme a78ed20848 [jsonapi] Add new JSON api endpoints
Allows
- browsing artists/albums/playlists
- search
- moving a queue item
2018-03-14 19:22:13 +01:00
chme d1b47465a8 [jsonapi] Disable gzipping response
An attempt to improve the performance of the artists and albums
endpoints.
2018-03-14 19:21:57 +01:00
chme 66bdb7c0a9 [db] Add function to get a human readable string for data and media kind 2018-03-14 19:21:57 +01:00
chme d59e62312a [httpd] Allow cross origin POST, PUT, DELETE, OPTIONS requests
If the web interface is hosted on a different server, this is required
to allow sending e. g. post/put requests to control outputs.
2018-03-14 19:12:20 +01:00
chme a764fb3c52 [httpd] Serve index.html if requested source is a directory
Defaults to an index.html file instead of redirecting to admin.html. It
will not redirect to index.html, but instead serve the file (if exists)
directly. This allows nicer uris in the webinterface.

We will still redirect to admin.html if no index.html is found for
requests to http://ip:port/
2018-03-14 19:12:20 +01:00
ejurgensen e72ea36243 [docs] Update supported iTunes version in README client list 2018-03-11 22:41:16 +01:00
ejurgensen e79beb6877 [httpd_daap] Workaround for Android "Remote for iTunes" requesting playlist 0
See issue #505
2018-03-11 22:40:07 +01:00
ejurgensen 8012be596e
Merge pull request #506 from chme/queue
Add missing transaction end in error case
2018-03-08 22:38:59 +01:00
chme 2b5fa56bf9 [dacp] Add missing call to "db_queue_enum_end" in error case 2018-03-08 21:50:41 +01:00
chme f47a17e186 [db] Remove unused function "db_queue_get_pos_byfileid" 2018-03-08 21:50:41 +01:00
ejurgensen 5e13bac867 [configure] Add option to use old ffmpeg API (issue #502)
Seems ffmpeg 3.4 has a bug in the new API that causes a crash when
avcodec_send_frame() is called. The bug is fixed in 3.4.2.

The new option --disable-modern-av-api allows for building with the
old API, i.e. no avcodec_send_frame(), even if ffmpeg support is
detected at configure time. The option may also become useful for
easier testing of legacy mode.
2018-03-04 21:55:37 +01:00
ejurgensen d5ec17ffe0 [-] Let make install mkdir the "var/run" directory for the PID file 2018-03-04 17:41:18 +01:00
ejurgensen 50c6d3f272 [db] Silence misleading log error message
We were logging a missing lastfm_sk in the admin table as
an error, which it really isn't
2018-03-03 20:13:09 +01:00
ejurgensen 1da7230e37
Merge pull request #501 from hjellinek/patch-3
Fixed typo in comment
2018-03-03 16:37:05 +01:00
ejurgensen 818d0ca8e1
Merge pull request #500 from hjellinek/patch-2
Fixed typo
2018-03-03 16:36:37 +01:00
Herb Jellinek 8612b6dd12
Fixed typo in comment
"syncronization" should be "synchronization"
2018-03-02 17:00:14 -08:00
Herb Jellinek 874bccd1da
Fixed typo
"there" should be "their".
2018-03-02 16:51:53 -08:00
ejurgensen ea6fd1476a [db] Improve speed of browse queries (issue #478)
Before, we returned either unordered (for RSP, meaning client had to
sort) or ordered by a client selected sort_clause[]. The latter are
multi-purpose and therefore not optimised for browse queries.

To speed up, we predefine the entire set of browse queries, including
order, with matching indices. The predefined queries are used except
if the client explicitly requests a non-default order or query.

As a special bonus, the commit also allows queries with I_SUB that
have an offset but no limit.
2018-03-02 21:11:31 +01:00
ejurgensen 121b812c30 [transcode] Lower log level of "will transcode" messages 2018-03-02 20:51:33 +01:00
chme cd96ec579a [db/library] Use "PRAGMA optimize" instead of "ANALYZE"
ANALYZE collects and saves statistics even if there were no database
changes and the last collected data is still good.

According to the sqlite3 documentation, it is recommended to use "PRAGMA
optimize" which will call "ANALYZE" if it is necessary. "PRAGMA
optimize" will run "ANALYZE" based on prior queries on the same database
connection. It is recommended to run optimize before closing the
connection.

(see https://www.sqlite.org/lang_analyze.html)
2018-02-26 18:41:28 +01:00
ejurgensen 0014b9001b Bump to version 26.0 2018-02-24 16:45:41 +01:00
ejurgensen 237674d2a6 ChangeLog and README for forked-daapd 26.0 2018-02-24 16:45:05 +01:00
ejurgensen 666af127d5 [raop] Fix gcrypt error handling in raop_verification.c
And I learnt that gcrypt doesn't follow the negative-on-error pattern
2018-02-22 22:36:50 +01:00
ejurgensen c2a563eec7 [main] Remove build date so there will be no complaints about non-producible builds 2018-02-22 22:16:22 +01:00
ejurgensen f386c13bd9 [pipe] Add forgotten include of config.h 2018-02-22 22:11:42 +01:00
ejurgensen 6a56c19ad5 [pipe] Add forgotten include of pthread 2018-02-22 22:03:37 +01:00
ejurgensen 6c2ee276de
Merge pull request #495 from chme/fixwarnings
Fix compiler warnings
2018-02-22 21:52:17 +01:00
ejurgensen b1c9518a78 [-] Make json-c a required library
Already kind of was required, as it was required by Spotify, Chromecast and the web api
2018-02-22 21:49:11 +01:00
chme 30aa4cf525 [db] Fix comments 2018-02-22 21:36:14 +01:00