def logIn(username="", password=""):
    cf = TidalConfig()
    if username == "" or password == "":
        print("----------------LogIn------------------")
        username = myinput("username:"******"password:"******"" and account2.errmsg != "":
            printErr(0, account.errmsg)
            return False
        elif account.errmsg != "":
            account = account2
        elif account2.errmsg != "":
            account2 = account
        cf.set_account(username, password, account.session_id,
                       account.country_code, account.user_id,
                       account2.session_id)

    Curtime = time.time()
    cf.set_lastlogintime(str(Curtime))
    return True
def logIn(username="", password=""):
    if username == "" or password == "":
        print("----------------LogIn------------------")
        username = myinput("username:"******"password:"******"":
    #     printErr(0, account.errmsg)
    #     return False
    # if account2.errmsg != "":
    #     printErr(0, account2.errmsg)
    #     return False
    if account.errmsg != "" and account2.errmsg != "":
        printErr(0, account.errmsg)
        return False
    elif account.errmsg != "":
        account = account2
    elif account2.errmsg != "":
        account2 = account

    cf = TidalConfig()
    cf.set_account(username, password, account.session_id,
                   account.country_code, account.user_id, account2.session_id)
    return True
Beispiel #3
0
def main(argv=None):
    print(LOG)
    cf = TidalConfig()
    if logIn(cf.username, cf.password) == False:
        while logIn("", "") == False:
            pass
    
    cf = TidalConfig()
    onlineVer = pipHelper.getLastVersion('tidal-dl')
    print("====================Tidal-dl========================")
    # print("Username     :\t" + cf.username)
    print("OutputDir    :\t" + cf.outputdir)
    # print("SessionID    :\t" + cf.sessionid)
    # print("CountryCode  :\t" + cf.countrycode)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    print("OnlyM4a      :\t" + cf.onlym4a)
    print("ShowProgress :\t" + cf.showprogress + "(enable when threadnum=1)")
    print("AddHyphen    :\t" + cf.addhyphen + "(between number and title)")
    print("AddYear      :\t" + cf.addyear + "(before album title)")
    print("Version      :\t" + TIDAL_DL_VERSION)
    if onlineVer != None:
        print("LastVer      :\t" + onlineVer)
    print("====================================================")
    
    dl = Download(cf.threadnum)
    if not dl.ffmpeg.enable:
        printWarring(0, "Couldn't find ffmpeg!\n")
    while True:
        printMenu()
        strchoice,choice = printChoice2("Enter Choice:", 99)
        if choice == 0:
            return
        elif choice == 1:
            logIn()
            cf = TidalConfig()
            dl = Download(cf.threadnum)
        elif choice == 2:
            setting()
            cf = TidalConfig()
            dl = Download(cf.threadnum)
        elif choice == 3:
            dl.downloadAlbum()
        elif choice == 4:
            dl.downloadTrack()
        elif choice == 5:
            dl.downloadPlaylist()
        elif choice == 6:
            dl.downloadVideo()
        elif choice == 7:
            dl.downloadFavorite()
        elif choice == 8:
            dl.downloadArtistAlbum()
        elif choice == 9:
            showConfig()
        else:
            dl.downloadUrl(strchoice)
            dl.downloadByFile(strchoice)
def main(argv=None):
    print(tidal.LOG)

    cf = TidalConfig()
    while logIn(cf.username, cf.password) == False:
        pass

    if cf.username == "" or cf.password == "":
        cf = TidalConfig()

    onlineVer = pipHelper.getLastVersion('tidal-dl')
    print("====================Tidal-dl========================")
    print("Username     :\t" + cf.username)
    print("OutputDir    :\t" + cf.outputdir)
    print("SessionID    :\t" + cf.sessionid)
    print("CountryCode  :\t" + cf.countrycode)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    print("OnlyM4a      :\t" + cf.onlym4a)
    print("Version      :\t" + TIDAL_DL_VERSION)
    if onlineVer != None:
        print("LastVer      :\t" + onlineVer)
    print("====================================================")

    dl = Download()
    if not dl.ffmpeg.enable:
        printWarring(0, "Couldn't find ffmpeg!\n")
    while True:
        printMenu()
        strchoice, choice = printChoice2("Enter Choice:", 99)
        if choice == 0:
            return
        elif choice == 1:
            logIn()
            dl = Download(cf.threadnum)
        elif choice == 2:
            setting()
            dl = Download(cf.threadnum)
        elif choice == 3:
            dl.downloadAlbum()
        elif choice == 4:
            dl.downloadTrack()
        elif choice == 5:
            dl.downloadPlaylist()
        elif choice == 6:
            dl.downloadVideo()
        elif choice == 7:
            dl.downloadFavorite()
        elif choice == 8:
            dl.downloadArtistAlbum()
        else:
            dl.downloadUrl(strchoice)
def logIn(username = "", password = ""):
    if username == "" or password == "":
        print("----------------LogIn------------------")
        username = myinput("username:"******"password:"******"":
        printErr(0, account.errmsg)
        return False

    cf = TidalConfig()
    cf.set_account(username, password, account.session_id, account.country_code, account.user_id)
    return True
def setAccessToken():
    print("------------setAccessToken------------------")
    account = TidalMobileSession()
    cf = TidalConfig()
    while True:
        account.access_token = myinput("AccessToken(Enter '0' cancel):")
        if account.access_token == '0':
            break
        if account.valid() is True:
            account.getCountryCode()
            cf.set_account2(cf.username, cf.password, account.access_token,
                            account.country_code, account.user_id)
            break
        else:
            printErr(0, "AccessToken is not valid!")
def showConfig():
    cf = TidalConfig()
    print("----------------Config------------------")
    print("Username                         : "******"Output directory                 : " + cf.outputdir)
    print("SessionID                        : " + cf.sessionid)
    print("Country Code                     : " + cf.countrycode)
    print("Sound Quality                    : " + cf.quality)
    print("Video Resolution                 : " + cf.resolution)
    print("Download Threads                 : " + cf.threadnum)
    print("Only M4a                         : " + cf.onlym4a)
    print("Show download progress           : " + cf.showprogress +
          "(enable when threadnum=1)")
    print("Use hyphens                      : " + cf.addhyphen +
          "(between number and title)")
    print("Add year                         : " + cf.addyear +
          "(in album title)")
    print("Add explicit tag                 : " + cf.addexplicit)
    print("Playlist songs in artist folders : " + cf.plfile2arfolder +
          "(organized with artist folder)")
    print("Include singles                  : " + cf.includesingle +
          "(download artist album)")
    print("Save covers                      : " + cf.savephoto)
    print("ArtistName Before Track-Title    : " + cf.artistbeforetitle)
    print("Add ID Before AlbumFolderName    : " + cf.addAlbumidbeforefolder)
    print("Version                          : " + TIDAL_DL_VERSION)
    myinput("Enter to return.")
    def __init__(self, threadNum=3):
        self.config = TidalConfig()
        self.tool = TidalTool()
        self.thread = ThreadTool(int(threadNum))
        self.ffmpeg = FFmpegTool(mergerTimeout=45)
        self.progress = ProgressTool(100)
        self.check = CheckTool()

        self.showpro = False
        if self.config.showprogress == 'True':
            self.showpro = True
def debug():
    cf = TidalConfig()
    while logIn(cf.username, cf.password) == False:
        pass
    # add tag Credits,Info song and full tag (discnumber,irsc,composer,arrenger,publisher,replayGain,releasedate)
    # https://api.tidal.com/v1/albums/71121869/tracks?token=wdgaB1CilGA-S_s2&countryCode=TH
    print('\nThis is the debug version!!\n')
    # os.system("pip install aigpy --upgrade")
    # trackid = 70973230
    dl = Download(1)
    dl.downloadTrack("70973230")
def byCommand():
    try:
        if len(sys.argv) != 2:
            return False
        logInByTime()
        cf = TidalConfig()
        dl = Download(cf.threadnum)
        dl.downloadUrl(sys.argv[1])
        return True
    except Exception as e:
        return False
    return False
Beispiel #11
0
    def __init__(self, threadNum=3):
        self.config = TidalConfig()
        self.tool = TidalTool()
        self.thread = ThreadTool(int(threadNum))
        self.ffmpeg = FFmpegTool(mergerTimeout=45)
        self.progress = ProgressTool(100)
        self.check = CheckTool()

        pathHelper.mkdirs(self.config.outputdir + "/Album/")
        pathHelper.mkdirs(self.config.outputdir + "/Playlist/")
        pathHelper.mkdirs(self.config.outputdir + "/Video/")
        pathHelper.mkdirs(self.config.outputdir + "/Favorite/")
def showConfig():
    cf = TidalConfig()
    print("----------------Config------------------")
    print("Username     :\t" + cf.username)
    print("OutputDir    :\t" + cf.outputdir)
    print("SessionID    :\t" + cf.sessionid)
    print("CountryCode  :\t" + cf.countrycode)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    print("OnlyM4a      :\t" + cf.onlym4a)
    print("ShowProgress :\t" + cf.showprogress + "(enable when threadnum=1)")
    print("Version      :\t" + TIDAL_DL_VERSION)
    myinput("Enter to return.")
def logInByTime():
    cf = TidalConfig()
    try:
        Lasttime = float(cf.lastlogintime)
        Lastlocaltime = time.localtime(Lasttime)
    except:
        Lastlocaltime = None

    Curtime = time.time()
    Curlocaltime = time.localtime(Curtime)
    if Lastlocaltime is not None:
        if Curlocaltime.tm_mon == Lastlocaltime.tm_mon and Curlocaltime.tm_mday == Lastlocaltime.tm_mday and Curlocaltime.tm_hour < Lastlocaltime.tm_hour + 3:
            return

    if logIn(cf.username, cf.password) == False:
        while logIn("", "") == False:
            pass
Beispiel #14
0
def main(argv=None):
    cf = TidalConfig()
    print(tidal.LOG)
    while logIn(cf.username, cf.password) == False:
        pass

    onlineVer = pipHelper.getLastVersion('tidal-dl')
    print("====================Tidal-dl========================")
    print("OutputDir    :\t" + cf.outputdir)
    print("SessionID    :\t" + cf.sessionid)
    print("CountryCode  :\t" + cf.countrycode)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    print("Version      :\t" + TIDAL_DL_VERSION)
    if onlineVer != None:
        print("LastVer      :\t" + onlineVer)
    print("====================================================")

    dl = Download()
    while True:
        printMenu()
        choice = printChoice("Enter Choice:", True, 99)
        if choice == 0:
            return
        elif choice == 1:
            logIn()
            dl = Download(cf.threadnum)
        elif choice == 2:
            setting()
            dl = Download(cf.threadnum)
        elif choice == 3:
            dl.downloadAlbum()
        elif choice == 4:
            dl.downloadTrack()
        elif choice == 5:
            dl.downloadPlaylist()
        elif choice == 6:
            dl.downloadVideo()
        elif choice == 7:
            dl.downloadFavorite()
        elif choice == 8:
            dl.downloadArtistAlbum()
def debug():
    cf = TidalConfig()

    # import tidalapi
    # test = tidalapi.Config()
    # session = tidalapi.Session()
    # session.login(cf.username, cf.password)
    # TIDAL_TOKEN.token2 = "wc8j_yBJd20zOmx0"
    # x-tidal-token: qe5mgUGPtIfbgN574ngS74Sd1OmKIfvcLx7e28Yk
    # TIDAL_TOKEN.token1 = "CzET4vdadNUFQ5JU"

    TIDAL_TOKEN.token1 = "qe5mgUGPtIfbgN574ngS74Sd1OmKIfvcLx7e28Yk"
    TIDAL_TOKEN.token1 = "u5qPNNYIbD0S0o36MrAiFZ56K6qMCrCmYPzZuTnV"

    # TIDAL_TOKEN.token1 = TIDAL_TOKEN.token2
    account = TidalAccount(cf.username, cf.password, TIDAL_TOKEN, False, cf)

    # import requests
    # import uuid
    # from urllib.parse import urljoin

    # headers = {"X-Tidal-Token": 'u5qPNNYIbD0S0o36MrAiFZ56K6qMCrCmYPzZuTnV'}
    # postParams = {
    #     'username': '******',
    #     'password': '******',
    #     'token': 'u5qPNNYIbD0S0o36MrAiFZ56K6qMCrCmYPzZuTnV',
    #     'clientUniqueKey': str(uuid.uuid4()).replace('-', '')[16:],
    #     'clientVersion': '1.9.1'
    # }
    # location = 'https://api.tidalhifi.com/v1/'
    # myurl = urljoin(location, 'login/username')
    # re = requests.post(myurl, data=postParams)
    # tt = TidalMobileSession(cf.username, cf.password,'RnhXoTmoJgARtXHr')
    if logIn(cf.username, cf.password) == False:
        pass

    # add tag Credits,Info song and full tag (discnumber,irsc,composer,arrenger,publisher,replayGain,releasedate)
    # https://api.tidal.com/v1/albums/71121869/tracks?token=wdgaB1CilGA-S_s2&countryCode=TH
    print('\nThis is the debug version!!\n')
    # os.system("pip install aigpy --upgrade")
    # trackid = 70973230
    dl = Download(1)
    dl.downloadTrack("90521281")
def setting():
    cf = TidalConfig()
    print("----------------Settings----------------")
    print("OutputDir    :\t" + cf.outputdir)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    print("OnlyM4a      :\t" + cf.onlym4a)
    print("ShowProgress :\t" + cf.showprogress + "(enable when threadnum=1)")
    print("AddHyphen    :\t" + cf.addhyphen + "(between number and title)")
    while True:
        outputdir = myinput("Outputdir(Enter '0' Unchanged):".ljust(12))
        if outputdir == '0':
            outputdir = cf.outputdir
            break
        if os.path.isdir(outputdir) == False:
            printErr(0, "Path is Err!")
            continue
        break
    while True:
        index = myinputInt(
            "Quality(0-LOW,1-HIGH,2-LOSSLESS,3-HI_RES):".ljust(12), 999)
        if index > 3 or index < 0:
            printErr(0, "Quality Err!")
            continue
        if index == 0:
            quality = 'LOW'
        if index == 1:
            quality = 'HIGH'
        if index == 2:
            quality = 'LOSSLESS'
        if index == 3:
            quality = 'HI_RES'
        break
    while True:
        index = myinputInt(
            "Resolution(0-1080,1-720,2-480,3-360,4-240):".ljust(12), 99)
        if index > 4 or index < 0:
            printErr(0, "Resolution Err")
            continue
        if index == 0:
            resolution = '1080'
        if index == 1:
            resolution = '720'
        if index == 2:
            resolution = '480'
        if index == 3:
            resolution = '360'
        if index == 4:
            resolution = '240'
        break
    while True:
        threadnum = myinput("ThreadNum:".ljust(12))
        if cf.valid_threadnum(threadnum) == False:
            printErr(0, "ThreadNum Err")
            continue
        break
    status = myinputInt("ConvertMp4toM4a(0-False,1-True):".ljust(12), 0)
    status2 = myinputInt("ShowProgress(0-False,1-True):".ljust(12), 0)
    status3 = myinputInt("AddHyphen(0-False,1-True):".ljust(12), 0)

    cf.set_outputdir(outputdir)
    cf.set_quality(quality)
    cf.set_resolution(resolution)
    cf.set_threadnum(threadnum)
    cf.set_onlym4a(status)
    cf.set_showprogress(status2)
    cf.set_addhyphen(status3)

    pathHelper.mkdirs(outputdir + "/Album/")
    pathHelper.mkdirs(outputdir + "/Playlist/")
    pathHelper.mkdirs(outputdir + "/Video/")
    pathHelper.mkdirs(outputdir + "/Favorite/")
    return
Beispiel #17
0
def setting():
    cf = TidalConfig()
    print("----------------Setting----------------")
    print("OutputDir    :\t" + cf.outputdir)
    print("SoundQuality :\t" + cf.quality)
    print("Resolution   :\t" + cf.resolution)
    print("ThreadNum    :\t" + cf.threadnum)
    while True:
        outputdir = myinput("Outputdir(Enter '0' Unchanged):".ljust(12))
        if outputdir == '0':
            outputdir = cf.outputdir
            break
        if os.path.isdir(outputdir) == False:
            printErr(0, "Path is Err!")
            continue
        break
    while True:
        index = myinputInt("Quality(0-LOW,1-HIGH,2-LOSSLESS):".ljust(12), 999)
        if index > 2 or index < 0:
            printErr(0, "Quality Err!")
            continue
        if index == 0:
            quality = 'LOW'
        if index == 1:
            quality = 'HIGH'
        if index == 2:
            quality = 'LOSSLESS'
        break
    while True:
        index = myinputInt(
            "Resolution(0-1080,1-720,2-480,3-360,4-240):".ljust(12), 99)
        if index > 4 or index < 0:
            printErr(0, "ThreadNum Err")
            continue
        if index == 0:
            resolution = '1080'
        if index == 1:
            resolution = '720'
        if index == 2:
            resolution = '480'
        if index == 3:
            resolution = '360'
        if index == 4:
            resolution = '240'
        break
    while True:
        threadnum = myinput("ThreadNum:".ljust(12))
        if cf.valid_threadnum(threadnum) == False:
            printErr(0, "ThreadNum Err")
            continue
        break

    cf.set_outputdir(outputdir)
    cf.set_quality(quality)
    cf.set_resolution(resolution)
    cf.set_threadnum(threadnum)

    pathHelper.mkdirs(outputdir + "/Album/")
    pathHelper.mkdirs(outputdir + "/Playlist/")
    pathHelper.mkdirs(outputdir + "/Video/")
    pathHelper.mkdirs(outputdir + "/Favorite/")
    return
Beispiel #18
0
def debug():
    cf = TidalConfig()
    while logIn(cf.username, cf.password) == False:
        pass
    dl = Download()
    dl.downloadVideo(57261945)  #1hours
def setting():
    cf = TidalConfig()
    print("----------------Settings----------------")
    print("Output directory                 :\t" + cf.outputdir)
    print("Sound Quality                    :\t" + cf.quality)
    print("Video Resolution                 :\t" + cf.resolution)
    print("Download Threads                 :\t" + cf.threadnum)
    print("Only M4a                         :\t" + cf.onlym4a)
    print("Show download progress           :\t" + cf.showprogress +
          "(enable when threadnum=1)")
    print("Use hyphens                      :\t" + cf.addhyphen +
          "(between number and title)")
    print("Add year                         :\t" + cf.addyear +
          "(in album title)")
    print("Add explicit tag                 :\t" + cf.addexplicit)
    print("Playlist songs in artist folders :\t" + cf.plfile2arfolder +
          "(organized with artist folder)")
    print("Include singles                  :\t" + cf.includesingle +
          "(download artist album)")
    print("Save covers                      :\t" + cf.savephoto)
    print("ArtistName Before Track-Title    :\t" + cf.artistbeforetitle)
    print("Add ID Before AlbumFolderName    :\t" + cf.addAlbumidbeforefolder)
    while True:
        outputdir = myinput("Output directory(Enter '0' Unchanged):".ljust(12))
        if outputdir == '0':
            outputdir = cf.outputdir
            break
        if os.path.isdir(outputdir) == False:
            printErr(0, "Path is Err!")
            continue
        break
    while True:
        index = myinputInt(
            "Download Quality(0-LOW,1-HIGH,2-LOSSLESS,3-HI_RES):".ljust(12),
            999)
        if index > 3 or index < 0:
            printErr(0, "Quality Err!")
            continue
        if index == 0:
            quality = 'LOW'
        if index == 1:
            quality = 'HIGH'
        if index == 2:
            quality = 'LOSSLESS'
        if index == 3:
            quality = 'HI_RES'
        break
    while True:
        index = myinputInt(
            "Video resolution(0-1080,1-720,2-480,3-360,4-240):".ljust(12), 99)
        if index > 4 or index < 0:
            printErr(0, "Resolution Err")
            continue
        if index == 0:
            resolution = '1080'
        if index == 1:
            resolution = '720'
        if index == 2:
            resolution = '480'
        if index == 3:
            resolution = '360'
        if index == 4:
            resolution = '240'
        break
    while True:
        threadnum = myinput("Number of download threads:".ljust(12))
        if cf.valid_threadnum(threadnum) == False:
            printErr(0, "ThreadNum Err")
            continue
        break

    status = myinputInt("Convert Mp4 to M4a(0-No, 1-Yes):".ljust(12), 0)
    status2 = myinputInt(
        "Show download progress (only available on single thread)(0-No, 1-Yes):"
        .ljust(12), 0)
    status3 = myinputInt(
        "Use hyphens instead of spaces in file names(0-No, 1-Yes):".ljust(12),
        0)

    while True:
        index = myinputInt(
            "Add year to album folder names(0-No, 1-Before, 2-After):".ljust(
                12), 99)
        if index > 2 or index < 0:
            printErr(0, "Addyear input Err")
            continue
        if index == 0:
            addyear = 'No'
        if index == 1:
            addyear = 'Before'
        if index == 2:
            addyear = 'After'
        break

    status5 = myinputInt(
        "Download playlist songs in artist folder structure? (0-No,1-Yes):".
        ljust(12), 0)
    status6 = myinputInt(
        "Add explicit tag to file names(0-No, 1-Yes):".ljust(12), 0)
    status7 = myinputInt(
        "Include singles and EPs when downloading an artist's albums (0-No, 1-Yes):"
        .ljust(12), 0)
    status8 = myinputInt("Save covers(0-No, 1-Yes):".ljust(12), 0)
    status9 = myinputInt(
        "Add artistName before trackTitle(0-No, 1-Yes):".ljust(12), 0)
    status10 = myinputInt(
        "Add ID Before AlbumFolderName(0-No, 1-Yes):".ljust(12), 0)

    cf.set_outputdir(outputdir)
    cf.set_quality(quality)
    cf.set_resolution(resolution)
    cf.set_threadnum(threadnum)
    cf.set_onlym4a(status)
    cf.set_showprogress(status2)
    cf.set_addhyphen(status3)
    cf.set_addyear(addyear)
    cf.set_plfile2arfolder(status5)
    cf.set_addexplicit(status6)
    cf.set_includesingle(status7)
    cf.set_savephoto(status8)
    cf.set_artistbeforetitle(status9)
    cf.set_addAlbumidbeforefolder(status10)

    pathHelper.mkdirs(outputdir + "/Album/")
    pathHelper.mkdirs(outputdir + "/Playlist/")
    pathHelper.mkdirs(outputdir + "/Video/")
    pathHelper.mkdirs(outputdir + "/Favorite/")
    return
def debug():
    cf = TidalConfig()
    while logIn(cf.username, cf.password) == False:
        pass
    dl = Download()
    dl.downloadAlbum(79412401)
def main(argv=None):
    if byCommand() is True:
        return

    print(LOG)
    cf = TidalConfig()
    if logIn(cf.username, cf.password) == False:
        while logIn("", "") == False:
            pass

    cf = TidalConfig()
    onlineVer = pipHelper.getLastVersion('tidal-dl')
    print("====================Tidal-dl========================")
    print("Output directory                 : " + cf.outputdir)
    print("Sound Quality                    : " + cf.quality)
    print("Video Resolution                 : " + cf.resolution)
    print("Download Threads                 : " + cf.threadnum)
    print("Only M4a                         : " + cf.onlym4a)
    print("Show download progress           : " + cf.showprogress +
          "(enable when threadnum=1)")
    print("Use hyphens                      : " + cf.addhyphen +
          "(between number and title)")
    print("Add year                         : " + cf.addyear +
          "(in album title)")
    print("Add explicit tag                 : " + cf.addexplicit)
    print("Playlist songs in artist folders : " + cf.plfile2arfolder +
          "(organized with artist folder)")
    print("Include singles                  : " + cf.includesingle +
          "(download artist album)")
    print("Save covers                      : " + cf.savephoto)
    print("ArtistName Before Track-Title    : " + cf.artistbeforetitle)
    print("Add ID Before AlbumFolderName    : " + cf.addAlbumidbeforefolder)
    print("Current Version                  : " + TIDAL_DL_VERSION)
    if onlineVer != None:
        print("Latest Version                   : " + onlineVer)
    print("====================================================")

    dl = Download(cf.threadnum)
    if not dl.ffmpeg.enable:
        printWarning(0, "Couldn't find ffmpeg!\n")
    while True:
        printMenu()
        strchoice, choice = printChoice2("Enter Choice:", 99)
        if choice == 0:
            return
        elif choice == 1:
            logIn()
            cf = TidalConfig()
            dl = Download(cf.threadnum)
        elif choice == 2:
            setting()
            cf = TidalConfig()
            dl = Download(cf.threadnum)
        elif choice == 3:
            dl.downloadAlbum()
        elif choice == 4:
            dl.downloadTrack()
        elif choice == 5:
            dl.downloadPlaylist()
        elif choice == 6:
            dl.downloadVideo()
        elif choice == 7:
            dl.downloadFavorite()
        elif choice == 8:
            dl.downloadArtistAlbum(cf.includesingle == "True")
        elif choice == 9:
            showConfig()
        elif choice == 10:
            setAccessToken()
            cf = TidalConfig()
            dl = Download(cf.threadnum)
        #Hidden Code For Developer [200-299]
        elif choice == 200:
            dl.downloadArtistAlbum(False)
        else:
            dl.downloadUrl(strchoice)
            dl.downloadByFile(strchoice)