Module Expr Str ImportFrom alias alias alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore TupleLoad NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Dict Str Str Str Str Str Str Str Num Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad Assign AttributeStore SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr NameLoad TryExcept body With Call NameLoad Call AttributeLoad NameLoad attr NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad TryExcept body Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Raise Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Raise Call AttributeLoad AttributeLoad NameLoad attr attr Str ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Raise Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad With Call NameLoad Call AttributeLoad NameLoad attr Str NameStore body Expr Call AttributeLoad NameLoad attr Dict Str Str NameLoad NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad If CompareEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return If NameLoad body Assign NameStore NameLoad orelse Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad orelse Return ListLoad ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Return ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr Dict Str Call NameLoad Call AttributeLoad NameLoad attr Num TryExcept body Expr Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad name NameStore body If CompareNotEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr NameLoad Return NameLoad ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Return NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Str attr Num handlers ExceptHandler type NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad keyword NameLoad Return ListLoad Return ListComp Call AttributeLoad NameLoad attr NameLoad comprehension NameStore SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr ListComp AttributeLoad NameLoad attr comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore BoolOpOr Call AttributeLoad Str attr Call AttributeLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num attr Str ListLoad NameLoad Assign NameStore CompareEq Call AttributeLoad SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Index Str attr Str If NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Index Str Assign NameStore Call NameLoad Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore NameLoad Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Index Str If CompareEq NameLoad Str body Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Num Index Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Str Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If UnaryOpNot NameLoad body Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd SubscriptLoad NameLoad Index Str CompareLt NameLoad BinOpSub Call NameLoad NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign NameStore BoolOpOr Call AttributeLoad Call AttributeLoad Str attr NameLoad attr Str Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Dict Assign NameStore Num For NameStore NameLoad body If SubscriptLoad NameLoad Index Str body AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index BinOpAdd NameLoad Num SubscriptLoad NameLoad Index Str Assign NameStore NameLoad Assign TupleStore NameStore NameStore TupleLoad Num Num For NameStore NameLoad body Assign NameStore BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr BoolOpOr CompareNotEq Call NameLoad AttributeLoad NameLoad attr Num CompareNotEq BinOpSub Call NameLoad AttributeLoad NameLoad attr Num BinOpAdd NameLoad Num If BoolOpAnd UnaryOpNot NameLoad CompareNotEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore Num Assign NameStore Num AugAssignAdd NameStore Num Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr TupleLoad NameLoad NameLoad For NameStore NameLoad body If CompareEq AttributeLoad NameLoad attr Num body If CompareIn AttributeLoad NameLoad attr NameLoad body Assign NameStore SubscriptLoad NameLoad Index AttributeLoad NameLoad attr orelse Assign NameStore NameLoad Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr If NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore NameStore NameLoad Return TupleLoad BoolOpOr NameLoad NameLoad BoolOpOr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str handlers ExceptHandler type NameLoad body Return NameLoad Return BinOpAdd BinOpMult AttributeLoad NameLoad attr Num AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A Adds Discogs album search support to the autotagger. Requires the
discogs-client library.
 __future__ division absolute_import print_function N/A beets.ui beets logging beets config beets.autotag.hooks AlbumInfo TrackInfo Distance beets.plugins BeetsPlugin beets.util confit discogs_client Release Client discogs_client.exceptions DiscogsAPIError requests.exceptions ConnectionError N/A beets N/A re N/A time N/A json N/A socket N/A httplib N/A os N/A urllib3_logger N/A N/A logging getLogger requests.packages.urllib3 N/A N/A N/A urllib3_logger setLevel N/A logging CRITICAL N/A USER_AGENT N/A N/A beets/{0} +http://beets.io/ format N/A beets __version__ N/A CONNECTION_ERRORS N/A ConnectionError N/A socket error N/A httplib HTTPException ValueError DiscogsAPIError DiscogsPlugin N/A BeetsPlugin N/A __init__ N/A N/A self N/A N/A N/A N/A N/A N/A super DiscogsPlugin self __init__ N/A N/A N/A N/A self config add N/A apikey apisecret tokenfile source_weight rAzVUQYRaoFjeBjyWuWZ plxtUTqoCzwxZpqdPysCwGuBSmZNdZVy discogs_token.json 0.5 N/A N/A N/A N/A self config N/A apikey redact True N/A N/A N/A N/A self config N/A apisecret redact True N/A N/A self discogs_client None N/A N/A N/A self register_listener import_begin N/A self setup N/A setup N/A N/A self session N/A None N/A N/A Create the `discogs_client` field. Authenticate if necessary.
         N/A c_key N/A N/A N/A N/A self config N/A apikey get unicode N/A c_secret N/A N/A N/A N/A self config N/A apisecret get unicode N/A N/A N/A N/A open N/A N/A self _tokenfile f N/A N/A tokendata N/A N/A json load f N/A N/A N/A IOError N/A N/A N/A token secret N/A N/A self authenticate c_key c_secret N/A N/A token N/A tokendata N/A token N/A secret N/A tokendata N/A secret N/A N/A self discogs_client N/A Client USER_AGENT c_key c_secret token secret N/A reset_auth N/A N/A self N/A N/A N/A Delete toke file & redo the auth steps.
         N/A N/A N/A os remove N/A N/A self _tokenfile N/A N/A N/A self setup N/A _tokenfile N/A N/A self N/A N/A N/A Get the path to the JSON file for storing the OAuth token.
         N/A N/A N/A N/A N/A self config N/A tokenfile get N/A N/A confit Filename in_app_dir True N/A authenticate N/A N/A self c_key c_secret N/A N/A N/A auth_client N/A Client USER_AGENT c_key c_secret N/A N/A N/A N/A _ _ url N/A N/A auth_client get_authorize_url N/A N/A N/A CONNECTION_ERRORS N/A e N/A N/A N/A N/A N/A self _log debug connection error: {0} e N/A N/A N/A N/A beets ui UserError communication with Discogs failed N/A N/A N/A N/A beets ui print_ To authenticate with Discogs, visit: N/A N/A N/A N/A beets ui print_ url N/A code N/A N/A N/A beets ui input_ Enter the code: N/A N/A N/A N/A token secret N/A N/A auth_client get_access_token code N/A N/A N/A DiscogsAPIError N/A N/A N/A N/A N/A beets ui UserError Discogs authorization failed N/A N/A CONNECTION_ERRORS N/A e N/A N/A N/A N/A N/A self _log debug connection error: {0} e N/A N/A N/A N/A beets ui UserError Discogs token request failed N/A N/A N/A N/A self _log debug Discogs token {0}, secret {1} token secret N/A N/A open N/A N/A self _tokenfile w f N/A N/A N/A N/A json dump N/A token secret token secret f N/A N/A token secret N/A album_distance N/A N/A self items album_info mapping N/A N/A N/A Returns the album distance.
         N/A dist N/A Distance N/A N/A N/A album_info data_source Discogs N/A N/A N/A N/A dist add source N/A N/A N/A N/A self config N/A source_weight as_number N/A dist N/A candidates N/A N/A self items artist album va_likely N/A N/A N/A Returns a list of AlbumInfo objects for discogs search results
        matching an album and artist (if not various).
         N/A N/A N/A self discogs_client N/A N/A N/A va_likely N/A N/A query album N/A N/A query N/A %s %s N/A artist album N/A N/A N/A N/A N/A self get_albums query N/A N/A N/A DiscogsAPIError N/A e N/A N/A N/A N/A N/A self _log debug API Error: {0} (query: {1}) e query N/A N/A N/A e status_code 401 N/A N/A N/A N/A self reset_auth N/A N/A N/A self candidates items artist album va_likely N/A N/A N/A N/A N/A CONNECTION_ERRORS N/A N/A N/A N/A N/A self _log debug Connection error in album search exc_info True N/A N/A N/A album_for_id N/A N/A self album_id N/A N/A N/A Fetches an album by its Discogs ID and returns an AlbumInfo object
        or None if the album is not found.
         N/A N/A N/A self discogs_client N/A N/A N/A N/A N/A N/A self _log debug Searching for release {0} album_id N/A match N/A N/A re search (^|\[*r|discogs\.com/.+/release/)(\d+)($|\]) album_id N/A N/A match N/A N/A None N/A result N/A Release N/A self discogs_client N/A id N/A int N/A N/A match group 2 N/A N/A N/A N/A getattr result title N/A N/A N/A DiscogsAPIError N/A e N/A N/A N/A N/A e status_code 404 N/A N/A N/A N/A N/A self _log debug API Error: {0} (query: {1}) e N/A result _uri N/A N/A N/A e status_code 401 N/A N/A N/A N/A self reset_auth N/A N/A N/A self album_for_id album_id N/A None N/A N/A CONNECTION_ERRORS N/A N/A N/A N/A N/A self _log debug Connection error in album lookup exc_info True N/A None N/A N/A N/A self get_album_info result N/A get_albums N/A N/A self query N/A N/A N/A Returns a list of AlbumInfo objects for a discogs search query.
         N/A query N/A N/A N/A N/A re sub (?u)\W+ query encode ascii replace N/A query N/A N/A re sub (?i)\b(CD|disc)\s*\d+ query N/A N/A N/A releases N/A N/A N/A N/A N/A self discogs_client search query type release page 1 N/A N/A N/A CONNECTION_ERRORS N/A N/A N/A N/A N/A self _log debug Communication error while searching for {0!r} query exc_info True N/A N/A N/A N/A N/A N/A self get_album_info release N/A release N/A releases N/A 5 N/A get_album_info N/A N/A self result N/A N/A N/A Returns an AlbumInfo object for a discogs Release object.
         N/A N/A artist artist_id N/A N/A self get_artist N/A N/A a data N/A a N/A result artists N/A album N/A N/A re sub  + N/A result title N/A album_id N/A N/A result data N/A id N/A tracks N/A N/A self get_tracks N/A N/A result data N/A tracklist N/A albumtype N/A N/A N/A ,  join N/A N/A N/A N/A N/A result data N/A formats N/A 0 get descriptions N/A None N/A va N/A N/A N/A N/A N/A N/A N/A result data N/A artists N/A 0 N/A name lower various N/A va N/A N/A artist N/A N/A N/A config N/A va_name get unicode N/A year N/A N/A result data N/A year N/A label N/A N/A N/A N/A result data N/A labels N/A 0 N/A name N/A mediums N/A len N/A set N/A N/A t medium N/A t tracks N/A catalogno N/A N/A N/A N/A result data N/A labels N/A 0 N/A catno N/A N/A catalogno none N/A N/A catalogno None N/A country N/A N/A N/A result data get country N/A media N/A N/A N/A N/A result data N/A formats N/A 0 N/A name N/A data_url N/A N/A result data N/A uri N/A N/A AlbumInfo album album_id artist artist_id tracks asin None albumtype albumtype va va year year month None day None label label mediums mediums artist_sort None releasegroup_id None catalognum catalogno script None language None country country albumstatus None media media albumdisambig None artist_credit None original_year None original_month None original_day None data_source Discogs data_url data_url N/A get_artist N/A N/A self artists N/A N/A N/A Returns an artist string (all artists) and an artist_id (the main
        artist) for a list of discogs album or track artists.
         N/A artist_id None N/A bits N/A N/A N/A i artist N/A enumerate artists N/A N/A N/A artist_id N/A N/A artist_id N/A artist N/A id N/A name N/A artist N/A name N/A name N/A N/A re sub  \(\d+\)$ name N/A name N/A N/A re sub (?i)^(.*?), (a|an|the)$ \2 \1 name N/A N/A N/A bits append name N/A N/A N/A artist N/A join N/A i N/A N/A len artists 1 N/A N/A N/A N/A bits append N/A artist N/A join N/A artist N/A N/A N/A N/A N/A join bits replace  , , None N/A N/A artist artist_id N/A get_tracks N/A N/A self tracklist N/A N/A N/A Returns a list of TrackInfo objects for a discogs tracklist.
         N/A tracks N/A N/A index_tracks N/A N/A index 0 N/A track tracklist N/A N/A N/A track N/A position N/A N/A index 1 N/A N/A N/A tracks append N/A N/A self get_track_info track index N/A N/A N/A index_tracks N/A N/A index 1 N/A track N/A title N/A medium None N/A N/A medium_count index_count N/A 0 0 N/A track tracks N/A N/A medium_is_index N/A N/A track medium N/A N/A track medium_index N/A N/A N/A len N/A track medium 1 N/A N/A N/A ord N/A track medium 64 N/A medium_count 1 N/A N/A N/A medium_is_index N/A medium N/A track medium N/A N/A medium N/A track medium N/A medium_count 1 N/A index_count 0 N/A index_count 1 N/A N/A N/A track medium N/A track medium_index N/A medium_count index_count N/A track tracks N/A N/A N/A N/A track medium_index 1 N/A N/A N/A N/A track index index_tracks N/A N/A disctitle N/A index_tracks N/A N/A track index N/A N/A disctitle None N/A N/A track disctitle disctitle N/A tracks N/A get_track_info N/A N/A self track index N/A N/A N/A Returns a TrackInfo object for a discogs track.
         N/A title N/A track N/A title N/A track_id None N/A N/A medium medium_index N/A N/A self get_track_index N/A track N/A position N/A N/A artist artist_id N/A N/A self get_artist N/A N/A track get artists N/A N/A length N/A N/A self get_track_length N/A track N/A duration N/A N/A TrackInfo title track_id artist artist_id length index medium medium_index artist_sort None disctitle None artist_credit None N/A get_track_index N/A N/A self position N/A N/A N/A Returns the medium and medium index for a discogs track position.
         N/A match N/A N/A re match ^(.*?)(\d*)$ N/A N/A position upper N/A match N/A N/A N/A medium index N/A N/A match groups N/A N/A N/A N/A N/A self _log debug Invalid position: {0} position N/A medium index None N/A N/A N/A medium None N/A index None N/A get_track_length N/A N/A self duration N/A N/A N/A Returns the track length in seconds for a discogs duration.
         N/A N/A N/A length N/A N/A time strptime duration %M:%S N/A N/A N/A ValueError N/A N/A None N/A N/A N/A N/A length tm_min 60 N/A length tm_sec N/A N/A