Commit graph

13 commits

Author SHA1 Message Date
Tai Lee
ee0c00708b Quick fix for a couple other places that were expecting hooks._album_for_id()` to return a single result.
It's possible that these plugins might require a little more thought
into how they should work (or not work) with potentially multiple albums
matching an idea, and potentially those those albums being an incorrect
match (e.g. if two data source plugins share a simple numerical ID
format).
2013-05-31 00:05:24 +10:00
Adrian Sampson
a0cb31956d distinguish Album and Item template fields
An earlier change (due to @pedros) added the ability for plugins to define
template fields that work with Albums as well as Items. This enables some
cool new use cases but required that every template field definition check the
type of its arguments. Instead, this iteration on the idea distinguishes
between fields meant for Items and those meant for Albums.

In addition to simplifying the implementation of these functions, this also
enables the creation of album fields with identical names to item fields.
(For example, a user contacted me recently about adding a $bitrate field for
albums, which would be the average bitrate of the items. They can do this now
using a plugin.)

I also changed the docs to stop using the decorator approach to registering
template fields. We're moving toward removing those.
2013-05-28 22:30:23 -07:00
Adrian Sampson
1ffc56b85a doc correction and refactoring for #275
Plugin-provided template fields are not available for queries. (Perhaps they
should be, though!)
2013-05-17 12:07:53 -07:00
Pedro Silva
a48fde9f2c Use newly defined '$missing' template field instead of hardcoded format (-c) 2013-05-15 15:09:00 +01:00
Adrian Sampson
f086fb6fd7 changelog, little style tweak for #272
Changed single-triple quotes to double-triple quotes, just for consistency
with the rest of the codebase.
2013-05-10 22:23:24 -07:00
Pedro Silva
b2d8f04f05 Modify "not part of beets" to "part of beets" 2013-05-10 16:50:34 +01:00
Pedro Silva
763cfa06b4 Don't check for item.paths == None as that can't happen 2013-05-10 16:43:17 +01:00
Pedro Silva
d32a3ef9b5 Implement logic for displaying missing track counts 2013-05-10 16:42:45 +01:00
Pedro Silva
69877f2013 Add 'count' and 'total' parameters
- count: count missing tracks per album
- total: count total missing tracks
2013-05-10 16:42:10 +01:00
Pedro Silva
bed7c5ae88 Add _missing_count function 2013-05-10 16:41:04 +01:00
Pedro Silva
abe12be4b2 Remove unneeded Library argument from _missing 2013-05-10 16:06:30 +01:00
Pedro Silva
18e2704ffb Remove unnecessary _format function 2013-05-10 14:23:32 +01:00
Pedro Silva
6ae73bc921 Initial import of missing tracks plugin
This plugin adds a new command, ``missing`` or ``miss``, which finds
and lists, for every album in your collection, which tracks are
missing.
2013-05-10 14:13:53 +01:00