Commit graph

44 commits

Author SHA1 Message Date
Jack Wilsdon
12cd5306b7 Update copyright dates to 2016 2015-12-30 15:42:06 +00:00
Diego Moreda
3cdcaa45a8 info: modify emitter output, clearer path handling
* Make emitters produce a pair (dict, Item), in order to preserve the output
at print_data (dict is used if no custom format is specified, Item otherwise).
* Simplify the handling of the paths, printed at the top of print_data. The
path key is removed from the dict entirely and fetched from the Item.
2015-11-26 15:55:00 +01:00
Diego Moreda
ca63311101 info: revert human_length changes 2
* Remove human_length parameter from print_data()
2015-11-25 17:36:51 +01:00
Diego Moreda
83279ebe5b info: revert human_length changes
* Remove human length changes from the plugin and the tests, as they will
eventually be handled at a higher level.
2015-11-25 16:06:19 +01:00
Diego Moreda
8d9db9ffe6 info: minor cleanups
* Rename filter() function to avoid warning of reserved built-in symbol.
* Remove mediafile fixture on two tests.
2015-11-24 16:41:56 +01:00
Diego Moreda
1ef407672a info: add item format and length format arguments
* Add custom output formatting via a format string to InfoPlugin. The command
accepts a formatting string via the "-f" parameter, which is handled by its
CommonOptionsParser and applied during print_data().
* Modify the emitters in order to include an Item into the list of fields, that
is formatted according to the format string if specified.
* Add an argument to allow the user to choose if track lengths are displayed as
raw floats or using a human-readable form (mm:ss), defaulting to human-readable
form.
2015-11-24 16:31:01 +01: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
Tom Jaspers
96a565a614 info: error msg instead of traceback on IOError
IOErrors were previously not caught, displaying full traceback to the user
2015-03-13 17:55:09 +01:00
Thomas Scholtes
482008bf1d Info plugin can filter properties in output
Resolves #1287
2015-02-01 21:51:26 +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
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
Adrian Sampson
f871ef9e21 Verbosity affects plugins (#1208)
This restores the -v flag affecting plugins. By default, plugin loggers use
the NOTSET level, which just reuses the base `beets` logger level. The level
is only auto-adjusted for the importer when not in verbose mode.
2015-01-11 15:00:20 -08: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
8cac47af2a Convert beets plugins to lazy logging 2015-01-04 17:02:27 +01:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
816e4fb152 clean up after rebase 2014-09-09 11:53:44 +10:00
Thomas Scholtes
17549b873e info: Show data for each item, not only first one 2014-09-05 16:09:57 +02:00
Adrian Sampson
b869dbed0e info: Add syspath calls
Sorry for interposing, @geigerzaehler. 😃
2014-08-26 10:28:32 -07:00
Thomas Scholtes
71060f1453 info refcator 2014-08-26 18:58:42 +02:00
Adrian Sampson
2518f654bf info: Two minor fixes
* Decode query arguments before constructing query.
* Don't print "None" for the path in summary mode.
2014-08-26 09:16:27 -07:00
Thomas Scholtes
3554c0925c Fix doc and flake8 build (again) 2014-08-26 12:44:23 +02:00
Thomas Scholtes
fe0a2482f3 info: add --summarize option
Closes #409.
2014-08-26 12:32:26 +02:00
Thomas Scholtes
5e4600afd8 info: add tests and omit None values 2014-08-26 12:01:53 +02:00
Thomas Scholtes
9774692dc8 PEP8 fixes 2014-08-26 11:55:36 +02:00
Thomas Scholtes
9d0156e0da info: Check if normalized path is file 2014-08-26 11:54:12 +02:00
Thomas Scholtes
b278db42be info: print library fields and sort output 2014-08-25 23:47:16 +02:00
Thomas Scholtes
a9f839bbf8 info: Specify files through library query 2014-08-25 23:01:02 +02:00
Alessandro Ghedini
331674159b Print all readable fields in info plugin
This includes all audio properties (format, bit rate, channels, ...) too.
2014-05-22 16:43:59 +02:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Adrian Sampson
6b0c03db9d info: don't print out album art blobs 2014-04-10 11:50:59 -07:00
Adrian Sampson
b79a1199ad remove stray ITEM_FIELDS reference (#650) 2014-04-10 11:31:51 -07:00
Adrian Sampson
46df8c4f0d info: eager error detection (closes #371) 2013-09-16 16:37:55 -07: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
3ef9e006f4 finish confit-ifying all the plugins 2012-12-13 17:14:19 -08:00
Adrian Sampson
b68e87b92c The Great Trailing Whitespace Purge of 2012
What can I say? I used to use TextMate!
2012-05-13 20:22:17 -07:00
Adrian Sampson
fb3956723c fix format string in info plugin 2012-05-12 15:21:45 -07:00
Adrian Sampson
8b25a86ee3 use 2.6-compatible format strings 2012-05-08 11:46:08 -07:00
Adrian Sampson
61a037af6f add "album art" to info plugin 2011-05-01 13:33:40 -07:00
Adrian Sampson
e669868896 move a bunch of functions to util 2011-04-10 21:48:05 -07:00
Adrian Sampson
effc338957 "info" command for dumping file metadata 2011-04-02 19:59:22 -07:00