Ejemplo n.º 1
0
def root():
    createDataFolders()
    checkVersionChange()
    createCacheFolders()
    
    
    defaultCollectionsFolder    =   Folder.fromFullpath(DEFAULT_COLLECTIONS_DIR)
    myCollectionsFolder         =   Folder.fromFullpath(MY_COLLECTIONS_DIR)
    myCollectionsFolder.createIfNotExists()
    
    #homeSetting = addonSettings.get('homepage', default=0,  isInt=True)    
    
    homeSetting = addonSettings.get('homepage', default='0')  #temp thing cause of people changing version. remove later                      
    if not homeSetting.isdigit():          
        addonSettings.set('homepage', '0')
        homeSetting = 0
    else:
        homeSetting = int(homeSetting)
    
    
    options = {0:_home, 1:_defaultCollections, 2:_myCollections}
    
    
    
    options[homeSetting](defaultCollectionsFolder, myCollectionsFolder)
Ejemplo n.º 2
0
def sourceInfoCacheTime():
    return addonSettings.get('yt_source_info_cache_time',
                             default=7,
                             isInt=True)  #in days

    # videoDescriptionStats =         addonSettings.get('yt_video_description_stats')
    # channelDescriptionStats =         addonSettings.get('yt_channel_description_stats')
    # playlistDescriptionStats =         addonSettings.get('yt_playlist_description_stats')
Ejemplo n.º 3
0
def subscriptionSorting():
    from Subscriptions import SubscriptionSorting as ss
    SS_VALUES = (ss.ALPHABETICAL, ss.RELEVANCE, ss.UNREAD)
    _subscriptionSorting = addonSettings.get('yt_subscriptions_sorting',
                                             default=ss.ALPHABETICAL,
                                             valueList=SS_VALUES)

    return _subscriptionSorting
Ejemplo n.º 4
0
def root():
    createDataFolders()
    checkVersionChange()
    createCacheFolders()

    defaultCollectionsFolder = Folder.fromFullpath(DEFAULT_COLLECTIONS_DIR)
    myCollectionsFolder = Folder.fromFullpath(MY_COLLECTIONS_DIR)
    myCollectionsFolder.createIfNotExists()

    #homeSetting = addonSettings.get('homepage', default=0,  isInt=True)

    homeSetting = addonSettings.get(
        'homepage', default='0'
    )  #temp thing cause of people changing version. remove later
    if not homeSetting.isdigit():
        addonSettings.set('homepage', '0')
        homeSetting = 0
    else:
        homeSetting = int(homeSetting)

    options = {0: _home, 1: _defaultCollections, 2: _myCollections}

    options[homeSetting](defaultCollectionsFolder, myCollectionsFolder)
Ejemplo n.º 5
0
from src.tools import addonSettings


kodiFolderCacheTime = addonSettings.get('kodi_folders_cache_time', default=5, isInt=True)    #in minutes
Ejemplo n.º 6
0
def sourceInfoCacheTime():              return addonSettings.get('yt_source_info_cache_time',          default=7,    isInt=True)    #in days
Ejemplo n.º 7
0
def categoryChannelsCacheTime():        return addonSettings.get('yt_category_channels_cache_time',    default=1,    isInt=True)    #in days
def searchesCacheTime():                return addonSettings.get('yt_searches_cache_time',             default=5,    isInt=True)    #in minutes
Ejemplo n.º 8
0
def subscriptionChannelsCacheTime():    return addonSettings.get('yt_subscription_channels_cache_time',default=1,    isInt=True)    #in days
def categoryChannelsCacheTime():        return addonSettings.get('yt_category_channels_cache_time',    default=1,    isInt=True)    #in days
Ejemplo n.º 9
0
def videosCacheTime():                  return addonSettings.get('yt_videos_cache_time',               default=5,    isInt=True)    #in minutes
def channelPlaylistsCacheTime():        return addonSettings.get('yt_channel_playlists_cache_time',    default=1,    isInt=True)    #in days
Ejemplo n.º 10
0
def subscriptionSorting():
    from  Subscriptions import SubscriptionSorting as ss
    SS_VALUES = (ss.ALPHABETICAL, ss.RELEVANCE, ss.UNREAD)
    _subscriptionSorting = addonSettings.get('yt_subscriptions_sorting', default=ss.ALPHABETICAL, valueList=SS_VALUES)
    
    return _subscriptionSorting
Ejemplo n.º 11
0
from regionCodes import regionCodes
from src.tools import addonSettings
from Thumb import ThumbRes





region          =   addonSettings.get('yt_region', default='United States of America')
regionCode      =   regionCodes[region]

videoThumbres   =   addonSettings.get('yt_video_thumbres', default=ThumbRes.MEDIUM,     isInt=True)
sourceThumbres  =   addonSettings.get('yt_source_thumbres', default=ThumbRes.MEDIUM,    isInt=True)


def subscriptionSorting():
    from  Subscriptions import SubscriptionSorting as ss
    SS_VALUES = (ss.ALPHABETICAL, ss.RELEVANCE, ss.UNREAD)
    _subscriptionSorting = addonSettings.get('yt_subscriptions_sorting', default=ss.ALPHABETICAL, valueList=SS_VALUES)
    
    return _subscriptionSorting




def videosCacheTime():                  return addonSettings.get('yt_videos_cache_time',               default=5,    isInt=True)    #in minutes
def channelPlaylistsCacheTime():        return addonSettings.get('yt_channel_playlists_cache_time',    default=1,    isInt=True)    #in days
def subscriptionChannelsCacheTime():    return addonSettings.get('yt_subscription_channels_cache_time',default=1,    isInt=True)    #in days
def categoryChannelsCacheTime():        return addonSettings.get('yt_category_channels_cache_time',    default=1,    isInt=True)    #in days
def searchesCacheTime():                return addonSettings.get('yt_searches_cache_time',             default=5,    isInt=True)    #in minutes
Ejemplo n.º 12
0
from src.tools import addonSettings

kodiFolderCacheTime = addonSettings.get('kodi_folders_cache_time',
                                        default=5,
                                        isInt=True)  #in minutes
Ejemplo n.º 13
0
def searchesCacheTime():
    return addonSettings.get('yt_searches_cache_time', default=5,
                             isInt=True)  #in minutes
Ejemplo n.º 14
0
def categoryChannelsCacheTime():
    return addonSettings.get('yt_category_channels_cache_time',
                             default=1,
                             isInt=True)  #in days
Ejemplo n.º 15
0
def subscriptionChannelsCacheTime():
    return addonSettings.get('yt_subscription_channels_cache_time',
                             default=1,
                             isInt=True)  #in days
Ejemplo n.º 16
0
def channelPlaylistsCacheTime():
    return addonSettings.get('yt_channel_playlists_cache_time',
                             default=1,
                             isInt=True)  #in days
Ejemplo n.º 17
0
def videosCacheTime():
    return addonSettings.get('yt_videos_cache_time', default=5,
                             isInt=True)  #in minutes
Ejemplo n.º 18
0
from regionCodes import regionCodes
from src.tools import addonSettings
from Thumb import ThumbRes

region = addonSettings.get('yt_region', default='United States of America')
regionCode = regionCodes[region]

videoThumbres = addonSettings.get('yt_video_thumbres',
                                  default=ThumbRes.MEDIUM,
                                  isInt=True)
sourceThumbres = addonSettings.get('yt_source_thumbres',
                                   default=ThumbRes.MEDIUM,
                                   isInt=True)


def subscriptionSorting():
    from Subscriptions import SubscriptionSorting as ss
    SS_VALUES = (ss.ALPHABETICAL, ss.RELEVANCE, ss.UNREAD)
    _subscriptionSorting = addonSettings.get('yt_subscriptions_sorting',
                                             default=ss.ALPHABETICAL,
                                             valueList=SS_VALUES)

    return _subscriptionSorting


def videosCacheTime():
    return addonSettings.get('yt_videos_cache_time', default=5,
                             isInt=True)  #in minutes


def channelPlaylistsCacheTime():