Example #1
0
def search_channel(type=''):
    result = dev.user_input('', 'Search for '+dev.typeName(type)+' Channel')
    if len(result) > 0:
        ytube.search_channel(result, type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def setEditPlaylist(id, set, type=''):
    if set == 'enable':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Enable", "Would you like to enable this playlist?")
        if i == 0:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'no', type=type)
            return
            #dialog.ok("Set to disabled", "Playlist is disabled.")
        else:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'yes', type=type)
            return
            #dialog.ok("Set to enabled", "Playlist will now be picked up by the scanner")
    elif set == 'writenfo':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("WriteNFO", "Write NFO files for this playlist?")
        if i == 0:
            i = 'no'
        else:
            i = 'Yes'
    elif set == 'skip_audio':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Audio Only Videos", "Skip Audio Only Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'    
    elif set == 'download_videos':
        i = xbmcgui.Dialog().select('Download Videos?', ['off', '720p', '1080p', 'best'])
        if i == 0:
            i = 'off'
        elif i == 1:
            i = '720p'
        elif i == 2:
            i = '1080p'
        elif i == 3:
            i = 'best'
    elif set == 'skip_lyrics':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Lyrics", "Skip Lyric Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_live':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Live", "Skip Live Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_albums':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Albums", "Skip Album Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'published':
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = '01/01/1901'
        d = ytube.convert_published(setting)
        prev_setting = d['day']+'/'+d['month']+'/'+d['year']
        i = xbmcgui.Dialog().input('Change Published Date', prev_setting, 2)
        if i == '':
            i = prev_setting
        else:
            d = ytube.convert_published(i)
            i = d['day']+'-'+d['month']+'-'+d['year']
    elif set == 'season':
        i = xbmcgui.Dialog().select('Choose Season Numbering', ['year', 's02e12', '02x12', 'number', 'regex'])
        if i == 0:
            i = 'year'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 3:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 4:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'episode':
        i = xbmcgui.Dialog().select('Choose Episode Numbering', ['Default', 's02e12', '02x12', 'monthday', 'pos', 'number', 'regex'])
        if i == 0:
            i = 'default'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 3:
            i = 'monthday'
        elif i == 4:
            i = 'pos'
        elif i == 5:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 6:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'onlygrab':
        options = ['0', '50', '100', '250', '500', '1000', '5000', '10000']
        i = xbmcgui.Dialog().select('Choose max old videos to grab', options)
        i = options[i]
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'updateevery':
        options = ['every 4 hours', 'every 8 hours', 'every 12 hours', 'every 24 hours', 'every 168 hours', 'every day', 'every sunday', 'every monday', 'every tuesday', 'every wednesday', 'every thursday', 'every friday', 'every saturday']
        i = xbmcgui.Dialog().select('Choose when to update this playlist', options)
        i = options[i]
    elif set == 'update_gmt':
        options = dev.timezones()
        i = xbmcgui.Dialog().select('In which timezone should this list be updated?', options)
        i = options[i]
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'minlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a minimum length for videos')
    elif set == 'maxlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a maximum length for videos')
    elif set == 'updateat':
        i = xbmcgui.Dialog().numeric(2, 'Update this playlist on this time of the day')
    elif set == 'reverse':
        i = xbmcgui.Dialog().yesno("Reverse Playlist", "Reverse this playlist? \n\r (Only use this if the playlist is sorted oldest->newest and you cant find a playlist sorted newest->oldest)")
        i = str(i)
    
    
    ###MOVIES
    elif set == 'search_imdb':
        i = xbmcgui.Dialog().select(dev.lang(30504), ['Yes, fallback on addon settings', 'Yes, dont add if imdb fails', 'No, just use addon settings'])
        i = str(i)
    elif set == 'imdb_match_cutoff':
        options = ['25', '40', '50', '60', '70', '75', '80', '85', '90', '95', '99', '100']
        i = xbmcgui.Dialog().select(dev.lang(30505), options)
        i = options[i]
    elif set == 'use_ytimage':
        options = ['Only if no image found on IMDB', 'Always', 'Dont add if no image is found on IMDB', 'Never']
        i = xbmcgui.Dialog().select(dev.lang(30520), options)
        i = str(i)
    elif set == 'smart_search':
        i = xbmcgui.Dialog().yesno("Smart Search", "Enable Smart Search?")
        i = str(i)

    
    
    ###MUSIC VIDEOS
    #genre
    elif set == 'genre' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition', ['hardcoded'])
        if i == 0:
            i = 'hardcoded'
    elif set == 'genre_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition Fallback', ['hardcoded', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'do not add'
    #Song Fallback
    elif set == 'song_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose Song Recognizition Fallback', ['video title', 'video title (original)', 'do not add'])
        if i == 0:
            i = 'video title'
        elif i == 1:
            i = 'video title (original)'
        elif i == 2:
            i = 'do not add'
    #Artist
    elif set == 'artist':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition', ['video title and description', 'playlist channelname', 'video channelname', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'artist_fallback':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition Fallback', ['hardcoded', 'playlist channelname', 'video channelname', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'do not add'
    #album        
    elif set == 'album':
        i = xbmcgui.Dialog().select('Choose album Recognizition', ['video title and description', 'artist + published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'artist + published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'album_fallback':
        i = xbmcgui.Dialog().select('Choose album Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
    #plot
    elif set == 'plot':
        i = xbmcgui.Dialog().select('Choose plot Recognizition', ['lyrics in video description', 'video description', 'playlist description', 'hardcoded'])
        if i == 0:
            i = 'lyrics in video description'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'plot_fallback':
        i = xbmcgui.Dialog().select('Choose plot Recognizition Fallback', ['hardcoded', 'video description', 'playlist description', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'do not add'
    #year
    elif set == 'year':
        i = xbmcgui.Dialog().select('Choose year Recognizition', ['video title and description', 'published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'year_fallback':
        i = xbmcgui.Dialog().select('Choose year Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
            
            
    ### NORMAL SETTING
    else:
        #Its another setting, so its normal text
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = None
        if elem.find(set) != None:
            setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = ''
        i = dev.user_input(setting, 'Change setting '+set) #Ask the user to put in the new setting
    
    m_xml.xml_update_playlist_setting(id, set, i, type=type) #Save the new setting
def apiSearch(type=''):
    result = dev.user_input('', 'Search by Title / Description')
    if len(result) > 0:
        ytlibrary_api.browse(params={'search': result}, type=type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def apiSearchChannel(type=''):
    result = dev.user_input('', 'Search by Channel')
    if len(result) > 0:
        ytlibrary_api.browse(params={'channel': result}, type=type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def search_channel(type=''):
    result = dev.user_input('',
                            'Search for ' + dev.typeName(type) + ' Channel')
    if len(result) > 0:
        ytube.search_channel(result, type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def search_playlist(type=''):
    result = dev.user_input('',
                            'Search for ' + dev.typeName(type) + ' Playlist')
    if len(result) > 0:
        searched_playlist(result, type)
def setEditPlaylist(id, set, type=''):
    if set == 'enable':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Enable", "Would you like to enable this playlist?")
        if i == 0:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'no', type=type)
            return
            #dialog.ok("Set to disabled", "Playlist is disabled.")
        else:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'yes', type=type)
            return
            #dialog.ok("Set to enabled", "Playlist will now be picked up by the scanner")
    elif set == 'writenfo':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("WriteNFO", "Write NFO files for this playlist?")
        if i == 0:
            i = 'no'
        else:
            i = 'Yes'
    elif set == 'skip_audio':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Audio Only Videos", "Skip Audio Only Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_lyrics':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Lyrics", "Skip Lyric Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_live':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Live", "Skip Live Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_albums':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Albums", "Skip Album Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'published':
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = '01/01/1901'
        d = ytube.convert_published(setting)
        prev_setting = d['day']+'/'+d['month']+'/'+d['year']
        i = xbmcgui.Dialog().input('Change Published Date', prev_setting, 2)
        if i == '':
            i = prev_setting
        else:
            d = ytube.convert_published(i)
            i = d['day']+'-'+d['month']+'-'+d['year']
    elif set == 'season':
        i = xbmcgui.Dialog().select('Choose Season Numbering', ['year', 's02e12', '02x12', 'number', 'regex'])
        if i == 0:
            i = 'year'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 3:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 4:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'episode':
        i = xbmcgui.Dialog().select('Choose Episode Numbering', ['Default', 's02e12', '02x12', 'monthday', 'pos', 'number', 'regex'])
        if i == 0:
            i = 'default'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 3:
            i = 'monthday'
        elif i == 4:
            i = 'pos'
        elif i == 5:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 6:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'onlygrab':
        options = ['0', '50', '100', '250', '500', '1000', '5000', '10000']
        i = xbmcgui.Dialog().select('Choose max old videos to grab', options)
        i = options[i]
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'updateevery':
        options = ['every 4 hours', 'every 8 hours', 'every 12 hours', 'every 24 hours', 'every 168 hours', 'every day', 'every sunday', 'every monday', 'every tuesday', 'every wednesday', 'every thursday', 'every friday', 'every saturday']
        i = xbmcgui.Dialog().select('Choose when to update this playlist', options)
        i = options[i]
    elif set == 'update_gmt':
        options = dev.timezones()
        i = xbmcgui.Dialog().select('In which timezone should this list be updated?', options)
        i = options[i]
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'minlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a minimum length for videos')
    elif set == 'maxlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a maximum length for videos')
    elif set == 'updateat':
        i = xbmcgui.Dialog().numeric(2, 'Update this playlist on this time of the day')
    elif set == 'reverse':
        i = xbmcgui.Dialog().yesno("Reverse Playlist", "Reverse this playlist? \n\r (Only use this if the playlist is sorted oldest->newest and you cant find a playlist sorted newest->oldest)")
        i = str(i)
    
    
    ###MOVIES
    elif set == 'search_imdb':
        i = xbmcgui.Dialog().select(dev.lang(30504), ['Yes, fallback on addon settings', 'Yes, dont add if imdb fails', 'No, just use addon settings'])
        i = str(i)
    elif set == 'imdb_match_cutoff':
        options = ['25', '40', '50', '60', '70', '75', '80', '85', '90', '95', '99', '100']
        i = xbmcgui.Dialog().select(dev.lang(30505), options)
        i = options[i]
    elif set == 'use_ytimage':
        options = ['Only if no image found on IMDB', 'Always', 'Dont add if no image is found on IMDB', 'Never']
        i = xbmcgui.Dialog().select(dev.lang(30520), options)
        i = str(i)
    elif set == 'smart_search':
        i = xbmcgui.Dialog().yesno("Smart Search", "Enable Smart Search?")
        i = str(i)

    
    
    ###MUSIC VIDEOS
    #genre
    elif set == 'genre' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition', ['hardcoded'])
        if i == 0:
            i = 'hardcoded'
    elif set == 'genre_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition Fallback', ['hardcoded', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'do not add'
    #Song Fallback
    elif set == 'song_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose Song Recognizition Fallback', ['video title', 'video title (original)', 'do not add'])
        if i == 0:
            i = 'video title'
        elif i == 1:
            i = 'video title (original)'
        elif i == 2:
            i = 'do not add'
    #Artist
    elif set == 'artist':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition', ['video title and description', 'playlist channelname', 'video channelname', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'artist_fallback':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition Fallback', ['hardcoded', 'playlist channelname', 'video channelname', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'do not add'
    #album		
    elif set == 'album':
        i = xbmcgui.Dialog().select('Choose album Recognizition', ['video title and description', 'artist + published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'artist + published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'album_fallback':
        i = xbmcgui.Dialog().select('Choose album Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
    #plot
    elif set == 'plot':
        i = xbmcgui.Dialog().select('Choose plot Recognizition', ['lyrics in video description', 'video description', 'playlist description', 'hardcoded'])
        if i == 0:
            i = 'lyrics in video description'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'plot_fallback':
        i = xbmcgui.Dialog().select('Choose plot Recognizition Fallback', ['hardcoded', 'video description', 'playlist description', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'do not add'
    #year
    elif set == 'year':
        i = xbmcgui.Dialog().select('Choose year Recognizition', ['video title and description', 'published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'year_fallback':
        i = xbmcgui.Dialog().select('Choose year Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
            
            
    ### NORMAL SETTING
    else:
        #Its another setting, so its normal text
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = None
        if elem.find(set) != None:
            setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = ''
        i = dev.user_input(setting, 'Change setting '+set) #Ask the user to put in the new setting
    
    m_xml.xml_update_playlist_setting(id, set, i, type=type) #Save the new setting
def apiSearchChannel(type=''):
    result = dev.user_input('', 'Search by Channel')
    if len(result) > 0:
        ytlibrary_api.browse(params={'channel': result}, type=type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def apiSearch(type=''):
    result = dev.user_input('', 'Search by Title / Description')
    if len(result) > 0:
        ytlibrary_api.browse(params={'search': result}, type=type)
    xbmcplugin.endOfDirectory(vars.addon_handle)
def search_playlist(type=''):
    result = dev.user_input('', 'Search for '+dev.typeName(type)+' Playlist')
    if len(result) > 0:
        searched_playlist(result, type)
Example #11
0
def setEditPlaylist(id, set, type=''):
    if set == 'enable':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Enable", "Would you like to enable this playlist?")
        if i == 0:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'no', type=type)
            return
            #dialog.ok("Set to disabled", "Playlist is disabled.")
        else:
            m_xml.xml_update_playlist_attr(id, 'enabled', 'yes', type=type)
            return
            #dialog.ok("Set to enabled", "Playlist will now be picked up by the scanner")
    elif set == 'writenfo':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("WriteNFO", "Write NFO files for this playlist?")
        if i == 0:
            i = 'no'
        else:
            i = 'Yes'
    elif set == 'skip_audio':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Audio Only Videos", "Skip Audio Only Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_lyrics':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Lyrics", "Skip Lyric Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_live':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Live", "Skip Live Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'skip_albums':
        #Display a yes/no dialog to enable / disable
        i = xbmcgui.Dialog().yesno("Skip Albums", "Skip Album Videos?")
        if i == 0:
            i = 'false'
        else:
            i = 'true'
    elif set == 'published':
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = '01/01/1901'
        d = ytube.convert_published(setting)
        prev_setting = d['day']+'/'+d['month']+'/'+d['year']
        i = xbmcgui.Dialog().input('Change Published Date', prev_setting, 2)
        if i == '':
            i = prev_setting
        else:
            d = ytube.convert_published(i)
            i = d['day']+'-'+d['month']+'-'+d['year']
    elif set == 'season':
        i = xbmcgui.Dialog().select('Choose Season Numbering', ['year', 's02e12', '02x12', 'number', 'regex'])
        if i == 0:
            i = 'year'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'episode', i, type=type) #Set this for episode as well
        elif i == 3:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 4:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'episode':
        i = xbmcgui.Dialog().select('Choose Episode Numbering', ['Default', 's02e12', '02x12', 'monthday', 'pos', 'number', 'regex'])
        if i == 0:
            i = 'default'
        elif i == 1:
            i = 's02e12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 2:
            i = '02x12'
            m_xml.xml_update_playlist_setting(id, 'season', i, type=type) #Set this for season as well
        elif i == 3:
            i = 'monthday'
        elif i == 4:
            i = 'pos'
        elif i == 5:
            i = xbmcgui.Dialog().numeric(0, 'Set a hardcoded episode number')
        elif i == 6:
            i = dev.user_input('', 'Set a regular expression')
        #m_xml.xml_update_playlist_setting(id, set, i) #Save the new setting
    elif set == 'minlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a minimum length for videos')
    elif set == 'maxlength':
        i = xbmcgui.Dialog().numeric(2, 'Set a maximum length for videos')
    
    ###MUSIC VIDEOS
    #genre
    elif set == 'genre' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition', ['hardcoded'])
        if i == 0:
            i = 'hardcoded'
    elif set == 'genre_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose genre Recognizition Fallback', ['hardcoded', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'do not add'
    #Song Fallback
    elif set == 'song_fallback' and type == 'musicvideo':
        i = xbmcgui.Dialog().select('Choose Song Recognizition Fallback', ['video title', 'do not add'])
        if i == 0:
            i = 'video title'
        elif i == 1:
            i = 'do not add'
    #Artist
    elif set == 'artist':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition', ['video title and description', 'playlist channelname', 'video channelname', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'artist_fallback':
        i = xbmcgui.Dialog().select('Choose Artist Recognizition Fallback', ['hardcoded', 'playlist channelname', 'video channelname', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'playlist channelname'
        elif i == 2:
            i = 'video channelname'
        elif i == 3:
            i = 'do not add'
    #album		
    elif set == 'album':
        i = xbmcgui.Dialog().select('Choose album Recognizition', ['video title and description', 'artist + published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'artist + published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'album_fallback':
        i = xbmcgui.Dialog().select('Choose album Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
    #plot
    elif set == 'plot':
        i = xbmcgui.Dialog().select('Choose plot Recognizition', ['lyrics in video description', 'video description', 'playlist description', 'hardcoded'])
        if i == 0:
            i = 'lyrics in video description'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'hardcoded'
    elif set == 'plot_fallback':
        i = xbmcgui.Dialog().select('Choose plot Recognizition Fallback', ['hardcoded', 'video description', 'playlist description', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'video description'
        elif i == 2:
            i = 'playlist description'
        elif i == 3:
            i = 'do not add'
    #year
    elif set == 'year':
        i = xbmcgui.Dialog().select('Choose year Recognizition', ['video title and description', 'published year', 'hardcoded'])
        if i == 0:
            i = 'video title and description'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'hardcoded'
    elif set == 'year_fallback':
        i = xbmcgui.Dialog().select('Choose year Recognizition Fallback', ['hardcoded', 'published year', 'do not add'])
        if i == 0:
            i = 'hardcoded'
        elif i == 1:
            i = 'published year'
        elif i == 2:
            i = 'do not add'
            
            
    ### NORMAL SETTING
    else:
        #Its another setting, so its normal text
        elem = m_xml.xml_get_elem('playlists/playlist', 'playlist', {'id': id}, type=type) #Find this playlist so we can grab the value of the settings
        setting = None
        if elem.find(set) != None:
            setting = str(elem.find(set).text) #Convert the setting to a string so we can input it safely
        if setting == None or setting == 'None':
            setting = ''
        i = dev.user_input(setting, 'Change setting '+set) #Ask the user to put in the new setting
    
    m_xml.xml_update_playlist_setting(id, set, i, type=type) #Save the new setting