# Path: chirp/common/conf.py



import optparse
import os
from chirp.common import conf
"""Remove an album from the dropbox when it has errors.
It will get moved into the Needs-Fixing directory.
You must run this script with sudo for the correct permissions.
"""



def main():
    op = optparse.OptionParser(usage='%prog [options] /path/to/dir/to/remove'
                                     + "\n\n" + __doc__)
    (options, args) = op.parse_args()
    if not len(args) == 1:
        op.error('incorrect args')
    dir = args[0]
    if dir.endswith('/'):
        dir = dir[0:-1]
    if not os.path.exists(dir):
        op.error('directory does not exist: %r; it must be an absolute path'
                 % dir)
    if not os.path.isdir(dir):
        op.error('path %r is not a directory' % dir)
    base = os.path.basename(dir)
    if not os.path.exists(conf.MUSIC_DROPBOX_FIX):
        op.error('the fixit dir %r does not exist; check your settings'

# Path: chirp/common/conf.py



# Path: chirp/library/remove_from_dropbox.py
import optparse
import os
from chirp.common import conf

"""Remove an album from the dropbox when it has errors.
It will get moved into the Needs-Fixing directory.
You must run this script with sudo for the correct permissions.
"""



def main():
    op = optparse.OptionParser(usage='%prog [options] /path/to/dir/to/remove'
                                     + "\n\n" + __doc__)
    (options, args) = op.parse_args()
    if not len(args) == 1:
        op.error('incorrect args')
    dir = args[0]
    if dir.endswith('/'):
        dir = dir[0:-1]
    if not os.path.exists(dir):
        op.error('directory does not exist: %r; it must be an absolute path'
                 % dir)
    if not os.path.isdir(dir):
        op.error('path %r is not a directory' % dir)
    base = os.path.basename(dir)
    if not os.path.exists(conf.MUSIC_DROPBOX_FIX):
        op.error('the fixit dir %r does not exist; check your settings'

                 % conf.MUSIC_DROPBOX_FIX)