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
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
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
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
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
b873209d39
Remove the <xiphcomment.h> include from song.h so that windows headers don't infect everything else. Also move other bits of song.h into song.cpp, and reduce the number of includes in song.h.
2011-11-28 13:56:55 +00:00
David Sansome
7f7451b72a
Stop the M3UParser from going into an infinite loop when parsing a file with an invalid #EXTINF line. Fixes issue 2080
2011-08-27 22:35:00 +01:00
David Sansome
ccb9f8cf94
Use URLs everywhere instead of filenames. Move the URL parsing and song loading code out of individual playlist parsers and into the base class. Fix the playlist parser unit tests.
2011-04-28 12:27:53 +00:00
David Sansome
3eedc916ad
Add a new logging system
2011-04-22 16:50:29 +00:00
John Maguire
0a54c5135b
Ignore empty lines in m3u files.
...
Fixes issue #1403
2011-03-17 16:05:08 +00:00
David Sansome
8c691d2b3e
Use constants instead of "1eN" literals for converting between time units.
2011-02-14 19:34:37 +00:00
David Sansome
3a1853a681
Use nanoseconds in playlist parsers, and fix the tests
2011-02-13 18:35:26 +00:00
David Sansome
507c5e2632
Change the fields in Song from seconds to nanoseconds
2011-02-13 18:34:30 +00:00
Paweł Bara
4f7e804638
library: watcher now updates CUE associated songs + ignores the not-CUE-associated songs in a CUE sheet
...
CueParser: properly update length for the last song from every FILE in multifile CUE sheet
new 'playlist_path' argument in the 'Load' part of PlaylistParser's API
2011-01-11 23:09:59 +00:00
David Sansome
eca62e037b
Don't re-read song tags from files while loading a playlist if they're already avaiable in the library. Fixes issue #1165
2010-12-25 14:41:31 +00:00
David Sansome
08b2bcc816
Always write URLs in XML based playlists, instead of URLs of relative paths. Also load playlist items from the library if possible. Fixes issue #1054
2010-12-11 10:35:07 +00:00
David Sansome
ed1a25693c
Add missing licenses to debian/copyright, and add copyright information to each source file
2010-11-20 13:27:10 +00:00
John Maguire
3df1f1bed9
Fix parsing of dos line endings in M3U.
...
Fixes issue #863
2010-10-11 15:20:53 +00:00
John Maguire
b0e1a516a9
Fix playlist parsing for iTunes M3U
...
Fixes issue #736
This is really Apple's fault for bizarrely using \r for line endings.
2010-09-13 16:31:42 +00:00
David Sansome
08a01d6997
The start of some code to automagically determine whether a URL is a playlist or a song, and load the songs in the playlist if it's a playlist. Still to do: timeout, forcing M3U for text/uri-list.
2010-06-15 13:24:17 +00:00
David Sansome
c0103cc1e0
Bring 1020 back again for Windows systems that don't seem to have a system encoding set :/
2010-06-02 21:26:12 +00:00
David Sansome
7cbd8f7500
Revert r1020, it wasn't necessary - see issue #364
2010-06-02 21:08:37 +00:00
David Sansome
2381d2ba1a
Use UTF8 explicitly rather than the local 8-bit codec
2010-06-02 21:04:03 +00:00
David Sansome
6dd32da591
Make the M3U parser use the local 8-bit encoding instead of latin1. Yes I know the spec says m3us are always latin1 - you didn't expect anyone else to actually follow that did you? Fixes issue #364 .
2010-06-02 20:06:47 +00:00
John Maguire
a0f19e5923
Remove unnecessary checks.
2010-05-23 17:04:55 +00:00
John Maguire
07b2c38690
Save support for M3U.
2010-05-23 17:00:45 +00:00
John Maguire
a59f5a3887
*Fix m3u parsing
...
*Add regression test
*Fix clang warnings
2010-05-23 15:35:28 +00:00
David Sansome
211ae65e3d
.pls parser. Fixes issue #302
2010-05-22 21:11:22 +00:00
David Sansome
c9c44ca592
Move the playlist parsers to another directory, and add a PlaylistParser class that magically uses the right parser.
2010-05-22 20:06:19 +00:00