def __init__(cls, mode_bot): if mode_bot in [3, 4]: cls.create_zips = False else: cls.create_zips = True cls.tg_bot_api = Updater(token=cls.__bot_token) cls.tg_bot_id = cls.tg_bot_api.bot.name cls.deez_api = DeeLogin(arl=cls.__arl_token, email=cls.__email_dee, password=cls.__pwd_dee) cls.spot_api = SpoLogin(cls.__email_spo, cls.__pwd_spo) cls.acrcloud_api = ACRcloud(cls.__acrcloud_config) cls.tg_user_api = Client(user_session, config_file=settings_file) cls.tg_user_api.start()
telegram_audio_api_limit = 50000000 send_image_track_query = "🎧 Track: %s \n👤 Artist: %s \n💽 Album: %s \n📅 Date: %s" send_image_album_query = "💽 Album: %s \n👤 Artist: %s \n📅 Date: %s \n🎧 Tracks amount: %d" send_image_playlist_query = "📅 Creation: %s \n👤 User: %s \n🎧 Tracks amount: %d" insert_query = "INSERT INTO DWSONGS (id, query, quality) values ('%s', '%s', '%s')" where_query = "SELECT query FROM DWSONGS WHERE id = '{}' and quality = '{}'" db_file = "dwsongs.db" loc_dir = "Songs/" config = { "key": acrcloud_key, "secret": acrcloud_hash, "host": acrcloud_host } acrcloud = ACRcloud(config) logging.basicConfig( filename = "dwsongs.log", level = logging.WARNING, format = "%(asctime)s %(levelname)s %(name)s %(message)s" ) if not os.path.isdir(loc_dir): os.makedirs(loc_dir) conn = connect(db_file) c = conn.cursor() try: c.execute("CREATE TABLE DWSONGS (id text, query text, quality text)")