def changeSettings(): global LANG Printf.settings(CONF) choice = Printf.enter(LANG.CHANGE_START_SETTINGS) if choice == '0': return CONF.downloadPath = Printf.enterPath(LANG.CHANGE_DOWNLOAD_PATH, LANG.MSG_PATH_ERR, '0', CONF.downloadPath) CONF.audioQuality = AudioQuality(int(Printf.enterLimit( LANG.CHANGE_AUDIO_QUALITY, LANG.MSG_INPUT_ERR, ['0', '1', '2', '3']))) CONF.videoQuality = VideoQuality(int(Printf.enterLimit( LANG.CHANGE_VIDEO_QUALITY, LANG.MSG_INPUT_ERR, ['1080', '720', '480', '360']))) CONF.onlyM4a = Printf.enter(LANG.CHANGE_ONLYM4A) == '1' CONF.checkExist = Printf.enter(LANG.CHANGE_CHECK_EXIST) == '1' CONF.includeEP = Printf.enter(LANG.CHANGE_INCLUDE_EP) == '1' CONF.saveCovers = Printf.enter(LANG.CHANGE_SAVE_COVERS) == '1' CONF.showProgress = Printf.enter(LANG.CHANGE_SHOW_PROGRESS) == '1' CONF.saveAlbumInfo = Printf.enter(LANG.CHANGE_SAVE_ALBUM_INFO) == '1' CONF.showTrackInfo = Printf.enter(LANG.CHANGE_SHOW_TRACKINFO) == '1' CONF.usePlaylistFolder = Printf.enter(LANG.SETTING_USE_PLAYLIST_FOLDER + "('0'-No,'1'-Yes):") == '1' CONF.language = Printf.enter(LANG.CHANGE_LANGUAGE + "(" + getLangChoicePrint() + "):") CONF.albumFolderFormat = Printf.enterFormat( LANG.CHANGE_ALBUM_FOLDER_FORMAT, CONF.albumFolderFormat, Settings.getDefaultAlbumFolderFormat()) CONF.trackFileFormat = Printf.enterFormat(LANG.CHANGE_TRACK_FILE_FORMAT, CONF.trackFileFormat, Settings.getDefaultTrackFileFormat()) CONF.addLyrics = Printf.enter(LANG.CHANGE_ADD_LYRICS) == '1' CONF.lyricsServerProxy = Printf.enterFormat( LANG.CHANGE_LYRICS_SERVER_PROXY, CONF.lyricsServerProxy, CONF.lyricsServerProxy) CONF.lyricFile = Printf.enter(LANG.CHANGE_ADD_LRC_FILE) == '1' CONF.addTypeFolder = Printf.enter(LANG.CHANGE_ADD_TYPE_FOLDER) == '1' LANG = setLang(CONF.language) Settings.save(CONF)
def changeSettings(): global LANG Printf.settings(CONF) choice = Printf.enter(LANG.CHANGE_START_SETTINGS) if choice == '0': return CONF.downloadPath = Printf.enterPath(LANG.CHANGE_DOWNLOAD_PATH, LANG.MSG_PATH_ERR, '0', CONF.downloadPath) CONF.audioQuality = AudioQuality( int( Printf.enterLimit(LANG.CHANGE_AUDIO_QUALITY, LANG.MSG_INPUT_ERR, ['0', '1', '2', '3']))) CONF.videoQuality = AudioQuality( int( Printf.enterLimit(LANG.CHANGE_VIDEO_QUALITY, LANG.MSG_INPUT_ERR, ['0', '1', '2', '3']))) CONF.onlyM4a = Printf.enter(LANG.CHANGE_ONLYM4A) == '1' CONF.checkExist = Printf.enter(LANG.CHANGE_CHECK_EXIST) == '1' CONF.includeEP = Printf.enter(LANG.CHANGE_INCLUDE_EP) == '1' CONF.saveCovers = Printf.enter(LANG.CHANGE_SAVE_COVERS) == '1' CONF.showProgress = Printf.enter(LANG.CHANGE_SHOW_PROGRESS) == '1' CONF.language = Printf.enter(LANG.CHANGE_LANGUAGE + "(" + getLangChoicePrint() + "):") CONF.albumFolderFormat = Printf.enterFormat( LANG.CHANGE_ALBUM_FOLDER_FORMAT, CONF.albumFolderFormat, Settings.getDefaultAlbumFolderFormat()) CONF.trackFileFormat = Printf.enterFormat( LANG.CHANGE_TRACK_FILE_FORMAT, CONF.trackFileFormat, Settings.getDefaultTrackFileFormat()) LANG = setLang(CONF.language) Settings.save(CONF)