import json import time import argparse import platform import traceback from datetime import datetime import qopy import requests from tqdm import tqdm from mutagen import File import mutagen.id3 as id3 from mutagen.flac import FLAC, Picture from mutagen.id3 import ID3NoHeaderError client = qopy.Client() def print_title(): print(""" _____ ____ __ _____ _ | |___ ___| \| | | __ |___| |_ ___ ___ ___ | | | . |___| | | |__ | -| -_| . | . | _| | |__ _|___| |____/|_____| |__|__|___|___|___|_| |_|_| |__| """) def get_os(): if platform.system() == 'Windows':
os.remove(cov_dir) if fol: break if cli: sys.exit() os_cmds('c') print_title() if __name__ == '__main__': try: os_cmds('t') print_title() cfg, tag_cfg = parse_prefs(None, None) try: if sys.argv[1]: cfg, tag_cfg = parse_prefs(cfg, tag_cfg) cli = True except IndexError: cli = False client = qopy.Client(cfg['email'], cfg['pwd']) print("Signed in successfully - " + client.label + " account.\n") print("App ID: " + client.id) print("App Secret: " + client.sec + "\n") main(False, False, cfg, tag_cfg, None, cli) except (KeyboardInterrupt, SystemExit): sys.exit() except: traceback.print_exc() input('\nAn exception has occurred. Press enter to exit.') sys.exit()
def getSession(): print("Logging...") with open("config.json") as f: config = json.load(f) return qopy.Client(config["email"], config["password"])
def getSession(): print('Logging...') with open('config.json') as f: config = json.load(f) return qopy.Client(config['email'], config['password'])