def mv_file():
    extract_path = etc['extract_path']
    root_path = update.etc['root_path']
    conf = update.etc['conf']
    
    # moving files
    youtube_dl_path = os.path.join(root_path, conf['local']['youtube_dl_path'])
    # got extracted youtube-dl path
    extracted_path = base.find_first_dir(extract_path)
    
    # use command move function
    update.mv_file(extracted_path, youtube_dl_path)
def mv_file():
    extract_path = etc['extract_path']
    root_path = update.etc['root_path']
    conf = update.etc['conf']

    # moving files
    youtube_dl_path = os.path.join(root_path, conf['local']['youtube_dl_path'])
    # got extracted youtube-dl path
    extracted_path = base.find_first_dir(extract_path)

    # use command move function
    update.mv_file(extracted_path, youtube_dl_path)
Exemple #3
0
def pack_zip(zip_file):
    root_path = update.etc['root_path']
    conf = update.etc['conf']
    tmp_path = etc['tmp_path']
    
    # find plugin files, and get sub path
    extract_path = etc['extract_path']
    extracted_path = base.find_first_dir(extract_path)
    sub_path0 = conf['local']['youtube_dl_path']
    sub_path = os.path.join(root_path, sub_path0)
    
    print('\nupdate: INFO: start pack plugin zip file \"' + base.rel_path(zip_file) + '\" ')
    
    # add lieying_plugin files
    add_files_to_zip(zip_file, extracted_path)
    # add sub files
    add_files_to_zip(zip_file, sub_path, path_before=sub_path0, mode='a')
    
    # done
    print('update: [ OK ] create plugin zip file done. ')