Commit Graph

71 Commits

Author SHA1 Message Date
Max Kellermann
c4537fe6f6 TagArchive: add TagBuilder overload with ScanGenericTags() fallback
Load APE/ID3 tags from archives.
2016-02-26 14:03:16 +01:00
Max Kellermann
3d9652ae35 TagStream: add TagBuilder overload with ScanGenericTags() fallback
This commit adds support for APE/ID3 tags from NFS/SMB files.

See http://bugs.musicpd.org/view.php?id=4270
2016-02-26 13:48:38 +01:00
Max Kellermann
a9130cb99c TagFile: add TagBuilder overload with ScanGenericTags() fallback 2016-02-26 13:48:38 +01:00
Max Kellermann
7623c1c5cb SongUpdate: move tag_scan_fallback() to tag/Generic.cxx 2016-02-22 18:00:49 +01:00
Max Kellermann
a5f8fd774d tag/handler: use CamelCase 2016-02-22 17:38:06 +01:00
Max Kellermann
8211d4a1c2 DetachedSong: check AllocatedPath::FromUTF8() result 2015-10-20 12:16:25 +02:00
Max Kellermann
fc2154ee92 DetachedSong: move code from Update() to LoadFile()
Avoid duplicate AllocatedPath::FromUTF8() invocations in two callers.
2015-10-20 12:10:42 +02:00
Max Kellermann
41cc31c124 SongUpdate: use OpenArchiveInputStream() to open archive file
Don't pass Path::c_str() to tag_stream_scan() which requires a UTF-8
string.
2015-03-01 00:48:44 +01:00
Max Kellermann
605af61a0f db/simple: eliminate UpdateFileInArchive() if archive API is disabled
Reduce some unnecessary overhead.
2015-03-01 00:25:30 +01:00
Max Kellermann
90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann
2d06a8e880 storage/FileInfo: rename to StorageFileInfo 2015-02-28 23:00:26 +01:00
Max Kellermann
712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann
4d73e4d605 db/simple: create dedicated directory 2014-02-26 09:17:41 +01:00
Max Kellermann
4ab4cf8532 SongUpdate: pass Storage to UpdateFileInArchive() 2014-02-07 18:44:47 +01:00
Max Kellermann
29b18d9ab7 SongUpdate: use the Storage interface, support remote files
This commit finally allows the database update to scan remote files,
e.g. using the smbclient storage plugin.  However, it is not yet
possible to configure that, therefore the feature is not accessible
yet.
2014-02-06 19:06:08 +01:00
Max Kellermann
ad309cdeae SongUpdate: make variables more local 2014-02-06 18:58:56 +01:00
Max Kellermann
4465e2c46b db: add compile-time option to disable database 2014-01-30 20:39:40 +01:00
Max Kellermann
9d34fc394c Database*: move to db/ 2014-01-24 16:38:44 +01:00
Max Kellermann
51adaf2c47 decoder/*: move to decoder/plugins/ 2014-01-24 00:02:24 +01:00
Max Kellermann
5d4b450c52 DetachedSong: add attribute "real_uri"
Prepare for UPnP songs that retain there database identity.
2014-01-21 21:06:56 +01:00
Max Kellermann
64465c1318 Song: make the "parent" attribute mandatory
The Song class is only used for database songs now.  A Song without a
Directory is not possible anymore.
2014-01-19 23:16:09 +01:00
Max Kellermann
d2cf74027c Song: embed the Tag object statically into class Song
Reduces overhead because we need to manage only one memory allocation.
According to valgrind/massif, we save 7%.
2014-01-19 02:58:55 +01:00
Max Kellermann
9fb82f9687 DetachedSong: add method Update()
Don't create an intermediate Song instance when all we want is a
DetachedSong.
2014-01-15 12:05:44 +01:00
Max Kellermann
4f83c60296 copyright year 2014 2014-01-13 22:31:55 +01:00
Max Kellermann
322b061632 DetachedSong: fork of struct Song
From now on, struct Song will be used by the database only, and
DetachedSong will be used by everybody else.  DetachedSong is easier
to use, but Song has lower overhead.
2014-01-09 09:05:58 +01:00
Max Kellermann
8f9ba96c59 SongUpdate: move code to handle_lsinfo()
Don't create a temporary Song object in handle_lsinfo().  Instead,
print all tags while parsing the remote file.
2014-01-08 23:35:37 +01:00
Max Kellermann
ac1983eae3 tag/TagBuilder: rename Commit() to CommitNew() 2014-01-08 19:48:55 +01:00
Max Kellermann
809b0eb1f5 command: "lsinfo" and "readcomments" allowed for remote files 2013-12-29 18:25:32 +01:00
Max Kellermann
b5f3bfce92 SongUpdate: read tags from songs in an archive
Add the TagStream.cxx library, similar to TagFile.cxx, and use it to
load tags from song files inside archives.
2013-12-29 18:15:30 +01:00
Max Kellermann
df4db50904 DecoderList: add function decoder_plugins_supports_suffix()
Replaces decoder_plugin_from_suffix().
2013-12-29 16:59:57 +01:00
Max Kellermann
9be82891b0 TagFile: pass reference instead of pointer 2013-12-29 16:24:04 +01:00
Max Kellermann
c7b1038a9d Merge branch 'v0.18.x' 2013-12-14 12:37:16 +01:00
mobidyc
96fa69ff6b SongUpdate: accept files without metadata
If the file was recognized by a decoder plugin, accept it - don't
require metadata.
2013-12-10 19:34:35 +01:00
Denis Krjuchkov
0a6c4c31b2 fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8 2013-12-05 03:53:43 +06:00
Max Kellermann
f90abe9530 include cleanup using iwyu 2013-11-28 11:50:54 +01:00
Max Kellermann
a40246d312 TagFile: use Path instead of const char * 2013-10-26 15:38:29 +02:00
Max Kellermann
875821f2ba SongUpdate: use tag_file_scan()
Eliminate duplicate code.
2013-10-21 21:05:59 +02:00
Max Kellermann
72af3c0489 decoder_plugin: rename struct to DecoderPlugin 2013-10-21 20:31:34 +02:00
Max Kellermann
ff626ac763 *: use references instead of pointers 2013-10-19 18:48:38 +02:00
Max Kellermann
59f8144c50 *: use nullptr instead of NULL 2013-10-19 18:19:03 +02:00
Max Kellermann
abfbd55305 fs/Path: rename to AllocatedPath
The new class Path only holds a string pointer without being
responsible for allocation/deallocation.  The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00
Max Kellermann
b3611524f4 fs/Path: move definitions to struct PathTraits 2013-10-17 23:23:25 +02:00
Max Kellermann
77e4b28092 fs/Path: include cleanup 2013-10-17 22:08:57 +02:00
Max Kellermann
7c1cf61728 thread/{Cond,Mutex}: use "class" instead of "typedef"
Allows forward-declaration.
2013-10-17 10:06:31 +02:00
Max Kellermann
dbd88e6aef Client, ...: remove unnecessary glib.h include 2013-10-15 22:51:09 +02:00
Max Kellermann
9508ea982b fs/Path: add method IsAbsolute() 2013-10-14 22:38:29 +02:00
Max Kellermann
52ee132d92 TagHandler: use a TagBuilder internally
Reduce heap allocator overhead.
2013-09-26 17:35:08 +02:00
Max Kellermann
3f267b1795 Tag, ...: move to libtag.a 2013-09-05 18:26:56 +02:00
Max Kellermann
7d0269d2ce InputLegacy: move functions to the input_stream class 2013-09-05 00:23:14 +02:00
Max Kellermann
5101ef4b02 Tag*: move libtag.a sources to src/tag/ 2013-09-04 23:46:20 +02:00