Example #1
0
def init_new_album(album_title, album_path, default_source_path, verbose):
    """
    init_new_album: start or restart an album
    
    20130103/RB: started function
    
    INPUT:
    - album_title: title of the page (as seen on the web page)
    - album_path: path to where the album is located on the computer
    - default_source_path: the default path to the folder with the originals
    
    INTERACTION:
    - the album will be saved. If it already exists it will ask for confirmation before it overwrites the old album.
    """
    HBFUN.verbose("== INIT NEW ALBUM ==", True)
    
    # make new album
    album = HBAL.album(album_title = album_title, album_path = album_path, default_source_path = default_source_path, verbose = verbose)
    
    # save it, if it already exists, ask for confirmation
    if HBFUN.check_path_exists(pickle_path):
        if HBFUN.ask_user_confirmation("This will overwrite the old pickle. Destroy it? y/n"):
            HBAL.save_album(album, pickle_path)
    else:
        HBAL.save_album(album, pickle_path)