Commit graph

1095 commits

Author SHA1 Message Date
Adrian Sampson
8cc05077ed Merge branch 'SUTJael-ftintitle_drop' 2014-04-22 14:47:28 -07:00
Bruno Cauet
7b0ce4f28e Disable the video stream in all ffmpeg conversions
Propagate the previous commit's change to all ffmpeg command lines.
2014-04-21 19:59:18 +02:00
SUTJael
4d616ceb93 Fix styling 2014-04-21 16:13:43 +02:00
SUTJael
345d47b40d Fix indent 2014-04-21 16:06:34 +02:00
Bruno Cauet
db2a2d1e25 Disable video feed in ffmpeg's flac conversion
Video feeds may be found in flac files, and the current ffmpeg
conversion command does not ignore them, causing beets to fail
to convert the file.

Add `-vn` to the command line to fix the problem.

Fix issue #712.
2014-04-21 15:37:10 +02:00
SUTJael
974e3128a6 Fix formatting issues.
Drop parameter sticky
2014-04-21 13:07:26 +02:00
Adrian Sampson
d96d12440e underscore_naming in play (#708) 2014-04-19 14:55:34 -07:00
Adrian Sampson
e8f56c897b play (#708): obviate debug option
Just reuse beets' global verbose logging.
2014-04-19 14:54:20 -07:00
Adrian Sampson
9192b7f5cb play plugin (#708): docs clarification, etc. 2014-04-19 14:41:30 -07:00
Adrian Sampson
492acbb721 Merge pull request #708 from davidhampgonsalves/master
Play Plugin
2014-04-19 14:32:34 -07:00
david hamp-gonsalves
f67490c464 reworking messaging 2014-04-19 09:34:50 -03:00
david hamp-gonsalves
44e84e775a correcting sytles 2014-04-19 09:24:37 -03:00
david hamp-gonsalves
f8b6c1ea11 added default commands to use system file associations 2014-04-19 08:52:18 -03:00
Adrian Sampson
5f4a9c6446 fix Windows path manipulation in importfeeds 2014-04-18 15:52:23 -07:00
david hamp-gonsalves
22f341eb97 added play plugin and docs 2014-04-18 10:33:53 -03:00
Yevgeny Bezman
e82147ce6d replaygain: added missing import 2014-04-17 21:32:12 +03:00
Yevgeny Bezman
bfac8cf84f replaygain: ignoring deprecation warning for threads_init in newer gi versions. Fixes #697 2014-04-17 20:06:03 +03:00
Thomas Scholtes
ea04344560 Test and fix unicode issues in logs. Fixes #699
The helper functions for creating test fixtures now include unicode characters.
2014-04-17 12:12:49 +02:00
Adrian Sampson
de1247c7bc query-based fix for #693
This is @geigerzaehler's fix from b868799, just with the typo fixed
(singletons -> singleton).

An alternate (more verbose) fix would have been:

    singletons_query.subqueries.append(
        dbcore.query.BooleanQuery('singleton', True, False)
    )

i.e., pass `False` for the `fast` parameter to indicate that this is not a
fixed-field query.
2014-04-16 10:18:38 -07:00
Thomas Scholtes
0751c560e3 Check for singleton directly 2014-04-16 14:42:19 +02:00
Thomas Scholtes
b8687999e2 Query string for computed fields. Fixes #693 2014-04-16 14:18:07 +02:00
Thomas Scholtes
4e2828668c Refactor mbsync 2014-04-16 14:02:51 +02:00
Adrian Sampson
033cf9ec21 spell check 2014-04-15 21:17:23 -07:00
SUTJael
2b7538ee82 Add drop option to FtInTitlePlugin 2014-04-15 23:04:41 +02:00
Adrian Sampson
9fd0e1d3fe fix #687: template indexes in logging statements 2014-04-14 10:35:20 -07:00
Pedro Silva
8aec50ff8c call truncate, not convert, when truncating 2014-04-14 15:39:36 +02:00
Pedro Silva
cf2f78ef55 fix #685: truncate files larger than 50MB for upload
The new behavior is as follows:

1. If the file size is greater than 50MB, and the 'truncate' config
option is 'no', skip the file.

2. If the file size is greater than 50MB, and the 'truncate' config
option is 'yes', reencode the file to ogg, and truncate to first 5
minutes.
2014-04-14 10:00:54 +02:00
Adrian Sampson
a45ac4a9d6 enable unused import checking
The "noqa" marker is for exceptions such as these.
2014-04-13 20:48:30 -07:00
Adrian Sampson
e21c04e912 flake8-cleanliness in missing
This is a little bit dumb, but one way to get the style checker to accept the
nice alignment in this plugin is to make it a dict.
2014-04-13 17:59:17 -07: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
2ec140edbc fix import path to BooleanQuery (#680) 2014-04-12 13:48:37 -07:00
Adrian Sampson
2caacba3c6 Merge branch 'ktkonrad-singleton' 2014-04-12 13:40:54 -07:00
Adrian Sampson
e5d28e2171 lyrics is flake8-clean 2014-04-12 13:32:46 -07:00
Adrian Sampson
7fcd7daf7c lyrics: minor style/doc cleanup 2014-04-12 13:08:24 -07:00
Adrian Sampson
2dafaa2f0c Merge branch 'KraYmer-lyrics-enh-tests' 2014-04-12 12:58:20 -07:00
Adrian Sampson
3549f9785c keyfinder: handle errors in command execution 2014-04-12 11:22:11 -07:00
Thomas Scholtes
650b49795b Add keyfinder plugin
Closes #662 and #279.
2014-04-12 18:44:38 +02:00
Fabrice Laporte
42747797cd better handling of songs with featuring artists, songs variants versions (live
etc), and songs combinations (lyrics are then appended)
2014-04-12 12:29:20 +02:00
Kyle Konrad
d044e1773a Replace SingletonQuery with BooleanQuery on computed singleton field.
Updated use in command parsing and mbsync plugin.
2014-04-11 22:20:04 -07:00
Adrian Sampson
271a1627a5 mbsync: call album.save()
This must have been broken as long as album.save() was a necessary call (i.e.,
since the introduction of the dbcore base classes).
2014-04-11 19:50:13 -07:00
Thomas Scholtes
c01fc542ed Support for initial_key with EchoNest 2014-04-11 21:03:11 +02:00
Thomas Scholtes
c27d26ddbf Refactor zero plugin 2014-04-10 22:01:04 +02:00
Adrian Sampson
6b0c03db9d info: don't print out album art blobs 2014-04-10 11:50:59 -07:00
Adrian Sampson
4c9daa12cc Merge pull request #676 from geigerzaehler/item-try-write
Add item.try_write() to log errors
2014-04-10 11:33:06 -07:00
Adrian Sampson
b79a1199ad remove stray ITEM_FIELDS reference (#650) 2014-04-10 11:31:51 -07:00
Adrian Sampson
33b44717ab embedart: catch log errors (fix #678) 2014-04-10 11:24:59 -07:00
Thomas Scholtes
5d753b4f38 Remove ALBUM_* constants. Closes #650 2014-04-10 17:44:39 +02:00
Thomas Scholtes
f6f974ec87 Remove ITEM_* constants
We might consider renaming `Item._fields` to `Item.fields` since other parts of
beets use it as a replacement for `ITEM_KEYS`.

See also #650.
2014-04-10 17:11:21 +02:00
Thomas Scholtes
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Thomas Scholtes
b7a26811ef Add "shell" keyword for commands and use it in convert
Convert used to split the user command at whitespaces and pass it to `Popen`.
This approach is to naive, it also was not consistent with output from the
logs. Instead we pass the whole command to a subshell.
2014-04-09 20:41:30 +02:00
Adrian Sampson
443b8089d5 remove unnecessary IndexableEnum
This is not really critical since list(Type)[i] works just as well. This fixes
a couple other problems from the enum transition:
- The name of TYPES was not really consistent with its new role as an enum
  type. Renamed this ImageType.
- Fix a rather egregious bug in embedart (undefined reference to Image).
2014-04-08 16:59:50 -07:00
Thomas Scholtes
071a5c363d Use new MediaFile api to embed art 2014-04-08 01:41:26 +02:00
Thomas Scholtes
55e5381bbd Merge branch 'extendable-mediafile'
Conflicts:
	beets/library.py
	docs/dev/plugins.rst
2014-04-07 23:49:29 +02:00
Thomas Scholtes
6402b664c6 More refactoring for convert 2014-04-07 20:17:55 +02:00
Thomas Scholtes
651bdf0acc Refactor convert plugin
* `encode()` raises an error when the command returns with non-zero exit
  status. We catch that in the higher-level conversion functions and skip to
  the next item without writing tags.

* Simplified the handling of the `keep_new` flag.
2014-04-07 18:24:59 +02:00
Thomas Scholtes
9d87a7fc02 Make convert --keep-new work again
Iincludes some more tests for the convert plugin. The test use the extended
TestHelper class and the new pathlib (see #621).
2014-04-07 18:07:43 +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
Yevgeny Bezman
2a6e5c7273 Merge branch 'replaygain-backends'
Conflicts:
	tox.ini
2014-04-06 08:45:35 +03:00
Thomas Scholtes
1b434a7dae Import original file when conversion fails.
Fixes previous test
2014-04-05 21:09:12 +02:00
Thomas Scholtes
1c598d4cee Add replaygain target level for gstreamer 2014-04-04 22:42:17 +02:00
Thomas Scholtes
81a2433e9d Use GLib.MainLoop instead of deprecated GObject 2014-04-04 19:46:43 +02:00
Thomas Scholtes
81f53fb0d2 Add basic cli tests for replaygain 2014-04-04 19:44:16 +02:00
Yevgeny Bezman
cf49d88156 replaygain: clarified the need to strange thread initialization| 2014-04-04 20:20:14 +03:00
Yevgeny Bezman
d8c37d6ca3 replaygain: Added a FatalReplayGainError class to signal the plugin that the backend failed completely 2014-04-04 19:17:41 +02:00
Thomas Scholtes
a5bdbdcf7f Move available backends to class level
See also https://github.com/sampsyo/beets/issues/650
2014-04-04 19:17:41 +02:00
Thomas Scholtes
439fc1938f Remove debug print statements 2014-04-04 19:17:41 +02:00
Thomas Scholtes
89680d835a Refine docstrings and fix style issues (flake8) 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
6aa1cc95cb replaygain: Improved error handling 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
2d9f40d62d replaygain: fixed small errors introduced by previous refactor. Commented the code in key parts. 2014-04-04 19:17:41 +02:00
Adrian Sampson
08b2bff28d eliminate GStreamer globals and initialize_config 2014-04-04 19:17:41 +02:00
Adrian Sampson
2369122075 minor Python style; move namedtuples to module 2014-04-04 19:17:41 +02:00
Yevgeny Bezman
d2c6d00b7b replaygain: Added some informative prints, removed hardcoded debug print 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
9581b91e10 replaygain: Added gstreamer support, fixed some small bugs 2014-04-04 19:17:40 +02:00
Yevgeny Bezman
86ee30df0d replaygain: modified current implementation to fit a backend framework in anticipation of other implementations 2014-04-04 19:17:40 +02:00
Thomas Scholtes
766c8b190b Add path argument to item.write()
Symmetrical to item.read(), this allows us to update the tags of files that are
not in the library. The motivation was this issue [1].

The commit also includes a nasty hack in the plugin code that prevents breaking
other plugins.

[1]: https://github.com/geigerzaehler/beets-check/issues/1
2014-04-04 14:56:10 +02:00
Adrian Sampson
c5174b3881 use command_output utility in echonest
That's the last direct use of the subprocess calls.
2014-04-03 19:51:50 -07:00
Adrian Sampson
d407db725f convert: catch OSErrors and display error message
This also adds close_fds (only available on Unixes) to the common subprocess
invocation utility.
2014-04-03 19:47:21 -07:00
Thomas Scholtes
4b1a1e3d65 Remove ITEM_KEYS_WRITABLE 2014-04-04 00:03:40 +02:00
Adrian Sampson
729e001432 benchmark: customizable album ID 2014-04-03 13:00:20 -07:00
Adrian Sampson
cd57c8da7f benchmarking for slow matches
Investigating #609. The culprit seems to be repeated reading of the config's
weight settings.
2014-04-03 11:56:26 -07:00
brilnius
e1878b34e7 Merge pull request #618 from brilnius/fix615
lastgenre plugin: separator in genre lists can now be configured
2014-03-19 22:22:41 +01:00
Bruno Tournay
81b74151ca Genre separator from config must be unicode string 2014-03-19 22:16:02 +01:00
Thomas Scholtes
0daea144e8 Fix album import feed with slashes
Makes tests from f2da1922b28571216c7bc0eaa71f56a316dc0d5d pass.
Fixes #610 and supersedes #611.
2014-03-19 17:26:11 +01:00
Bruno Tournay
618708916b Separator in genre lists can now be configured 2014-03-18 22:03:11 +01:00
Pedro Silva
e8f6781fa0 fix #568: ignore items with all keys null 2014-03-14 12:04:43 +01:00
brilnius
b8ef621941 Merge pull request #599 from brilnius/spl_auto
Ability to disable auto regeneration of smartplaylist
2014-03-10 22:46:55 +01:00
Bruno Tournay
865ea40eab Simplified config access 2014-03-10 22:44:38 +01: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
Bruno Tournay
33632e0caf We can now disable auto regeneration of smartplaylist 2014-03-09 22:57:07 +01:00
Adrian Sampson
fb038ecc30 changelog & style tweaks for album_query (#595) 2014-03-09 13:22:34 -07:00
Adrian Sampson
aa01906761 Merge pull request #595 from brilnius/spl_album_query
smartplaylist album_query parameter
2014-03-09 13:17:49 -07:00
Bruno Tournay
8a73a173df Attempt to factorize duplicate code 2014-03-09 20:15:51 +01: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
Adrian Sampson
7ddb8676c4 Merge pull request #597 from johtso/fetchart-requests-plus-useragent
Switch fetchart to requests and send user-agent
2014-03-09 11:43:51 -07:00
Johannes
3367dad0a4 Make fetchart use requests and send useragent
Closes #585
2014-03-09 09:26:30 +00:00
Adam M
e30a776baa fix iteration over keys instead of values 2014-03-08 22:10:37 +00:00
Adrian Sampson
ef36890a4e changelog and code simplification for #594 2014-03-08 13:58:37 -08:00
Adam M
c09b86db9c don't iterate over all items to calculate max_bpm
https://github.com/sampsyo/beets/pull/594#issuecomment-37108627
2014-03-08 21:17:37 +00:00
Bruno Tournay
05d54b4f23 Added ability to also include in playlist result from query based on albums (album_query parameter). 2014-03-08 21:24:56 +01:00
Adam M
dfe8280ff2 add format option to echosim command 2014-03-08 16:22:50 +00:00
Adam M
a0faa530f9 convert echonest bpm to value between 0-1 2014-03-08 16:12:29 +00:00
Adam M
1e7fc76817 add threshold option to echosim command 2014-03-08 15:35:20 +00:00
Adrian Sampson
ab8d008049 use OrQuery for smartplaylist (#575) 2014-03-07 14:38:40 -08:00
Adrian Sampson
f06a16819f spl mutli-query (#575): remove option, changelog 2014-03-07 14:26:49 -08:00
Bruno Tournay
ab513f7bc2 Add the ability to gather the result of ^Cveral queries into a smartplaylist 2014-03-05 21:40:24 +01:00
Pedro Silva
37ac63ccc6 remove debugging print statement inadvertently left from 6ef879f 2014-03-02 22:14:53 +01:00
Pedro Silva
6ef879ffec fix #563: split prog parts before formating in item's name 2014-03-02 22:08:45 +01:00
Pedro Silva
dc4624c1b3 specialize exception handling when doing checksums 2014-03-02 20:56:56 +01:00
Pedro Silva
5cc7cac2e7 clarify that keys are not necessarily mbids 2014-03-02 20:43:17 +01:00
Pedro Silva
6d283ecafa fix checksum problem where key was unintentionally hard-coded 2014-03-02 20:39:42 +01:00
Pedro Silva
bf7e04af0f fix #562: fail on empty code and handle analyze exceptions 2014-03-02 14:10:52 +01:00
Adrian Sampson
472571a4c6 web: fix typo in albums endpoint 2014-02-26 20:08:22 -08:00
Adrian Sampson
1253cb695d move show_model_changes to ui package
This makes it more naturally reusable for plugins.
2014-02-22 15:06:16 -08:00
Adrian Sampson
58dd5f47f5 use _show_model_changes in mbsync 2014-02-22 14:37:04 -08:00
Adrian Sampson
661e82fdec echonest: remove confusing length output (#545) 2014-02-17 22:57:37 -05:00
Adrian Sampson
007c26176e Merge pull request #535 from kljohann/last_playing
mpdstats: update last_played
2014-02-11 09:51:46 -08:00
Adrian Sampson
3dd9e4622f lastgenre: tolerate el.weight is None 2014-02-11 09:49:15 -08:00
Adrian Sampson
7190964e05 restore echonest fetch command (fix #540) 2014-02-11 09:44:02 -08:00
Adrian Sampson
4c5fc8fd76 echonest: use only one plugin class (fix #536) 2014-02-10 22:08:15 -08:00
Johann Klähn
73a43b56a0 mpdstats: update last_played
This fixes #529 and brings back the old behaviour of setting last_played
on every song change regardless of whether it is played to the end or skipped.
2014-02-10 20:55:42 +01:00
Thomas Scholtes
004e9a8144 Add query converter 2014-02-10 17:26:26 +01:00
Thomas Scholtes
dcbf7ecc36 Fix album retrieval 2014-02-10 17:26:26 +01:00
Thomas Scholtes
6663ed0c64 Use URL converters 2014-02-10 17:26:26 +01:00
Adrian Sampson
8ffe83b99e fetchart: fix #533, remote_priority ignoring local 2014-02-09 16:10:53 -08:00
Adrian Sampson
ee713d153c ihate: fix singletons (from #486, fix #411) 2014-02-08 12:11:32 -08:00
Adrian Sampson
fe5c175cc3 style fixes for ihate (#486) 2014-02-08 12:00:23 -08:00
BrainDamage
6836e9c725 updated iHate plugin to replace hardcoded regex system in favour of more flexible queries
changed config layout of iHate plugin to a simpler system
updated unit test for ihate plugin accordingly
updated docs for ihate plugin accordingly
2014-02-07 21:37:33 +01:00
Pedro Silva
ecff56fc44 Fix #522: treat copy/move args as dirs and process items accordingly 2014-02-02 20:45:57 +01:00
Thomas Scholtes
75c3b82d88 Test and fix web /item/query/<query> 2014-02-02 19:12:10 +01:00
Thomas Scholtes
f706e58409 Web API handles multiple ids 2014-02-02 19:04:04 +01:00
Adrian Sampson
318649c16c convert: fix transcode on windows (#519) 2014-02-02 09:54:33 -08:00
Johann Klähn
e78b0928b2 fix mpdstats plugin after query restructuring
BytesQuery does not handle unicode strings correctly at the moment
and PathQuery seems like a reasonable query to use.
2014-01-31 20:16:22 +01:00
Adrian Sampson
456c8a7f01 fromfilename: fix #460: crash w/ no capture groups 2014-01-30 08:19:16 -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
def635a33b rewrite: flatten Confit view to string
Previously, this would pass around a ConfigView object which would only lazily
get turned into a string. Bad!
2014-01-23 19:46:13 -08:00
Thomas Scholtes
f98240b83c JSON API responds with embedded items
This effectively removes the "album_ids" and "item_ids" keys from the responses
of `/item/` and `/album/`, respectively. Instead there are "albums" and "items" keys,
respectively that contain a list of JSON representations for all albums and
items.
2014-01-21 22:40:42 +01:00
Thomas Scholtes
9d1731faf2 Use generators to stream web requests 2014-01-21 16:42:25 +01:00
Thomas Scholtes
7d6d8f1fd4 Embed item data into web request 2014-01-21 16:08:22 +01:00
Adrian Sampson
9ee4adc5e1 move remaining generic Query types to dbcore.query
NumericQuery is still broken. This, of course, is the whole reason for the
change.
2014-01-20 16:40:50 -08:00
Adrian Sampson
77daa542c8 fix infinite-recursion regression in rewrite
Reported by axion on IRC.
2014-01-20 11:39:33 -08:00
Adrian Sampson
dcee7b6219 dbcore: terminology
Replace "library" and "lib" references in dbcore with "database" and "db" for
short.
2014-01-18 16:36:04 -08:00
Adrian Sampson
cbbb38c417 new BytesQuery factors out MatchQuery's path logic 2014-01-13 16:17:30 -08:00
Adrian Sampson
1ad1f7634c py26 compatible format strings (fix #490) 2014-01-09 11:22:49 -08:00
Adrian Sampson
d30db10d10 mpdupdate: remove debug clause
Thanks to @phmongeau for pointing out this embarrassing mistake.
2014-01-08 22:43:10 -08:00
Heinz Wiesinger
7158f7aefc Make sure bpm values coming from echonest are stored as integers. 2014-01-05 20:21:04 +01:00
Adrian Sampson
04c0bd50fd smartplaylist: use new evaluate_template signature 2013-12-29 12:30:44 -08:00
Adrian Sampson
8a105b0cb9 Merged in yevgenybezman/beets/scrub-add-mp4 (BB pull request 1)
scrub: Added MP4 support to scrub plugin
2013-12-22 12:47:34 -08:00
Yevgeny Bezman
7310f0a371 scrub: Added MP4 support to scrub plugin
--HG--
branch : scrub-add-mp4
2013-12-22 22:04:47 +02:00
Adrian Sampson
938563e287 echonest: get audio_summary in search (fix #481) 2013-12-18 12:35:31 -08:00
Adrian Sampson
5e405f6b84 Merge pull request #480 from fortes/patch-1
Don't try to parse None as HTML when fetching lyrics
2013-12-18 12:04:45 -08:00
Adrian Sampson
5fb7c424ad use canonical parent, not base tag (#478) 2013-12-18 12:01:55 -08:00
Filipe Fortes
0824ccb85f Don't try to parse None as HTML when fetching lyrics
Fixes #479
2013-12-18 07:37:01 -08:00
Adrian Sampson
3338ef2ff2 lastgenre: multiple + canonical genres (fix #478) 2013-12-17 17:29:37 -08:00
Adrian Sampson
6ab0abfa90 detect missing echonest fingerprints (fix #477) 2013-12-17 17:18:16 -08:00
Adrian Sampson
16a6138f33 Merge branch 'master' of github.com:sampsyo/beets 2013-12-17 17:13:21 -08:00
Johann Klähn
0bb395fa8c mpdstats: fix typo/bug 2013-12-14 12:11:18 +01:00
Adrian Sampson
d0e53d48b3 echonest: tiny py26 fix 2013-12-12 15:50:08 -08:00
Adrian Sampson
19868946d5 mpdstats refactor: comments/credit 2013-12-12 15:47:26 -08:00
Johann Klähn
159a67e30f mpdstats: reload item before calculations
As mpdstats is a long running process the value of one of the attributes
may have changed since the song started to play (f.ex. through a manual
update using `modify`).
2013-12-12 08:29:01 +01:00
Johann Klähn
df274e2b15 mpdstats: refactor plugin 2013-12-12 08:29:01 +01:00
Johann Klähn
ad2028ddf7 mpdstats: do not call item.write
The attributes used by this plugin are not 'writable'[^1] anyway so this
leads to needless file access. Also we do not need to check for
`item._lib` as this will always be populated by the call to
`lib.items(...)`.

[^1]: As per `ITEM_KEYS_WRITABLE` in `beets/library.py`
2013-12-12 08:23:33 +01:00
Johann Klähn
97e4ccbbd9 expand '~' in host in mpdstats 2013-12-11 12:04:39 +01:00
Adrian Sampson
4ea5ed9eed echonest: always flatten results to dict
This avoids the need for two cases (song object or dict) in parts of the code.
2013-11-29 12:58:46 -08:00
Adrian Sampson
5e08c178e6 echonest: fix codegen/identify
I broke two things:
- forgot to return the fingerprint! oops
- need to handle raw Exception raised by pyechonest
2013-11-29 10:09:09 -08:00
Adrian Sampson
9bcd7aecae echonest: clean up FFmpeg-based audio conversion
subprocess.check_call helps a lot here.

--HG--
extra : amend_source : 009a79de8f97407fc60b62aa6b7bd23856286082
2013-11-27 19:09:54 -08:00
Adrian Sampson
a0056afeaf echonest: clean up analyze workflow
- handle the right exceptions
- add duration to from_track dict
2013-11-27 18:57:29 -08:00
Adrian Sampson
6b54514c65 echonest: simplify fingerprinting strategy
mostly expunging exception-based control flow
2013-11-27 18:35:21 -08:00
Adrian Sampson
d5dd68af24 echonest: sort analysis methods by priority
These are now ordered in the code in the same sequence that we try them:
- profile (ID)
- search (metadata)
- identify (fingerprint)
- analyze (upload)
2013-11-27 18:26:44 -08:00
Adrian Sampson
78688cc3f1 echonest: simplify ID-based lookup ("profile")
- don't use generic Exceptions for control flow
- extraneous .get() calls
2013-11-27 18:18:25 -08:00
Adrian Sampson
1ae2894a01 echonest: simplify method-aggregator loop 2013-11-26 18:20:25 -08:00
Adrian Sampson
4ad9635043 echonest: use pipeline stage
In addition to the performance benefit of running in our own thread, this also
obviates the need for the _songs dict to pass stuff between stages.
2013-11-26 18:11:14 -08:00
Adrian Sampson
d367bc31d4 echonest: don't needlessly write during import
On the import hook, the config['import']['write'] check (and writing at all)
is not necessary, since this will be taken care of later in the program.
2013-11-26 17:58:02 -08:00
Adrian Sampson
8fe254f086 echo nest: top-level code review pass
General Python/beets style changes:
- "x is None" can generally be replaced with "not x"
- prefer iteration over repetitive lines
- config[foo].get(bool) can be replaced with config[foo] in conditions
- removed extraneous "return None", which is what Python functions do
  automatically if you don't return anything
- 79-column wrap
2013-11-26 15:20:18 -08:00
Adrian Sampson
8483b67641 duplicates: only one type of deletion 2013-11-25 23:17:07 -08:00
Adrian Sampson
1966bc9bda duplicates: some config handling simplification 2013-11-25 23:15:55 -08:00
Adrian Sampson
1171f47e98 mpdstats: log with displayable_path, etc. 2013-11-25 22:58:43 -08:00
Adrian Sampson
0167f67a96 simplify MPD configuration 2013-11-25 22:45:42 -08:00
Adrian Sampson
0c32ad1dee mpdstats: style fixes 2013-11-25 22:15:22 -08:00
Adrian Sampson
2c0c8494ba mpdstats: clean up some unused code 2013-11-25 22:05:43 -08:00
Adrian Sampson
38ecb35718 lyrics -f (#455, closes #414): style, changelog 2013-11-25 15:58:53 -08:00
Pedro Silva
9b75db8326 merge Bitdemon-master
- minor style changes
- synchronize with documentation
2013-11-17 12:34:53 +01:00
Bitdemon
f87606869c Update lyrics.py 2013-11-10 23:18:53 +01:00
Bitdemon
de0f0792ef Update lyrics.py 2013-11-10 23:13:35 +01:00
Bitdemon
f5f73be2b5 Update lyrics.py 2013-11-10 22:58:36 +01:00
Bitdemon
86d74f7d39 Update lyrics.py
added -f option to lyrics plugin
first draft
2013-11-10 22:44:37 +01:00
Pedro Silva
e8d6c94995 revert debug print left over from previous commit 2013-11-07 22:15:52 +01:00
Pedro Silva
27da05f9d3 stringify key values prior to hashing 2013-11-07 22:13:42 +01:00
Mathijs de Bruin
2bab3135b3 Fix for #411: iHate fails with singletons. 2013-11-07 13:57:25 +01:00
Adrian Sampson
3ccd231765 id3v23: remove one redundant case; changelog/thanks 2013-11-05 19:59:45 -08:00
Adrian Sampson
580fe7e1de Merge pull request #447 from chriscogburn/patch-2
Fix for id3v23 to include config parameter to save
2013-11-05 19:46:38 -08:00
Chris Cogburn
e9bc47a665 Fix for id3v23 to include config parameter to save 2013-11-05 21:29:49 -06:00
Chris Cogburn
d0c3cb5779 Fix for id3v23 to include config parameter to save 2013-11-05 21:27:26 -06:00
Peter Schnebel
27886ba7bc fixed call to expanduser 2013-11-04 11:13:32 +01:00
Philippe Mongeau
00fa333570 mpdstats: use expanduser() on the music directory path 2013-11-03 22:02:45 -05:00
Philippe Mongeau
058e3adbef mpdstats: fix two log.info calls to use unicode strings 2013-11-03 00:30:32 -04:00
Peter Schnebel
34bf650ccb Merge branch 'master' of https://github.com/sampsyo/beets 2013-11-01 22:03:39 +01:00
Peter Schnebel
8068e6b522 bugfix: honor the auto config option 2013-11-01 13:12:27 +01:00
Peter Schnebel
46df2e5630 removed user stuff 2013-11-01 12:27:56 +01:00
Peter Schnebel
ac0f62eaf1 proposal for one global 'mpd' config section 2013-10-31 21:03:11 +01:00
Peter Schnebel
890e522bc0 removed more last.fm stuff 2013-10-31 20:30:13 +01:00
Peter Schnebel
80c29c4f9c renaming mpc to mpdstats 2013-10-31 20:27:09 +01:00
Peter Schnebel
1e4f33209a clean up unused last.fm stuff 2013-10-31 20:24:44 +01:00
Peter Schnebel
2ddff72752 bugfix: clean up was a mess up 2013-10-31 17:02:34 +01:00
Peter Schnebel
497746051e clean up 2013-10-31 16:40:22 +01:00
Peter Schnebel
e43b67640e clean up 2013-10-31 16:37:28 +01:00
Peter Schnebel
3d964fb2db clean up 2013-10-31 16:31:53 +01:00
Peter Schnebel
62a06ef3b4 add support for prio and prioid if MPD supports it 2013-10-31 15:33:05 +01:00
Peter Schnebel
1d2ba6ef26 use songid to detect playlist changes 2013-10-31 15:22:46 +01:00
Peter Schnebel
be70b74450 use songid to detect currently playing song 2013-10-31 15:04:34 +01:00
Peter Schnebel
e6a22953de detect playlist changes (add / remove) 2013-10-31 14:04:25 +01:00
Peter Schnebel
f5b1b11cd9 bugfix: should survive MPD restart now 2013-10-31 13:30:14 +01:00
Peter Schnebel
6e893389d7 bugfix: update statistics of the correct song 2013-10-31 13:24:03 +01:00
Peter Schnebel
810c4e1e3f New plugin mpc to connect to a MPD server to gather play statistics. 2013-10-31 12:19:05 +01:00
Pedro Silva
7aff16b169 remove WIP pushed by mistake 2013-10-27 22:48:52 +01:00
Pedro Silva
7e3b80cc1d WIP: add classification task 2013-10-27 22:45:55 +01:00
Pedro Silva
8f9e35f081 initial commit 2013-10-27 21:59:33 +01:00
Jakob Schnitzer
887e02c2ae convert: fix decision on which items to transcode 2013-10-27 17:10:55 +00:00
Peter Schnebel
dab7ec219d fixed log message 2013-10-27 12:04:58 +01:00
Peter Schnebel
479f92f250 Merge pull request #424 from pscn/echoplus
New plugin to fetch extended information from the EchoNest (call for feedback)
2013-10-27 03:10:29 -07:00
Peter Schnebel
538aa457e0 removed echonest_ prefix 2013-10-27 08:52:54 +01:00
Adrian Sampson
2481dc244b convert: iterate over the right items (fix #439) 2013-10-26 11:08:52 -07:00
Peter Schnebel
315522aafa fix inverted conditional when fingerprinting (@pedros) 2013-10-26 17:32:30 +02:00
Peter Schnebel
f6613ee31c added similarity finder plugin 2013-10-26 11:33:34 +02:00
Peter Schnebel
428302b45c add echonest_id to debug output 2013-10-26 10:33:29 +02:00
Peter Schnebel
5e0bac8ab5 be a little less picky when judging matches 2013-10-26 10:30:42 +02:00
Peter Schnebel
e4792df50f bugfix: don't use limit here 2013-10-26 10:29:21 +02:00
Peter Schnebel
a755fbcf53 workaround: also double check after profile 2013-10-26 10:28:11 +02:00
Peter Schnebel
c8c3c4ae66 workaround: onetime after analyze, the wrong song was returned. double check that. fall back to track data. 2013-10-26 10:26:55 +02:00
Peter Schnebel
9ac89b350c bugfix: extract duration from track 2013-10-26 09:39:24 +02:00
Peter Schnebel
03f5f71732 show the artist / title as received from EchoNest 2013-10-26 09:09:00 +02:00
Peter Schnebel
1324498f29 bugfix 2013-10-26 09:06:47 +02:00
Peter Schnebel
c4445df8af bugfix 2013-10-26 09:03:20 +02:00
Peter Schnebel
2d1788e595 bugfix 2013-10-26 08:58:39 +02:00
Peter Schnebel
a5be1648f9 new proposal 2013-10-26 08:56:56 +02:00
Peter Schnebel
6f5d4d1328 new proposal 2013-10-26 08:56:18 +02:00
Pedro Silva
1e737d146b Add new copy, move, delete, and tag options 2013-10-23 17:15:16 +02:00
Pedro Silva
7112c30415 Don't set default checksum command-line 2013-10-23 12:57:04 +02:00
Pedro Silva
a4425aa60e Don't spam stderr on -C without --verbose 2013-10-23 12:56:34 +02:00
Pedro Silva
3379c31f4f Add new option 'checksum' for specifying arbitrary checksumming commands 2013-10-23 01:32:05 +02:00
Pedro Silva
587de12ecc Default to match on mb_{track,album}id 2013-10-22 22:53:07 +02:00
Pedro Silva
35e727b86f Add --path sugar 2013-10-22 22:43:32 +02:00
Pedro Silva
aad0449f56 ensure command-line --keys is also respected 2013-10-22 00:05:02 +02:00
Pedro Silva
3d862d63d5 Properly initialize keys config as a list 2013-10-21 23:53:58 +02:00