Commit Graph

96 Commits

Author SHA1 Message Date
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann d63e2c2641 db/update: scan CUE playlist contents
This commit adds a PlaylistPlugin attribute "as_folder" which for now
is only enabled in the "CUE" playlist plugin (which handles separate
"*.cue" files).  If a playlist with this flag set is being scanned
during database update, it will be parsed and its contents will be
added to the database.  This allows clients to inspect them like
directories and its contents will be searchable.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/39
2019-09-08 00:39:53 +02:00
Max Kellermann f885e068c8 playlist/Plugin: add constructors 2019-09-01 15:01:58 +02:00
Max Kellermann 0d16772dea playlist/Plugin: rename with CamelCase 2019-09-01 14:58:49 +02:00
Max Kellermann ca9daf5e19 playlist/flac: set song URI to an empty string
Simplify the plugin by using a trivial relative URI; later,
playlist_check_translate_song() will set the correct full URI.
2019-08-16 14:55:12 +02:00
Max Kellermann f909615b14 include cleanups (powered by iwyu) 2019-08-15 17:57:20 +02:00
Max Kellermann 92c89f0c86 playlist/flac: allow reading from FLAC streams 2019-08-15 11:13:39 +02:00
Max Kellermann 34246eb7fd playlist/flac: read the file only once using FLAC__Metadata_Chain 2019-08-15 10:40:48 +02:00
Max Kellermann 5894514ccb playlist/flac: move code to ToSongEnumerator() 2019-08-15 10:40:37 +02:00
Max Kellermann dcb07e6ed4 playlist/flac: use class MemorySongEnumerator 2019-08-15 09:45:03 +02:00
Max Kellermann ccffff9870 playlist/flac: use the NarrowPath for FLAC__metadata_get_streaminfo() 2019-08-15 09:44:20 +02:00
Max Kellermann a8f314190f playlist/flac: add noexcept 2019-08-14 20:08:55 +02:00
Max Kellermann d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann 548aa00111 tag/Handler: pass StringView to OnTag() and OnPair()
Eliminates a number of allocations, because callers don't need to copy
the strings to a newly allocated buffer only to null-terminate them.
And most callers don't need to have a null-terminated string.
2019-06-06 13:00:53 +02:00
Max Kellermann 2c6ebe28e9 playlist/EmbeddedCue:: wrap CueParser in std::unique_ptr<> 2019-04-26 14:58:09 +02:00
Max Kellermann 401f06f367 playlist/EmbeddedCue: add noexcept 2019-04-26 14:57:03 +02:00
Max Kellermann 0d98677212 playlist/flac: copy the URI to fix use-after-free bug
Closes https://github.com/MusicPlayerDaemon/MPD/issues/508
2019-03-14 19:30:33 +01:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 94592c1406 build with Meson instead of autotools
So long, autotools!  This is my last MPD related project to migrate
away from it.  It has its strengths, but also very obvious weaknesses
and weirdnesses.  Today, many of its quirks are not needed anymore,
and are cumbersome and slow.  Now welcome our new Meson overlords!
2018-10-14 23:41:38 +02:00
Max Kellermann 90201e9970 DetachedSong, db/LightSong, SongFilter: move to src/song/ 2018-08-02 13:51:18 +02:00
Max Kellermann cf471e830f Merge branch 'v0.20.x' 2018-08-02 11:07:40 +02:00
Max Kellermann 906972973e case-insensitive URI scheme comparison
Required according to RFC 3986:

> An implementation should accept uppercase letters as equivalent to
> lowercase in scheme names

Closes #330
2018-08-02 11:01:45 +02:00
Max Kellermann 73c95d1fb2 TagFile: rename exported functions, use CamelCase
And specify whether generic tags are being scanned.
2018-07-06 22:33:35 +02:00
Max Kellermann 3d3a1232b1 tag/Handler: convert to class with virtual methods 2018-07-05 19:07:05 +02:00
Max Kellermann d0fbf6db59 input/Stream: remove attribute "cond", replace with handler interface
This adds a bit of overhead, but also adds flexibility to the API,
because arbitrary triggers may be invoked from that virtual method
implementation, not just Cond::signal().

The motivation for this is to make the handlers more dynamic, for the
upcoming buffering class utilizing ProxyInputStream.
2018-06-22 19:37:18 +02:00
Max Kellermann bb1e369f30 playlist/SoundCloud: fix -Wunused-lambda-capture 2018-01-23 09:57:52 +01:00
Max Kellermann 0095e2d7d8 playlist/Plugin: use std::unique_ptr<SongEnumerator> 2018-01-20 19:59:42 +01:00
Max Kellermann 55d1473918 lib/yajl/Callbacks: OO wrapper for yajl_callbacks 2018-01-11 20:25:17 +01:00
Max Kellermann 26b1573cbe playlist/SoundCloud: move code to Yajl::Parse(InputStream&) 2018-01-11 20:08:02 +01:00
Max Kellermann 7fe07324d7 playlist/SoundCloud: soundcloud_parse_json() throws exception 2018-01-11 20:08:01 +01:00
Max Kellermann 8e29430f21 lib/yajl/Handle: libyajl C++ bindings 2018-01-11 19:25:46 +01:00
Max Kellermann 2a774a1fea playlist/{flac,m3u}: use std::make_unique 2017-11-26 12:10:33 +01:00
Max Kellermann da9657aac4 playlist/SoundCloud: move enum key into struct, make strictly-typed 2017-09-21 23:10:11 +02:00
Max Kellermann 2886766fb5 playlist/SoundCloud: use strcmp() instead of memcmp() to avoid buffer overflow 2017-09-21 23:08:27 +02:00
Max Kellermann 501a4af914 util/StringUtil: move strip functions to StringStrip.cxx 2017-07-05 17:20:02 +02:00
Max Kellermann 86d05e98e5 Merge tag 'v0.20.8'
release v0.20.8
2017-05-19 20:13:01 +02:00
Mario Di Raimondo ffa676f577 playlist/m3u: support for mime-type audio-mpegurl for M3U playlists 2017-05-19 15:25:58 +02:00
Max Kellermann 03a97d87ea tag/Tag*: rename several source files 2017-02-08 08:49:42 +01:00
Max Kellermann d91d5a3ab5 playlist/SoundCloud: eliminate unnecessary casted variable 2017-01-20 17:16:11 +01:00
Max Kellermann 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann 31d77ec580 input/curl, ...: use strncmp() instead of memcmp() to avoid crash 2017-01-03 13:17:02 +01:00
Max Kellermann 2e182e84c3 thread/Mutex: remove ScopeLock, use std::lock_guard directly 2017-01-03 07:11:57 +01:00
Max Kellermann 8c744efd56 input/InputStream: migrate from class Error to C++ exceptions 2016-09-16 17:43:36 +02:00
Max Kellermann fc7d3f64c0 input/Plugin: migrate open() from class Error to C++ exceptions 2016-09-09 18:15:01 +02:00
Max Kellermann 20894d1c5e playlist/SoundCloud: use AtScopeExit() 2016-09-09 18:04:11 +02:00
Max Kellermann 2f03d2234a playlist/SoundCloud: use std::string 2016-09-09 18:01:36 +02:00
Max Kellermann dadf3d846b playlist/SoundCloud: implicit SoundCloudJsonData initialization 2016-09-09 18:01:01 +02:00
Max Kellermann 941a9284b9 playlist/SoundCloud: rename struct parse_data to SoundCloudJsonData 2016-09-09 18:00:26 +02:00