Commit graph

57 commits

Author SHA1 Message Date
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Peter Kessen
3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Adrian Sampson
7d52fa72ae Fix #1699: Outdated API call
get_fields() was removed in 5420599839.
2015-11-04 20:25:17 -08:00
Adrian Sampson
f6ecbf659f Silly oversight in fix for #1551 2015-07-28 22:39:53 -07:00
Adrian Sampson
ebf98d7bf0 duplicates: Avoid Unicode-to-bytes comparison
Fix #1551.
2015-07-28 22:36:27 -07:00
Adrian Sampson
5420599839 New all_keys() method on dbcore.Model
Rather than the ad-hoc one on library classes. This also avoids some confusing
duplication in the `beet fields` output, at the cost of turning off the plugin
distinction.
2015-07-28 22:27:43 -07:00
Pedro Silva
3be593693d add merging functionality to duplicates plugin
This patch depends on %aunique not being present in config.paths
for behavior as intended.

The logic surrounding moving/copying a track from a duplicated album to
the original one could probably be extracted out and put into
library.Album.

This is based on the ordering imposed by the tiebreaking facility
introduced in 6be98b0a36. Once a natural
duplicate ordering is in place, then the strategies for merging are:

Items:

Iterate through each available field:
    Iterate through each duplicate:
        If current duplicate has a field not set in the original, set it there
        Break

Albums:

Iterate through each duplicate:
    Iterate through each item in duplicate:
        If current item is not present in original, copy it there
        Continue
2015-05-25 18:12:06 +02:00
Pedro Silva
0377510522 handle albums during default attribute set completeness sorting 2015-05-17 23:56:10 +02:00
Pedro Silva
684f4deadc fix typo during tagging: option -t now actually works 2015-05-17 15:01:48 +02:00
Pedro Silva
6be98b0a36 add tiebreaking facility 2015-05-16 19:25:47 +02:00
Pedro Silva
834418de6d fix #1457: enforce correct config typing 2015-05-15 11:48:27 +02:00
Pedro Silva
82ce6f054d make helper functions methods in plugin
This helps use the _log attribute that is now available
2015-03-28 10:08:07 +01:00
Pedro Silva
9999460cb4 hash attribute values as tuples instead of stringifying on SOH char 2015-03-27 11:48:51 +01:00
Pedro Silva
fb0e03dd6b remove redundant plugin name from logging 2015-03-27 11:47:40 +01:00
Pedro Silva
66e06baca7 fix #1000: provide --strict option (don't match on null attributes) 2015-03-27 11:34:45 +01:00
Bruno Cauet
650305c9a1 All suitable plugins use CommonOptionsParser features 2015-03-05 17:03:02 +01:00
Tom Jaspers
50dbd18493 Duplicates: fix error caused by formatting
Function arguement `format` was shadowing the built-in format function

Fix #1300
2015-02-03 13:31:54 +01:00
Adrian Sampson
b8dab9cf9f Merge pull request #1247 from brunal/future
Use all __future__ imports in beets core

Conflicts:
	beetsplug/web/__init__.py
	test/test_embedart.py
2015-01-26 17:02:07 -08:00
Bruno Cauet
4e904c78af Simplify LibModel format management
Delete `ui.format_` and then `ui.print_obj`. Simply ensure that when
there is no format it defaults to '' = default format = config option.
2015-01-26 23:09:56 +01:00
Bruno Cauet
62cd6e37aa Update ui.print_obj_(), add ui.format_()
Code now relies on `format()` for items and albums displaying/logging.
`ui.print_()` calls `unicode()` or `str()` on the strings so for most
usages calling `ui.print_(obj)` replaces `ui.print_(obj, lib, None)`.

Where there is a special format `ui.print_(format(obj, fmt))` is fine,
but when `fmt` can be None then one has to call
`ui.print_(ui.format_(obj, fmt))` -- which is what `ui.print_obj` now
does.
2015-01-25 21:07:03 +01:00
Bruno Cauet
a5026100a3 All plugins use unicode_literals
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +01:00
Bruno Cauet
90b388b775 Use __future__ imports but unicode_literals everywhere
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.

Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
b27c5304d1 Merge branch 'master' into logging
Conflicts:
	beetsplug/fetchart.py
	beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Frederik “Freso” S. Olesen
4b1f0cbf48 Happy 2015. ;)
See 7a410f636b

Command used:

    git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet
32673b87e7 Update multiple plugins: pass the logger around 2015-01-06 21:42:09 +01:00
Bruno Cauet
b8211a3c4c Every plugin uses its own logger
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet
30f158a95e Move "from beets import logging" statements
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
7df8bef8b7 Update logging imports: logging → beets.logging 2015-01-04 17:02:27 +01:00
Bruno Cauet
6bdb02c721 Fix logging formatting string in duplicates plugin
{)} → {0}
2015-01-04 17:02:27 +01:00
Bruno Cauet
8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +01:00
Adrian Sampson
0749d4716c duplicates: Fix #999 (check "checksum" type) 2014-10-11 12:28:41 -07:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Pedro Silva
e8f6781fa0 fix #568: ignore items with all keys null 2014-03-14 12:04:43 +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
ecff56fc44 Fix #522: treat copy/move args as dirs and process items accordingly 2014-02-02 20:45:57 +01: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
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
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