Commit graph

777 commits

Author SHA1 Message Date
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
Pedro Silva
6ae10ed765 add 'keys' option to allow duplicate matching on arbitrary attributes
- towards addressing #427
- TODO: invert key list
- TODO: implement alternative strategies (fp, md5, etc)
2013-10-21 23:32:33 +02:00
Peter Schnebel
00ec247515 bugfix for failed uploads 2013-10-18 00:32:28 +02:00
Peter Schnebel
1c453e852b bugfix for too many upload retires + added comments 2013-10-18 00:22:52 +02:00
Peter Schnebel
332e8a2924 Revert "bugfix for too many upload retires + added comments"
This reverts commit 8700736020.
2013-10-18 00:17:40 +02:00
Peter Schnebel
8700736020 bugfix for too many upload retires + added comments 2013-10-18 00:12:16 +02:00
Peter Schnebel
f3935e8aea disabled tempo 2013-10-17 22:49:27 +02:00
Peter Schnebel
491dff1f09 disabled tempo 2013-10-17 22:48:40 +02:00
Peter Schnebel
bd7a56bf07 renamed mappings 2013-10-17 22:27:37 +02:00
Peter Schnebel
f790b7cb15 renamed mappings 2013-10-17 22:02:20 +02:00
Adrian Sampson
2d2836825f #416: workaround comment, py26-ify 2013-10-17 12:10:17 -07:00
Adrian Sampson
f09bf57f6a Merge pull request #416 from pscn/master
Added min_weight option to lastgenre plugin, to provide for filtering out unpopular genres.
2013-10-17 12:00:35 -07:00
Peter Schnebel
b34a945051 better(?) defaults 2013-10-17 17:12:15 +02:00
Peter Schnebel
b13e9caea7 hint 2013-10-17 16:42:41 +02:00
Peter Schnebel
b08e68a920 Save raw values + added reapply switch + better debug output 2013-10-17 16:41:43 +02:00
Peter Schnebel
b1570beba9 Merged the ``multiple` and `max_genres` option into one `count`` option.
Updated debug output to waste less lines.
2013-10-17 09:52:35 +02:00
Peter Schnebel
b2a23a58e2 fixed indentation 2013-10-17 09:30:26 +02:00
Peter Schnebel
f3b64e87bc sync (plugin is broken) 2013-10-17 09:29:18 +02:00
Adrian Sampson
b037f777da echonest_tempo/#420: py26, line wrap, ... 2013-10-16 21:53:46 -07:00
Adrian Sampson
52312ee877 Merge pull request #420 from pscn/echonest_tempo
Fixed song matching in echonest_tempo plugin
2013-10-16 21:42:23 -07:00
Peter Schnebel
8215e81cea nicer debug output 2013-10-16 17:12:24 +02:00
Peter Schnebel
c5a9a66ad8 bugfixes for candidate detection 2013-10-16 16:46:41 +02:00
Peter Schnebel
78e75317a7 bugfixes for import 2013-10-16 16:31:26 +02:00
Peter Schnebel
f200cb0825 upload for the win 2013-10-16 16:08:00 +02:00
Peter Schnebel
6dd827964b bugfix for opts 2013-10-16 13:48:04 +02:00
Peter Schnebel
66c01adca1 use duration as another hint to find good matches 2013-10-16 12:40:27 +02:00
Peter Schnebel
fd0d8820bb Fixed detection of the correct song in EchoNest. 2013-10-16 12:19:25 +02:00
Peter Schnebel
abf2a17f42 bugfixes 2013-10-16 12:12:41 +02:00
Peter Schnebel
c7a269d1c5 fetch more results to increase the chance of finding the correct result 2013-10-16 11:53:48 +02:00
Peter Schnebel
2c2b7600c3 bugfix 2013-10-16 11:43:08 +02:00
Peter Schnebel
2a9def94b8 Merge branch 'master' into echoplus 2013-10-16 11:42:23 +02:00
Peter Schnebel
0ff15c5c4d The way of the impatient is filled with useless commits :( 2013-10-16 11:35:26 +02:00
Peter Schnebel
fa10515799 Bugfix for Album.get_top_tracks workaround. 2013-10-16 11:31:18 +02:00
Peter Schnebel
7591957327 added experimental guess mood feature (see http://developer.echonest.com/forums/thread/1297) 2013-10-16 11:28:02 +02:00
Peter Schnebel
846f4eb7ae fix possible bug 2013-10-16 10:33:51 +02:00
Peter Schnebel
9b8ad7dcd1 Experimental EchoNest plugin to fetch and map attributes from EchoNests audio_summary. 2013-10-16 10:26:18 +02:00
Peter Schnebel
d339e2f815 Workaround for pylast issue https://code.google.com/p/pylast/issues/detail?id=85 as suggested by @sampsyo 2013-10-16 08:45:13 +02:00
Adrian Sampson
ed44982f75 ftintitle: skip on empty albumartist (#418) 2013-10-15 10:03:15 -07:00
Peter Schnebel
c5896684f3 The following only applies when ``multiple`` is activated:
Return one valid genre even if its weight is lower then ```min_weight```.
Default for ```min_weight``` is now *10*.
Added new config option ```max_genres``` to limit the amount of genres returned.  Default is *3*.
2013-10-15 13:20:45 +02:00
Adrian Sampson
8e2c1bbe68 ftintitle: check artist_sort for null (fix #418) 2013-10-14 21:11:40 -07:00
Peter Schnebel
eafceaa0ed Added min_weight option to lastgenre, to provide for filtering out unpopulare genres. 2013-10-14 12:36:39 +02:00
Adrian Sampson
fac13a041e missing: tolerate disctotal == None
This problem:
http://pastebin.ca/2466454
is likely indicative of a bug elsewhere, but defensive coding seems like a
good idea here.
2013-10-13 18:22:43 -07:00
Adrian Sampson
d6dac1d35b scrub: no need to save after delete()
The delete() method on Mutagen objects writes the file directly. Calling
save() was unnecessary and, in at least one case we found, could inadvertently
preserve non-standard tags that Mutagen did not understand.
2013-10-08 14:49:29 -07:00
Adrian Sampson
54af040bc4 convert: extension is a bytestring (fix #390) 2013-10-06 12:13:14 -07:00
Adrian Sampson
a6798f9ba3 #380: Template.safe_substitute
This way, you almost never need to use the $$ escape sequence.
2013-10-06 12:01:42 -07:00
Adrian Sampson
dfea8ea05e convert: fix outdated reference, col wrap 2013-10-06 11:59:03 -07:00
Adrian Sampson
5e82b670f9 #380: shortcut/compatibility options
These config options make it easier to customize the command (no need to make
a single-element formats dict). And the opt config option provides backwards
compatibility with the previous style.
2013-10-06 11:57:32 -07:00
Adrian Sampson
b7e2ba7795 convert: log transcoding command 2013-10-06 11:28:29 -07:00
Adrian Sampson
d828d7aae4 #380: correctly skip no-op transcodes
The format key is now the (lower-cased) format name string used by beets,
which means we can precisely detect which transcodes would be unnecessary. To
facilitate this, I added an ALIASES dict which allows more convenient names to
work for this (e.g., "wma" is easier to remember than "windows media").
2013-10-06 11:21:56 -07:00
Adrian Sampson
0d303ffde7 multi-format convert (#362): simpler validation
This removes the explicit config validation check and collapses it into the
config read step (which is the intended convenience of Confit's API).
2013-10-06 10:56:42 -07:00
Adrian Sampson
2aebec0928 #397: shorter option name, docs, changlog
I changed the option name from "multiple_genres" to "multiple".
2013-10-06 10:34:32 -07:00
Adrian Sampson
f35d7fec9c multiple genres (#397): simplify implementation
- don't use vestigial global object for config
- list comprehensions ftw
2013-10-06 10:29:47 -07:00
Adrian Sampson
41a6ccbac1 Merge pull request #397 from rashley60/master
Added ability to store comma delimited lists of genres using lastfm
2013-10-06 10:10:40 -07:00
Adrian Sampson
2e2e0b2919 get_album (and evalute_template) with non-DB items
Alternative fix for #403.
2013-10-05 11:06:08 -07:00
Pedro Silva
89c0e2c8b7 Fix issue #403
hack around items needing library and id references since 238e743
2013-10-05 15:55:44 +02:00
Ross Ashley
7a7d009671 Removed pdb stuff and cleeaned up description. 2013-10-03 15:15:18 -04:00
Ross Ashley
8525983791 For the comma delimited lastgenre addition, the old way is default.
There is a new option called multiple_genres which defaults to False
but when set to True, the comma delimited list of genres is returned
by lastgenre.

So, if you want a comma delimited list, it is

lastgenre:
    multiple_genres: True
2013-10-03 11:39:33 -04:00
Adrian Sampson
f42dabd1fa merge 2013-09-29 18:37:06 -07:00
Adrian Sampson
f9cc86be08 fromfilename: use unicode filename
As pointed out in #395, we need to decode the filename before doing our fancy
matches on it.
2013-09-29 18:35:43 -07:00
Ross Ashley
7c0d828a2e Replaced unnecessary code with one line. 2013-09-27 10:08:09 -04:00
colin-scott
b6e7e0b817 Support singleton filenames.
Previously, track ids were assumed to be part of every filename. This
assumption does not hold for singleton tracks.
2013-09-26 12:26:15 -07:00
Ross Ashley
514fa6cf0c Removed some unused and commented out code. 2013-09-26 15:18:58 -04:00
Ross Ashley
4291932298 Added ability to store comma delimited lists of genres using lastfm
and the local genre.txt file in the usual way.

Using this, a song might now have a genre of 'House, IDM, Dance',
instead of just 'House'.
2013-09-26 10:39:32 -04:00
Adrian Sampson
bb21ec692e lastgenre: add album.save() 2013-09-25 08:45:18 -07:00
Johann Klähn
5414dc80d2 allow and expand home directory in mpdupdate socket
This allows you to use a socket in your home directory (e.g.
`~/.mpd/socket`) without having to specify the full path including the
username (which can change from machine to machine).
2013-09-23 21:47:26 +02:00
Adrian Sampson
fcab014510 scrub: opus support 2013-09-21 19:27:04 -07:00
Adrian Sampson
9597d5e370 scrub: restore album art (close #138) 2013-09-21 19:25:31 -07:00
Adrian Sampson
f5252efbe8 ftintitle: restrict by query
Again, for symmetry with other metadata cleanup/extension commands.
2013-09-17 14:31:42 -07:00
Adrian Sampson
2e31a7c6bf ftintitle: store modifications to the database
A run of `beet update` is now no longer required. This is in line with the
behavior of lyrics, lastgenre, echonest_tempo, replaygain, ...
2013-09-17 14:30:00 -07:00
Adrian Sampson
63803a9742 ftintitle: use beets' ui.print_ function
This avoids encoding troubles. This also uses displayable_path to deal with
Unicode pathnames.
2013-09-17 14:26:24 -07:00
Adrian Sampson
a495635f90 ftintitle: remove duplicated field variables
Several fields were kept around in variables even though they were unused.
They can be read from the Item object at any time.
2013-09-17 14:19:28 -07:00
Adrian Sampson
2a93438969 ftintitle: reorganization and refactoring
- expand docstrings
- collapse some small/duplicative helper functions
- simplify control flow
2013-09-17 14:11:17 -07:00
Adrian Sampson
dfc5edec40 ftintitle: docstrings, new top-level function 2013-09-17 12:52:38 -07:00
Adrian Sampson
4bb3a481e2 ftintitle: move helper functions to module scope
These do not need to be closures.
2013-09-17 12:44:27 -07:00
Adrian Sampson
bd598696f0 ftintitle: syntactic/comment style cleanup
- expunge remaining CamelCase identifiers
- start adding PEP8 space around operators
- start wrapping to 79 columns
- access track fields with attribute syntax

--HG--
extra : amend_source : 9c916013230dd3cde187f2a55e89587b009bce6a
2013-09-17 12:38:16 -07:00
Adrian Sampson
8212cca498 add ftInTitle plugin by @Verrus
This is a snapshot of the plugin at its git revision
abb6bb94db79e9260e2062404c986316f1dc925c.
2013-09-17 12:12:22 -07:00
Adrian Sampson
c5032f925e move Destination method to Item class 2013-09-17 09:09:10 -07:00
Adrian Sampson
f82d466b77 eliminate lib argument to Item.evaluate_template 2013-09-17 08:44:26 -07:00
Adrian Sampson
22d5e564c6 move move method to model objects 2013-09-16 22:12:26 -07:00
Adrian Sampson
048880011f echonest_tempo: ensure we have the right track
closes #361
2013-09-16 16:59:11 -07:00
Adrian Sampson
46df8c4f0d info: eager error detection (closes #371) 2013-09-16 16:37:55 -07:00
Adrian Sampson
9607b258a5 fromfilename: simplify 2013-09-13 21:14:10 -07:00
Adrian Sampson
b8f01f0cfa fromfilename: preserve case, apply in more cases 2013-09-13 21:05:51 -07:00
Adrian Sampson
3f6eb4be24 fromfilename: switch to declarative style
No need for redundant handleXfields methods; we'll just inspect the fields
we're given.
2013-09-13 20:48:12 -07:00
Adrian Sampson
9e1e55e6a5 fromfilename: python style, naming, comments 2013-09-13 20:34:05 -07:00
Adrian Sampson
47999dc759 initial import of tags-from-filename plugin (#113)
This was contributed via email. Now I'll clean it up for inclusion.
2013-09-13 19:50:12 -07:00
Adrian Sampson
09d724db3f Merge pull request #380 from rowan-lewis/convert-all
Allow the convert plugin to convert to any format, not just mp3.
2013-09-13 19:32:57 -07:00
Adrian Sampson
b3bc4d3622 mbcollection: skip invalid MBIDs 2013-09-13 19:13:36 -07:00
Adrian Sampson
c57f2d0b78 merge 2013-09-13 18:58:30 -07:00
Rowan Lewis
80d060db07 Added 'quiet' operation mode, prevents start/finish announcements for each file. 2013-09-14 10:18:36 +10:00
Rowan Lewis
52d86f0e6a Added more format presets, updated documentation. 2013-09-14 09:35:25 +10:00
Rowan Lewis
d2327d2dcf Fixed validation, basically replace unfriendly errors with friendly errors. 2013-09-14 07:27:15 +10:00
Rowan Lewis
d3dae9f089 Reject lossy formats under a set bitrate. 2013-09-13 08:13:30 +10:00
Rowan Lewis
53aba3ce3f It's called Vorbis, not OGG. 2013-09-13 07:57:04 +10:00
Rowan Lewis
bfbf5a9215 Changed the configuration to allow for easier format selection. 2013-09-13 07:54:36 +10:00
Adrian Sampson
19958f75ff embedart: fix error message when imagehdr fails 2013-09-12 10:45:02 -07:00
Rowan Lewis
697e70f14b Problem with unicode filenames sorted. 2013-09-12 22:21:50 +10:00
Rowan Lewis
697cf3fd65 Removed reference to my testing plugin, oops. 2013-09-12 20:22:18 +10:00
Rowan Lewis
21c9855c4f Allow the convert plugin to convert to any format, not just mp3. 2013-09-12 20:09:53 +10:00
Adrian Sampson
fa97684e7b fix outdated _record reference in web plugin 2013-09-09 20:56:38 -07:00
Adrian Sampson
4ee4169349 simplify get_query using class attributes 2013-09-09 20:20:22 -07:00
Adrian Sampson
f70ddfbd1d deduplicate albums() and items() methods
This also drops the keyword arguments to these methods, which were vestigial.
2013-09-08 23:18:58 -07:00
Adrian Sampson
d80576fec1 get rid of dictionary comprehensions
for Python 2.6 compatibility
2013-08-29 17:07:04 -07:00
Adrian Sampson
343a85d482 mbsync: use separate structure for old_data
Assigning an attribute on Items doesn't really work here since we try to store
that value to the DB as a flexattr.
2013-08-23 14:01:31 -07:00
Adrian Sampson
5e09c5e473 convert: fix iteration over results 2013-08-22 17:33:56 -07:00
Adrian Sampson
c7fe017752 remove Library.{move,store} methods
These methods are now provided by LibModel, which makes dealing with items and
albums symmetric.
2013-08-21 15:34:45 -07:00
Adrian Sampson
deef7f9d20 a few more necessary album.store()s 2013-08-21 11:23:09 -07:00
Adrian Sampson
6677cea036 fix uses of item.dirty and item.record 2013-08-21 10:57:52 -07:00
Adrian Sampson
ec10f8c223 remove count() calls
I removed this method in an earlier commit.
2013-08-20 14:28:28 -07:00
Adrian Sampson
276ce14dd2 flexattrs work for Albums
A second base class, LibModel, maintains a reference to the Library and should
take care of database-related tasks like load and store. This is the beginning
of the end of the terrible incongruity between Item and Album objects (only
the latter had a library reference). More refactoring to come.

One large side effect: Album objects no longer automatically store
modifications. You have to call album.store(). Several places in the code
assume otherwise; they need cleaning up.

ResultIterator is now polymorphic (it takes a type parameter, which must be a
subclass of LibModel).
2013-08-16 18:36:30 -07:00
Adrian Sampson
38f1e6aec2 new FlexModel base class
I intend to use this for both Item and Album to avoid code duplication and
simplify code that uses both entities.
2013-08-16 17:22:17 -07:00
Adrian Sampson
7d9f556cbe introducing "slow queries"
In preparation for enabling queries over flexattrs, this is a new path that
lets queries avoid generating SQLite expressions altogether. Any query that
can be completely evaluated in SQLite will be, but when it can't, we now fall
back to running the entire query in Python by selecting everything from the
database and running the `match` predicate.

To begin with, this mechanism replaces RegisteredFieldQueries, which
previously used Python callbacks for evaluation. Now they just indicate that
they're slow queries and the query system falls back automatically.

This has the great upside that it lets use implement arbitrarily complex
queries without shoehorning everything into SQLite when that (a) is way too
complicated and (b) doesn't buy us much performance anyway. The obvious
drawback is that any code dealing with queries now has to handle two cases
(slow and fast).

In the future, we could optimize this further by combing fast and slow query
styles. For example, if you want to match with a substring *and* a regular
expression, we can do a first pass in SQLite and apply the regex predicate on
the results. Avoided for now because premature optimization, etc., etc.

Next step: implement flexattr matches as slow queries.
2013-08-16 14:28:46 -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
Simon Chopin
e30f8f8fb9 bpd: Use AnyFieldQuery when searching "any" fields
BPD hadn't been ported when AnySubstringQuery was removed, resulting in
crash, death and horror when using the search function.
2013-07-02 11:00:10 +02:00
Fabrice Laporte
995d75f3f3 Logging: remove match ratio, add source website name 2013-06-29 14:24:41 +02:00
Fabrice Laporte
9780be270c Some tweaking to yield better results by not
rejecting valid lyrics.
2013-06-29 14:23:53 +02:00
Fabrice Laporte
c6f935ac4c Don't consider text between parentheses when
matching url title with song title.
2013-06-29 14:21:55 +02:00