Commit graph

380 commits

Author SHA1 Message Date
Adrian Sampson
218f10a62d echonest_tempo: catch socket.error 2013-03-09 11:33:55 -08:00
Adrian Sampson
69f2659410 convert: read new audio metadata (#208) 2013-03-06 23:11:08 -08:00
Adrian Sampson
87d71abc28 changelog/cleanup/fixes for #209
The major functional change here is how files move around when in keep_new
mode. Now, files are first moved to the destination directory and then
copied/transcoded back into the library.

This avoids problems where naming conflicts could occur when transcoding from
MP3 to MP3 (and thus not changing the filename).
2013-03-06 18:21:42 -08:00
Lucas Duailibe
a338b95bb7 Changing behavior in "keep new files" 2013-03-06 22:04:05 -03:00
Lucas Duailibe
28522376be Adding "keep new files" option to convert plugin 2013-03-06 21:41:40 -03:00
Adrian Sampson
1a7ec6dc79 mbsync: fix redundant album art movement
Since we explicitly move album art later in the process, implicitly moving it
with items can cause a double-move (and thus a "file not found" error).
2013-03-03 17:46:16 -08:00
Adrian Sampson
18688008a4 mbsync: avoid spurious stores/moves
As _print_and_apply_changes itself does for items, we now shortcut
modifications (metadata and filesystem) for albums when no changes are
required for a given album. This avoids effectively doing a "beet move" on an
album even when nothing has changed.
2013-03-03 17:19:05 -08:00
Adrian Sampson
5f68d03793 mbsync: don't write tags if import.write is off
This will avoid surprising users with import.write turned off.
2013-03-03 17:13:54 -08:00
Adrian Sampson
72263a1cf7 mbsync: use ID lookups instead of full match logic
This change uses _album_for_id and _track_for_id instead of the full
autotag.match.* functions. This should be faster (requiring fewer calls to the
MusicBrainz API) while also being more predictable. It also won't, for
example, use acoustic fingerprinting even if the chroma plugin is installed.

Finally, this change catches the error case in which MBIDs are erroneous. This
can happen, for example, if the user has some track MBIDs left over from
before the NGS transition.
2013-03-03 17:08:07 -08:00
Adrian Sampson
a8d999a101 mbsync: split album/item functions; shorter txns
The main change here is to use shorter transactions -- one per matching entity
-- rather than one large one. This avoids very long transactions when the
network happens to move slowly.
2013-03-03 16:52:14 -08:00
Adrian Sampson
54e070d06b mbsync: use SingletonQuery for item updates 2013-03-03 16:29:31 -08:00
Jakob Schnitzer
d647ea0f0d mbsync: a little refactoring 2013-03-03 23:39:14 +01:00
Jakob Schnitzer
3a9c9d53da mbsync: add support for singletons
I can't really guarantee this works right now since I have no singletons
in my collection to test it
2013-03-03 23:39:13 +01:00
Jakob Schnitzer
cd7305d487 mbsync: write metadata to files... 2013-03-03 23:39:13 +01:00
Jakob Schnitzer
2fd3ad5362 initial version of the mbsync plugin
this plugin provides a faster way to query new metadata from
musicbrainz. (instead of having to 're-import' the files)
Currently it lacks all forms of documentation and will only work for
album queries. not really tested so far so be careful
2013-03-03 23:39:13 +01:00
Jakob Schnitzer
ef22ea5183 convert: add missing util.displayable_path 2013-03-01 16:16:28 +01:00
Adrian Sampson
1fbbe61546 mbcollection: human-readable MB exceptions
Fixes #107 by wrapping the API invocation function with exception handlers.
2013-02-28 10:43:02 -08:00
Adrian Sampson
c31eabe95c convert: add missing syspath call (closes #106) 2013-02-27 10:30:24 -08:00
Adrian Sampson
a1e89b879d echonest_tempo: warn on API error 2013-02-18 18:40:59 -08:00
Adrian Sampson
63564d84e7 echonest_tempo: sanitize newlines from input
The Echo Nest API confusingly says that the input is missing if it contains a
newline.
2013-02-18 18:34:31 -08:00
Dang Mai
3be24110d7 Sanitize template evaluation for smartplaylist 2013-02-11 21:37:14 -05:00
Adrian Sampson
d1e50da71f fetchart: remote_priority config option 2013-02-10 21:40:55 -08:00
Adrian Sampson
f7f2454134 docs & style for #92
We already have a nice plurality() function in beets.util to calculate the most
popular value of something, so I reused that.
2013-02-06 10:55:48 -08:00
Peter Schnebel
7193f4e863 Do not write track-level genres if source is not 'track'. 2013-02-06 08:41:20 +01:00
Peter Schnebel
9f1e9031b6 Try to guess 'Various Artists' genre based on track genres if source is 'track'. 2013-02-06 08:15:29 +01:00
Peter Schnebel
d667fca02e Do not write track-level genres if source is not 'track'.
For 'Various Artist' compilations without a usefull 'album' genre, pick the most used track / track-artist genre.
2013-02-06 08:04:58 +01:00
Adrian Sampson
976bc20900 collapse separate album and item paths (#92)
Should reduce copypasta overhead significantly.
2013-02-05 12:16:53 -08:00
Adrian Sampson
3860a5ac27 lastgenre: "auto" config option 2013-02-05 12:02:51 -08:00
Adrian Sampson
e50e28dc38 canonicalize original genre (#92) 2013-02-05 11:58:24 -08:00
Adrian Sampson
d1e752fdeb simplify configuration handling (#92) 2013-02-05 11:51:32 -08:00
Adrian Sampson
f38bed787e remove verbose option (#92)
The lastgenre command should always log what it's doing so the user can see
the progress being made. If you really don't want any output, just pipe to
/dev/null.
2013-02-05 11:40:04 -08:00
Adrian Sampson
1fe36057b0 Python style and legibility cleanup for #92 2013-02-05 11:34:17 -08:00
Adrian Sampson
cd2d4c9b8a Merge pull request #92 from pscn/master
lastgenre improvements
2013-02-05 10:31:46 -08:00
Adrian Sampson
5be50fbb38 echonest_tempo: skip when missing artist or title 2013-02-05 10:28:24 -08:00
root
f83e9fb8bb qbugfix 2013-02-05 08:13:36 +01:00
Peter Schnebel
30dff5afff cleaned up, removed debug 2013-02-04 21:47:35 +01:00
Peter Schnebel
4df9521007 experimental track / album / artist based genre stuff per item 2013-02-04 20:24:22 +01: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
0be319767f fixes and refactoring for lastgenre.source (#88)
This provides a default for source, preventing a crash when not present in the
user's config.

It also refactors the source decision to a helper function, _lastfm_obj, to
avoid copypasta.
2013-02-02 12:52:43 -08:00
Adrian Sampson
a21e3ca344 Merge pull request #88 from pdf/lastgenre_source_selection
Allow selection of source for genre information (ie - artist vs album)
2013-02-02 12:44:02 -08:00
Adrian Sampson
89689899c9 changelog note and indentation fix for #86 2013-02-02 12:27:42 -08:00
Adrian Sampson
52dc2f6b0b Merge pull request #86 from steinitzu/master
AlbumArtist tag browsing in bpd
2013-02-02 12:25:01 -08:00
Adrian Sampson
887d1c1287 fix inline and rewrite for instance fields
I'm transitioning to using exclusively instance-level fields instead of
class-level fields in plugin objects, but I neglected to bring inline and
rewrite into the future. This manifested as silent inaction on the part of
these plugins.

This change restores the old behavior (for compatibility) but also updates the
plugins to use the new behavior.
2013-02-02 08:35:54 -08:00
Adrian Sampson
f59ff7e89e importfeeds: use bytestring paths 2013-02-02 08:22:51 -08:00
Fabrice Laporte
bc82e04077 importfeeds: fix UnicodeDecodeError when creating symlinks 2013-02-02 10:31:36 +01:00
Peter Fern
ef5dfa3fcf Allow selection of source for genre information (ie - artist vs album)
If config is set to:

   lastgenre:
     source: artist

The genre will be fetched for the artist, rather than the album.  This
allows for filesystem org like:

   genre/artist/album

Currently defaults to previous behaviour for anything other than
`artist`
2013-02-02 14:31:45 +11:00
steini
476adf40af Support for AlbumArtist and AlbumArtistSort tag listings. 2013-02-01 02:35:19 +00:00
Dang Mai
d4004f10fa Update comments to reflect config migration 2013-01-31 18:17:00 -05:00
Dang Mai
ef8ef4c747 Update MPD whenever database changes 2013-01-31 18:16:21 -05:00