Commit graph

62 commits

Author SHA1 Message Date
Fabrice Laporte
09bea52a41 fetchart: fix flake8 2014-11-09 20:55:53 +01:00
Fabrice Laporte
6170c3a179 fetchart: make test_art.py tests pass 2014-11-09 20:41:21 +01:00
Fabrice Laporte
4d9ce94426 fetchart: import itunes only if necessary 2014-11-09 20:40:45 +01:00
Fabrice Laporte
41d0f4d674 remove comment 2014-11-08 23:28:10 +01:00
Fabrice Laporte
1b694e569e fetchart: add 'sources' option
Fasten cover search by enabling engines selection and prioritisation.
2014-11-08 23:20:44 +01:00
Adrian Sampson
fc6664455a fetchart: Move iTunes priority
I like the CAA as a first-priority search because the images are generally
high-quality and there's no metadata ambiguity (we always find the right
release if it's in the catalog).
2014-11-06 10:37:58 -08:00
kerobaros
899eab334b fetchart: add iTunes Store art source; depends on python-itunes 2014-11-05 13:38:39 -06:00
Adrian Sampson
a7b7e23436 Minor fixes for #1033 2014-10-24 16:46:55 -07:00
Thomas Scholtes
89c82dc63d fetchart: correctly handle path encoding
* Ensure that `config.as_str_seq()` returns a list of unicode objects.
* Map these to bytestring paths so we can compare them to other paths.

Fixes #887
2014-09-13 16:49:34 +02:00
Adrian Sampson
588ecd0d7b Changelog & style for #846 (fix #836) 2014-07-01 14:22:16 -07:00
Fabrice Laporte
e16beb8d40 sort image names before checking for matches
images that contain substring that comes first in the cover_names
option list are prioritized
2014-06-27 23:44:12 +02:00
Adrian Sampson
dfa8445980 Style and wording for Google Images (#766) 2014-05-17 22:10:39 -07:00
Lemutar
c890384215 add a test, replace urllibs , update help 2014-05-16 10:56:55 +02:00
Lemutar
eb8048f54d add picture fetch over for google search 2014-05-14 21:23:28 +00:00
Thomas Scholtes
e96753f96a Plugins use import_task.album 2014-04-25 13:52:03 +02:00
Adrian Sampson
e5a9db1cac fix up some indentation warnings in plugins 2014-04-13 17:55:49 -07:00
Adrian Sampson
fb37be44db restore some comments from #684
I wanted to leave a few of these as comments -- they serve more as separators
than as internal documentation.
2014-04-13 17:43:43 -07:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Adrian Sampson
dd053d7723 changelog and style fixes for #665 2014-04-06 17:59:30 -07:00
Lee Reinhardt
bf05135e5f Added extra checking to fetchart plugin.
Will avoid a KeyError being raised when Content-Type header is missing.
See #664.
2014-04-06 14:42:51 -05:00
Johannes
856a28a8a0 Revert "no module-global session (#597)"
This reverts commit c56412a1d5.

 - The Requests library advertises itself as thread safe.
 - Cookies aren't so interesting, but keep-alive /
   connection pooling would be nice to have.
2014-03-10 08:53:12 +00:00
Adrian Sampson
c56412a1d5 no module-global session (#597)
This might have been perfectly correct, but I read that requests.Session
objects share cookies between requests. That makes me nervous for two reasons:
- thread safety (does requests lock the cookie jar internally? who knows?!?)
- leaking cookies could have privacy/performance implications; we don't need
  'em anyway
2014-03-09 11:54:31 -07:00
Johannes
3367dad0a4 Make fetchart use requests and send useragent
Closes #585
2014-03-09 09:26:30 +00:00
Adrian Sampson
8ffe83b99e fetchart: fix #533, remote_priority ignoring local 2014-02-09 16:10:53 -08:00
Adrian Sampson
620f0f8727 fetchart colors (#508): simplify, new colors
Also a changelog entry.
2014-01-27 22:51:58 -08:00
Adrian Sampson
33c40f111c merge colorization part of #509
Conflicts:
	beetsplug/fetchart.py
2014-01-27 22:46:58 -08:00
Adrian Sampson
06b3ee179c comments, naming, and docs for part of #509 2014-01-27 22:38:23 -08:00
Bruno Tournay
1a4b15c4a5 Colorized output of beet fetchart, for easier detection of albums with no cover 2014-01-27 22:03:42 +01:00
Bruno Tournay
0466df6215 Search again locally in album folder when running beet fetchart without -f 2014-01-27 22:02:29 +01:00
Adrian Sampson
deef7f9d20 a few more necessary album.store()s 2013-08-21 11:23:09 -07:00
Adrian Sampson
f1c41428e6 changelog/thanks/tweaks for #355
- Remove requests import
- Name change
- Remove some obsolete checks
2013-08-08 16:19:16 -07:00
Filipe Fortes
7c607ebf82 Simplify fetching cover art from release group 2013-08-08 10:02:25 -03:00
Filipe Fortes
a4470ace69 FetchArt plugin: Support grabbing album art from MB release group 2013-08-07 19:21:45 -03:00
Adrian Sampson
374e043c3c API/test enhancements for #257
Also, `cautious` defaults to False for backwards-compatibility.
2013-04-27 16:47:42 -07:00
Fabrice Laporte
2dc15a0e2b Use re.search instead of re.match with simplified regex.
Add additional cover_names parameter to art_in_path, and makes 'cover_names' a  plugin config option.
2013-04-27 12:21:57 +02:00
Fabrice Laporte
d9e213867c fetchart (issue 459): use regex to detect valid image names + 'cautious' option for finer control of filename matching 2013-04-22 23:44:35 +02:00
Adrian Sampson
d1e50da71f fetchart: remote_priority config option 2013-02-10 21:40:55 -08:00
Adrian Sampson
99ed9e03de rename ImportTask.path to paths (#89) 2013-02-03 11:22:27 -08:00
Tai Lee
23cd5453d9 Improved multi-disc album detection.
- Remove "part", "volume", "vol." multi-disc markers. These are often
  part of album titles, and not necessarily indicative of a multi-disc
  album. Only look for "CD X" and "disc X" (case insensitive), ignoring
  white space and other non-word characters.

- Don't only expect each disc to be in a subdirectory of a common parent
  directory, with all siblings belonging to the same release. Also match
  any consecutive siblings (even when the parent contains other albums)
  that are named with the same prefix and multi-disc marker.

- The `albums_in_dir(path)` function now always yields a list of paths
  along with each list of items. `ItemTask.path` is now always a list of
  paths.

- The `displayable_path(path)` function now accepts a list of paths, and
  will join them with "; " by default. This can be changed with the
  `separator` argument.

- The `sorted_walk()` function now does a case insensitive sort on
  directories, but still returns case sensitive results. This allows
  better multi-disc album detection.

- The `art_for_album()` function now takes a list of paths as its second
  argument, instead of a single path.
2013-02-03 23:51:31 +11:00
Adrian Sampson
7a410f636b happy new year
For future reference, this command did the trick:
ack -l 'Copyright 201' | xargs perl -pi -E 's/Copyright 201./Copyright 2013/'
2013-01-11 10:43:41 -08:00
Adrian Sampson
fbcd1d1c18 merge fixes from master 2012-12-19 12:22:23 -08:00
Adrian Sampson
6d68a4855e per-plugin configuration defaults in __init__()
This uses the new BeetsPlugin.config convenience view heavily. Things are
slowly getting less verbose.
2012-12-18 22:35:44 -08:00
Adrian Sampson
0c49db0f11 fetchart: fix exception when source returns None 2012-12-17 23:22:45 -08:00
Adrian Sampson
6c94358b13 begin Confit-ifying plugins in alphabetical order 2012-12-13 12:31:10 -08:00
Adrian Sampson
ffe5d37d78 log unicode string literals (GC-456) 2012-11-06 14:22:36 -08:00
Adrian Sampson
338eb6388e documentation for convert.exe problem (#64)
We currently just document the fact that convert.exe can interfere with finding
ImageMagick's convert binary. We can solve this with a config option easily once
confit is merged.

This also changes the line endings for fetchart.rst back to Unix.
2012-11-01 14:25:46 -07:00
Adrian Sampson
d9974081a7 add extension for proxied images
`urllib.urlretrieve` was using the correct extension in most cases -- I think
when the URL ended with .jpg -- but not in every case. This was leading to files
named just "cover" and not "cover.jpg" or something else sensible. In
particular, proxied URLs don't have .jpg extensions. This generates the filename
manually so the source image always has an extension.
2012-11-01 12:39:02 -07:00
Adrian Sampson
45650a4b64 artresizer: fix argument lists to helper functions
Also added some useful debug logs.
2012-11-01 12:15:51 -07:00
Adrian Sampson
07d3f3e066 lazily initialize ArtResizer singleton (#64)
Searching for `convert` or PIL has non-negligible performance overhead, so it's
preferable to only do it when really necessary. This way, the search is only
performed when ArtResizer.shared is accessed for the first time.
2012-11-01 11:40:53 -07:00
Adrian Sampson
f7677a4b56 fetchart: fix command & use maxwidth (#64)
An earlier commit broke the call to art_for_album here (too few arguments).
I've also now propagated the maxwidth setting for the command to match the
import hook.
2012-11-01 00:19:15 -07:00