Commit Graph

110 Commits

Author SHA1 Message Date
Tom Kranz cd72cf3390 Use XSPF image elements as manually set artwork 2021-09-18 23:52:37 +01:00
Jim Broadus ffdaeba09f cueparser: Be more lenient when parsing indexes.
Most specs have mm:ss:ff as the index time format, but cue files have
been found with single digit minutes. e.g. 0:00:00 instead of 00:00:00

Reference: https://www.gnu.org/software/ccd2cue/manual/html_node/CUE-sheet-format.html
2021-06-15 14:14:00 +01:00
Jim Broadus 4e4fccc07a playlistparser: Add error mechanism for parsers.
Add a new Error signal to parser implementations. Display an error when
user tries to use the unimplemented CueParser::Save.
2021-06-11 10:17:20 +01:00
Jim Broadus f4108b5a0c playlistparser: Display errors on failures.
Add an Error signal to PlayListParser and connect that to the
PlayListManager::Error signal. This is eventually connected to the
Application::AddError. Add error messages in some cases where
PlayListParser can fail silently.
2021-06-11 10:17:20 +01:00
Jim Broadus 9bfd458b15 playlistparsers: Handle m3u UTF-16 playlists.
Rather than assume UTF-8, use QTextStream to read data. This checks the
byte order mark of the file to determine encoding.

As an optimization, since the playlist already needs to be searched for \r
characters, just create a string list and work from that.
2021-05-11 10:22:18 +01:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jonas Kvinge d09c27f719 Remove extra ';' 2019-11-10 00:30:18 +01:00
luz.paz fb93ae4b02 Fix misc. source comment typos
Typos found via `codespell`
2019-08-21 23:43:16 -04:00
Amish Naidu 107e945872 Convert uses of QtAlgorithms to std:: algorithms 2018-10-09 19:17:54 +01:00
santigl f609bc793f Fix remote-playlist load 2017-03-21 10:50:12 +00:00
John Maguire 84cc26f8b3 Support trackNum elements in XSPF.
Fixes #5093
2015-10-28 16:17:52 +00:00
zluca 78aea2c8f6 Makes Clementine read "REM DISCNUMBER" from CUE. 2015-10-16 15:17:18 +03:00
Chocobozzz 824526618c Fix accents issue in when save playlist in xspf format 2014-11-30 10:36:36 +01:00
Chocobozzz 50b7b7d889 Make format after update to avoid conflicts 2014-10-15 21:57:57 +02:00
Chocobozzz 8279f21251 Revert "Make format"
This reverts commit 17b1e9fbe6.
2014-10-15 21:55:03 +02:00
Chocobozzz 17b1e9fbe6 Make format 2014-10-15 20:55:24 +02:00
Arnaud Bienner 78804b12c6 Use a save dialog option instead of quick change menu.
This is less confusing IMO. The dialog will shown up only if users decided to in the preferences, so that will not bother users who don't need this.
This reuses lot of things from Alan contribution from #4484
2014-10-07 00:29:46 +02:00
Gavin Howard e5df59aeb2 Fix for m3u parser bug when an artist's name had a hyphen. 2014-08-27 02:21:11 -06:00
Gavin Howard 9141cd65bc Fixes requested by ArnaudBienner. 2014-08-19 13:26:00 -06:00
Gavin Howard f41bebbeb2 Ran 'make format' on my patch. 2014-08-18 09:56:01 -06:00
Gavin Howard d8ba0c4f91 Minor changes requested by hatstand. 2014-08-18 08:08:14 -06:00
Gavin Howard c026b599b4 Finish the last of my Playlist path preferences patch. 2014-08-13 22:47:26 -06:00
Gavin Howard a0bbe2cfaf Quick try to get metadata working on XSPF and M3U. 2014-08-13 22:47:26 -06:00
Gavin Howard 0efb23994d Hopefully this finishes the path part of playlist preferences. 2014-08-13 22:47:26 -06:00
Alan Briolat 7a46629d97 Fix a stupid missed semicolon
I appear to be suffering from too much Python...
2014-08-12 21:36:00 +01:00
John Maguire 054749b690 Merge pull request #4479 from alanbriolat/playlist-path-separators
Always convert path separators when reading playlists (fixes #1838)
2014-08-12 14:30:59 +02:00
Alan Briolat c02ea88bfe Always convert path separators when reading playlists (fixes #1838) 2014-08-12 13:01:59 +01:00
Alan Briolat a0c890592f Fix detection of parent-relative paths in playlist saving
File or directory names containing ``..`` caused saved playlists to
contain absolute paths instead of relative paths even when the relative
path was "safe".  This changes the detection to be more strict.

Potentially related to #4463.
2014-08-12 11:40:20 +01:00
Gavin Howard b41b9232ce Use relative filenames when saving XSPF playlists 2014-04-06 17:40:50 +10:00
John Maguire 5146bcdebc Some more NULL -> nullptr conversions. 2014-02-21 17:30:46 +01:00
John Maguire 192b60d965 Use nullptr as parent parameter default everywhere 2014-02-10 16:03:54 +01:00
John Maguire 3323c2d094 Convert all instances of foreach() to a C++11 for
find ext src -name '*.cpp' -exec \
    sed -i -e 's/foreach(\([^,]\+\),/for (\1 :/' {} \;
2014-02-10 14:43:32 +01:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
John Maguire 71893e4847 Use nullptr instead of NULL everywhere. 2014-02-06 17:29:59 +01:00
John Maguire d309d4ab27 Use c++11 instead of boost where possible. 2014-02-06 16:51:39 +01:00
David Sansome 6579392d22 Format XML playlists nicely with 2-space indentation. Fixes #4067 2014-01-05 10:12:11 +11:00
John Maguire 09eeeaab4e Fix tautological comparison. 2013-12-12 15:41:55 +01:00
Adam Porter 5252dac162 Don't replace song metadata with blank m3u EXTINF metadata. Fixes issue 2593 2013-06-01 12:36:09 +10:00
David Sansome 1208ba308f Add a parser for WPL playlists. Fixes issue 3437 2013-02-05 23:19:19 +11:00
David Sansome a004d66f3d Make the playlist parser recognise URLs with schemes of only 2 characters (eg, di://). Fixes issue 3452 2013-01-27 14:53:20 +00:00
David Sansome d5412d3800 Use QUrl::fromUserInput to decode URLs in playlists if they look like they're encoded. Fixes issue 3309 2012-11-23 21:51:22 +11:00
David Sansome acbf21be07 Fix a cue parser bug where songs starting after 99 minutes wouldn't be loaded. Fixes issue 1658 2012-08-26 13:56:11 +01:00
David Walluck 7aaf6dc920 Read the REM DATE and REM GENRE fields from cue files.
Fixes issue 1482
2012-06-11 19:22:03 +01:00
John Maguire 3f87987177 Allow upper case header for PLS files.
Fixes issue #2856
2012-04-10 14:33:40 +02:00
David Sansome 90bbed1ec9 Add podcast parsing and database classes 2012-03-06 18:39:23 +00:00
Arnaud Bienner 089586ad07 Activate fast QString concatenation.
As this is not source compatible because we sometimes assumed (now wrongly) that '+' operation returns QString object (it now returns QStringBuilder object actually), some minor other corrections were needed.
2012-02-19 14:44:33 +01:00
David Sansome ad3483e86a Treat spotify: URIs properly when loading playlists. Fixes issue 1715 2012-01-29 15:32:49 +00:00
David Sansome 4618651cf4 Merge branch 'master' into external-tagreader 2012-01-07 22:52:18 +00:00
David Sansome e9c0b4bd69 Musicbrainz tagging improvements:
* Fix a bug where the song title would be used for the album field
  * Get the album's year as well
  * Include all releases for a song in the results list
  * Remove duplicate albums
  * Sort results
2012-01-07 21:51:02 +00:00
David Sansome 9be641ee87 The external tagreader mostly works now:
* Make TagReaderClient a singleton until it's easier to pass dependencies around
 * Add a WaitForSignal() that uses a local event loop to wait for a signal to be emitted
 * Add a WaitForFinished() to _MessageReplyBase that blocks using a semaphore
 * Add blocking versions of all TagReaderClient methods
 * Use the TagReaderClient everywhere that Song::InitFromFile and friends were used before
2012-01-07 00:26:07 +00:00