Commit Graph

112 Commits

Author SHA1 Message Date
Jim Broadus 1309c76bec tagreader: Relocate artist/album/title guessing code
Move the code that attempts to fill missing song metadata out of the
tagreader worker. In the main process, it will be controllable using
settings and calling context.

The methods were moved into a new SongPathParser class that checks new
settings to determine if action should be taken.
2021-05-17 13:20:34 +01:00
Jim Broadus 163ebe71d8 libclementine-tagreader: Discontinue use of deprecated taglib methods.
Direct use of MP4::itemListMap() was deprecated in favor of using item() and
setItem(). XiphComment::removeField was replaced by removeFields.
2021-04-18 13:48:13 +01:00
Jim Broadus 8b2f7f08ae ext: Remove depencency on src
Remove /src from all include paths in /ext.
2021-03-17 18:26:51 +00:00
Jim Broadus c974b8b6f2 build: Don't include src/config.h from ext
Include the global /include/clementine-config.h rather than src/config.h
from /ext.

Note that this does not fully remove the dependencies on src from ext.
2021-03-16 09:30:56 +00:00
Jim Broadus e479206c45 tagreader: Follow redirects when downloading file
Set the QNetworkRequest::FollowRedirectsAttribute attribute to true.
This should be changed to use RedirectPolicyAttribute when all supported
platforms move to 5.9 or greater. Stretch is at 5.7.
2021-02-26 11:18:49 +00:00
Jim Broadus 1a3828e2c1 protobuf: Fix namespace conflict
Protobuf 3.15 adds a namespace alias for "pb" that conflicts with
Clementine's. Modify Clementine to use "cpb".

Patch provided by @ahesford

Reference: 5c028d6cf4/src/google/protobuf/port.h (L44)
2021-02-21 14:17:26 +00:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
dmdmdm 834b1d4514 Changed local variable names to be like_this 2020-07-08 18:01:59 +01:00
dmdmdm 0ff11ee2e0 Autoformated code 2020-07-08 18:01:59 +01:00
dmdmdm d3a28a40ed Shortened a line 2020-07-08 18:01:59 +01:00
dmdmdm 2c5c30de15 Guess album name from folder name 2020-07-08 18:01:59 +01:00
dmdmdm 40575e854e Fixed one indent 2020-05-24 15:54:08 +01:00
dmdmdm 0f2e8946d6 Made parameter const 2020-05-24 15:54:08 +01:00
dmdmdm 86b48c22ae Minor fixes 2020-05-24 15:54:08 +01:00
dmdmdm c8eaafb0a8 Switch from std::string to QString 2020-05-24 15:54:08 +01:00
dmdmdm fb262022f4 Switch from std::string to QString 2020-05-24 15:54:08 +01:00
dmdmdm be60c12438 Guess artist and title (fourth attempt) 2020-05-24 15:54:08 +01:00
dmdmdm 9b580e4a5c Guess artist and title from filename (third attempt) 2020-05-24 15:54:08 +01:00
dmdmdm ddbde91889 Guess artist and title from filename (second attempt) 2020-05-24 15:54:08 +01:00
Jim Broadus 0ecb773355 Handle lyrics tag for mp4
Translation table in mp4tag.cpp for reference.
2020-04-19 14:01:25 +01:00
Jim Broadus 509c65ced7 tagreader: Add debug handler for taglib
Pass taglib debug messages through qLog instead of printing directly to stderr.
2020-04-19 14:00:35 +01:00
Jonas Kvinge 79e7c2a1fa Add check for valid birthTime() 2019-11-13 19:10:39 +01:00
Jonas Kvinge c23a251ec3 Fix setting mtime/btime in tagreader 2019-11-13 18:47:27 +01:00
John Maguire 04c85c2bb7
Merge pull request #6433 from clementine-player/qt5
Qt5
2019-11-07 12:27:25 +00:00
Ulrich Spörlein 6e2506e94a Fix Clementine on FreeBSD/NFS files, where birthtime is always -1
As of Qt 5.10 the badly named created() which would fall back to POSIX
ctime if birthtime wasn't supported (as was the case on basically every
Unix filesystem up to some decades ago) is deprecated and replaced by
the better named birthTime or metadataChangeTime (yay!).

As of some years now, created() returns birthtime under FreeBSD, but
either due to the protocol or lack of implementation, this returns -1
under FreeBSD mounting a ZFS pool from a FreeBSD server with NFSv3.

This would render Clementine completely useless. Local filesystems are
not affected though. The fix is to catch the -1 birthtime and use mtime
instead, which is a more meaningful value anyway.

This closes issue #6423.
2019-10-27 22:52:36 +01:00
John Maguire cb6cd7c485 Merge remote-tracking branch 'origin/master' into qt5 2019-10-04 16:51:43 +01:00
Ronan Jouchet 483be6ef7c Fix ratings not saved to file tag (Fix #6385)
Commit 96a7e18a8d by @smithjd15 from
2019-04-03 fixed a number of potential zero-value field values, but it
also flipped the early exit condition skipping saving a rating to file.

It seems out of place with the rest of the commit, so considering it a
mistake and reverting to the original condition.

Manually tested; works and saves again ratings to file.
2019-08-09 03:09:17 +02:00
Jonas Kvinge 546078c317 Fix memory leaks (#6376) 2019-08-02 16:24:26 +01:00
Jonas Kvinge 66fdc935ac Fix formatting 2019-07-21 14:38:15 +02:00
Jonas Kvinge 1a2274bd2b Merge branch 'master' into qt5-update 2019-07-21 14:20:59 +02:00
James D. Smith 32e867a84b clang-formatter changes. 2019-05-31 11:25:38 -06:00
James D. Smith 96a7e18a8d Fix a number of potential zero-value field values. 2019-05-31 11:25:38 -06:00
James D. Smith 2752d61d2a clang-formatter changes. 2019-04-01 22:23:04 -06:00
James D. Smith 2adf9d068d Improved support for APEv2 tags. 2019-04-01 22:22:03 -06:00
smithjd15 8dd5750efa Improved support for APEv2 tags. (#6280) 2019-02-14 17:37:44 +11:00
Jonas Kvinge c277cc5f6c Merge remote-tracking branch 'upstream/master' into qt5-update 2019-01-27 19:44:28 +01:00
Jonas Kvinge 956df42caa Add syntax to proto files 2019-01-27 14:56:07 +00:00
Jonas Kvinge 159d3c6ba6 Merge remote-tracking branch 'upstream/master' into qt5-update 2018-10-01 22:54:05 +02:00
Jonas Kvinge c264725e78 Save tags for WavPack files (#6152) 2018-10-01 01:38:29 -07:00
Jonas Kvinge c29c2e95cc Fixed merge conflicts 2018-09-30 15:11:06 +02:00
raphj 292fd0b009 Use QString fromLatin1 instead of fromAscii
Methods QString::fromAscii and QString::toAscii have been deprecated in Qt 5 (https://doc.qt.io/qt-5/qstring-obsolete.html).
This commit replaces calls to QString::fromAscii by calls to QString::fromLatin1 and calls to QString::toAscii by calls to QString::toLatin1.
This allows successful build when merging branch master into branch qt5.
2018-07-11 13:40:01 +01:00
Mattias Andersson 31002ca534 Resolve an ambiguous function call 2018-07-08 23:09:41 +01:00
Jonas Kvinge 0de964954d Replace toAscii/fromAscii with toLatin1/fromLatin1 2018-06-29 02:48:53 +02:00
Jonas Kvinge a5e8eba91c Merge remote-tracking branch 'upstream/master' into qt5-update 2018-06-29 02:38:19 +02:00
Eoin O'Neill 4733185d08 Added basic VGM format playback and tag reading. (#6089)
Current VGM format implementation in GStreamer (gstgme) only supports Sega Geneses (Mega Drive) and Sega Master System emulation.
GStreamer also cannot handle the VGZ format (a shorthand for vgm.gz, a gzipped archive that contains a song) which means
that users will currently have to extract the contents of their VGZ files to individual vgm files.
2018-06-18 14:26:11 +01:00
Eoin O'Neill e2f63e3945 Implemented SPC playback functionality.
Would like to add more playback support for additional GME supported file types. GME is already supported by the GStreamer backend.
2018-06-16 10:06:37 +01:00
Chocobozzz 16b4f9a991
Merge remote-tracking branch 'upstream/master' into qt5 2018-05-14 08:25:27 +02:00
Jonas Kvinge 37912a87b8 Fix WavPack playback (#6048) 2018-05-01 18:29:47 +01:00
Florian Bigard 69b2a832db Merge branch 'master' into qt5 2017-01-18 15:57:07 +01:00
Ilya Selyuminov 1a477201ed Use CaseInsensitive file type checking #5499 (#5592)
* Fix Seafile setting page loading

Check access_token instead of QSetting parameters to make
sure that we're logged in.

* Use CaseInsensitive file type checking  (#5499)

CloudFileService and TagReader classes use
QString::endWith() method for checking file type.
This method is CaseSensitive by default.
2017-01-12 15:58:44 +00:00