# Path: chirp/common/conf.py

# 
# Path: chirp/library/album.py
# class AlbumError(Exception):
# class Album(object):
# def _compute_album_id(all_au_files):
# def _standardize_tags(all_au_files, new_album_name=None):
#     def __init__(self, all_au_files):
#     def _sort(self):
#     def standardize(self, new_album_name=None):
#     def set_volume_and_import_timestamp(self, vol, imp_ts):
#     def drop_payloads(self):
#     def ensure_payloads(self):
#     def title(self):
#     def tags(self):
#     def _get_tpe1_breakdown(self):
#     def is_compilation(self):
#     def artist_name(self):
#     def all_artist_names():
#     def import_timestamp(self):
#     def __str__(self):
# def from_directory(dirpath, fast=False):
# 
# Path: chirp/library/audio_file.py
# class AudioFile(object):
#     def __eq__(self, other):
#         def _mutagen_id3_set(obj):
#     def has_ufid(self):
#     def ufid(self):
#     def ufid_tag(self):
#     def tpe1(self):
#     def talb(self):
#     def tit2(self):
#     def canonical_directory(self, prefix=""):
#     def canonical_filename(self):
#     def canonical_path(self, prefix=""):
# def _get_mp3(path):
# def _tag_to_int(au_file, tag_key):
# def scan_fast(path, _read_id3_hook=None):
# def scan(path, _read_id3_hook=None):


import logging
import os
from chirp.common import conf
from chirp.library import album
from chirp.library import audio_file

    def scan_fast(self):
        """Quickly scan all MP3 files in the dropbox.

        Returns:
          A dict mapping relative file paths to either audio_file.AudioFile
          objects, or to None in the case of a corrupted or unreadable file.
        """
        # Note the use of ad-hoc relativization in the path.
        return dict(
            (mp3_path[len(self._path):], audio_file.scan_fast(mp3_path))
            for mp3_path in self._all_files)

    def albums(self):
        """Return unstandardized versions of all albums in the dropbox."""
        if self._all_albums is None:
            self._all_albums = []
            for path in sorted(self._dirs):
                for au in album.from_directory(path):
                    self._all_albums.append(au)
                    yield au
        else:
            for au in self._all_albums:
                yield au

    def tracks(self):
        """Do a fast scan and return all tracks in the dropbox."""
        if self._all_tracks is None:
            self._all_tracks = []
            for path in self._dirs:

# Path: chirp/common/conf.py

# 
# Path: chirp/library/album.py
# class AlbumError(Exception):
# class Album(object):
# def _compute_album_id(all_au_files):
# def _standardize_tags(all_au_files, new_album_name=None):
#     def __init__(self, all_au_files):
#     def _sort(self):
#     def standardize(self, new_album_name=None):
#     def set_volume_and_import_timestamp(self, vol, imp_ts):
#     def drop_payloads(self):
#     def ensure_payloads(self):
#     def title(self):
#     def tags(self):
#     def _get_tpe1_breakdown(self):
#     def is_compilation(self):
#     def artist_name(self):
#     def all_artist_names():
#     def import_timestamp(self):
#     def __str__(self):
# def from_directory(dirpath, fast=False):
# 
# Path: chirp/library/audio_file.py
# class AudioFile(object):
#     def __eq__(self, other):
#         def _mutagen_id3_set(obj):
#     def has_ufid(self):
#     def ufid(self):
#     def ufid_tag(self):
#     def tpe1(self):
#     def talb(self):
#     def tit2(self):
#     def canonical_directory(self, prefix=""):
#     def canonical_filename(self):
#     def canonical_path(self, prefix=""):
# def _get_mp3(path):
# def _tag_to_int(au_file, tag_key):
# def scan_fast(path, _read_id3_hook=None):
# def scan(path, _read_id3_hook=None):


# Path: chirp/library/dropbox.py
import logging
import os
from chirp.common import conf
from chirp.library import album
from chirp.library import audio_file


    def scan_fast(self):
        """Quickly scan all MP3 files in the dropbox.

        Returns:
          A dict mapping relative file paths to either audio_file.AudioFile
          objects, or to None in the case of a corrupted or unreadable file.
        """
        # Note the use of ad-hoc relativization in the path.
        return dict(
            (mp3_path[len(self._path):], audio_file.scan_fast(mp3_path))
            for mp3_path in self._all_files)

    def albums(self):
        """Return unstandardized versions of all albums in the dropbox."""
        if self._all_albums is None:
            self._all_albums = []
            for path in sorted(self._dirs):
                for au in album.from_directory(path):
                    self._all_albums.append(au)
                    yield au
        else:
            for au in self._all_albums:
                yield au

    def tracks(self):
        """Do a fast scan and return all tracks in the dropbox."""
        if self._all_tracks is None:
            self._all_tracks = []
            for path in self._dirs:

                for alb in album.from_directory(path, fast=True):