Commit graph

7851 commits

Author SHA1 Message Date
wordofglass
c811102eb2 test_edit: Expect mtime to change, unbreaks the multiple-item tests. 2017-08-22 23:34:06 +02:00
wordofglass
18c82cab5f test_edit: Add a comment explaining why I didn't change the writing behaviour
I was midway through writing a test when realizing that it's best
the way it is...
2017-08-22 23:24:33 +02:00
wordofglass
7d4627bb8f Ensure mtime is non-zero for Items in test fixtures.
mtime == 0 is the "this Item contains newer metadata than the file's
tags" marker. Setting this to something else than 0 emulates the state
of Items freshly read from the database.

Breaks 4 of the edit plugin tests.
2017-08-22 23:24:33 +02:00
Adrian Sampson
e983929e52 Fix a ReST syntax error 2017-08-21 14:30:12 -04:00
Adrian Sampson
2b31b493a6 Refine docs for #2663 2017-08-21 14:29:34 -04:00
Adrian Sampson
40a53513bc Merge pull request #2663 from tigranl/patch-1
Update gmusic.rst
2017-08-21 14:26:30 -04:00
Tigran Kostandyan
bfdcbe2aac Update gmusic.rst 2017-08-21 11:38:11 +03:00
wordofglass
695c706ae0 Merge pull request #2659 from wordofglass/master
Fix the edit plugin displaying bogus data or even crashing on re-imports
2017-08-21 00:36:14 +02:00
wordofglass
109b547f7a Changelog entry for the edit plugin bugfix 2017-08-21 00:32:46 +02:00
wordofglass
df479d686d Fix the edit plugin displaying bogus data or even crashing on re-imports 2017-08-21 00:32:03 +02:00
Adrian Sampson
51961bbba2 gmusic: Use Unicode literals (#2660) 2017-08-20 13:03:40 -04:00
Adrian Sampson
c89186afac Changelog for #2467/#2658 2017-08-20 12:52:54 -04:00
David Logie
f909f092fc Fix importfeeds plugin on Python 3. 2017-08-12 16:45:13 +01:00
Adrian Sampson
598c965b0f Simplify text for #2653 2017-08-11 14:35:22 -04:00
Adrian Sampson
4fa0827153 Merge pull request #2653 from plittlefield/patch-1
Update zero.rst
2017-08-11 14:33:40 -04:00
plittlefield
9e2a71eec3 Update zero.rst 2017-08-11 16:12:29 +01:00
Nathan Dwek
6160fa8851 Merge pull request #2631 from beetbox/Fix-2622
Do not warn about a BrokenPipeError we do consider - Fix #2622
2017-07-22 10:49:11 +02:00
Adrian Sampson
c06eca7e58 Merge pull request #2634 from anarcat/musixmatch-block-detect
lyrics: detect MusixMatch blocking
2017-07-18 17:13:31 -04:00
Adrian Sampson
6e1d0a8f54 Merge pull request #2633 from anarcat/lyrics-html
improvements and fixes to the lyrics RST rendering
2017-07-18 17:08:14 -04:00
Antoine Beaupré
a17974a152
add changelog entry for #2634 2017-07-18 16:36:40 -04:00
Antoine Beaupré
5ef68783a8
strip trailing and leading extra dashes
those are introduced if non-word characters are found, and are ugly
2017-07-18 16:33:22 -04:00
Antoine Beaupré
914dba4152
add tests for slug function, failing 2017-07-18 16:32:47 -04:00
Antoine Beaupré
b4b5473093
add pointer to slugify in slug 2017-07-18 16:14:10 -04:00
Antoine Beaupré
a8afabea80
move slug utility function to top-level
it's a generic utility function that can be reused, there's nothing
class-specific about it.
2017-07-18 16:12:48 -04:00
Antoine Beaupré
5e8d17a4fc
lyrics: detect MusixMatch blocking
we just look for the bad string in the HTML. this has the downside
that we may consider songs that have those exact lyrics (you never
know, really) may trigger this warning as well and we would fail to
fetch those songs.

we also fail if lyrics contain another magic string that seems to come
up when you do fill in the CAPTCHA after being blocked.
2017-07-17 12:21:55 -04:00
Antoine Beaupré
458f3636f4
compare artists based on the slug
this is necessary because otherwise artists with different string
representations but the same slug would overwrite one another

this outlines more clearly the code duplication between the rst code
and the slugify function, something which can be fixed later.
2017-07-17 11:59:14 -04:00
Antoine Beaupré
9c36a41ea8
slight refactoring: strip album only once 2017-07-17 11:50:15 -04:00
Antoine Beaupré
9894e8752b
ignore trailing/leading whitespace when comparing artists 2017-07-17 11:49:35 -04:00
Antoine Beaupré
36f84bfedd
add missing trailing newline after lyrics block
this would yield a warning for every song
2017-07-17 11:44:06 -04:00
Adrian Sampson
b303d5beb0 Slightly more complete sentences in comments 2017-07-17 10:59:04 -04:00
Adrian Sampson
aefb1c4947 Merge pull request #2628 from anarcat/lyrics-html
print lyrics as HTML
2017-07-17 10:56:29 -04:00
Antoine Beaupré
93966ed4ee
strip whitespace in titles
this would cause problems with songs that had trailing spaces with the
index directive
2017-07-17 09:00:22 -04:00
Antoine Beaupré
b6e42ee2e8
fix another unicode error
the unicode strings are not binary - rely on Python to do the right
thing here instead of encoding a string we know is already properly
encoded
2017-07-17 08:55:09 -04:00
Antoine Beaupré
6d58110bd2
move heredocs to top-level globals 2017-07-17 08:50:19 -04:00
Antoine Beaupré
7e0a48a46d
s/rest/rest/ 2017-07-17 08:49:40 -04:00
nathdwek@laptop
8da5c0f871 Changelog for #2623 2017-07-17 12:14:12 +02:00
Adrian Sampson
cf75b1548e Changelog entry for #2628 2017-07-16 10:15:45 -04:00
Adrian Sampson
9de94378b9 An even shorter metavariable 2017-07-16 10:14:49 -04:00
Adrian Sampson
813cf97686 Better metavariable for lyrics --help output 2017-07-16 10:10:41 -04:00
Adrian Sampson
d44eda56c5 Docs refinements for lyrics ReST output 2017-07-16 10:07:32 -04:00
Adrian Sampson
c655a13c41 Use title case in docs 2017-07-16 10:02:14 -04:00
Antoine Beaupré
5d8c15980e
fix flake8 warning 2017-07-15 16:24:07 -04:00
Antoine Beaupré
0bcd16f1ab
deal with encoding issues in python3
when we encode explicitly, we return bytes, so open files as binary
2017-07-15 16:21:41 -04:00
Antoine Beaupré
f667428758
write sphinx base files
we write the artists files in a subdirectory, to avoid infinite
recursions or flooding the current directory needlessly.

this way, the user has a good base structure and can just chain the
command into sphinx to continue building the next format, after
possible tweaks.
2017-07-15 15:43:16 -04:00
Antoine Beaupré
e6adb5e7da
cosmetic: do not use needless heredoc 2017-07-15 15:33:35 -04:00
Antoine Beaupré
91de8aac84
move rst writer to a different function
this simplifies and clarifies the code, although we need to call the writerst function twice to wrap up at the end of the loop
2017-07-15 15:33:35 -04:00
Antoine Beaupré
d330353e1c
rename the skip option to local
skip was a misnomer: we actually skip "unfetched" lyrics. this means
it's somewhat of a double-negative and really confusing.

--local is clearer, although less in opposition with --force
2017-07-15 14:19:25 -04:00
Antoine Beaupré
32de4148bc
use glob patterns correctly in index 2017-07-15 09:30:14 -04:00
Antoine Beaupré
ac32ae574c
optimize: write only 3 times per file
this makes the code more readable and reduces the number of syscalls
to write files
2017-07-15 09:23:59 -04:00
Antoine Beaupré
469c03a7bf
deal properly with empty album titles 2017-07-15 09:23:59 -04:00