def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" chappaai_playlist_folder = "special://profile/playlists/mixed/Chappaai/" if not xbmcvfs.exists(chappaai_playlist_folder): xbmcvfs.mkdir(chappaai_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set Chappaai as a movies video source?" ) if dialogs.yesno(_("Library setup"), msg): source_thumbnail = get_icon_path("movies") source_name = "Chappaai " + _("Movies") source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,1,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format( library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set [COLOR limegreen]M[/COLOR]etalli[COLOR limegreen]Q[/COLOR] 4[COLOR limegreen]Q[/COLOR]ed as a tv shows source?" ) if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): try: source_thumbnail = get_icon_path("tv") source_name = "[COLOR limegreen]M[/COLOR]etalli[COLOR limegreen]Q[/COLOR] 4[COLOR limegreen]Q[/COLOR]ed " + _( "TV shows") source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format( library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) except: pass # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) msg = _( "Would you like to automatically set [COLOR limegreen]M[/COLOR]etalli[COLOR limegreen]Q[/COLOR] 4[COLOR limegreen]Q[/COLOR]ed as a music source?" ) if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): source_thumbnail = get_icon_path("musicvideos") source_name = "[COLOR limegreen]M[/COLOR]etalli[COLOR limegreen]Q[/COLOR] 4[COLOR limegreen]Q[/COLOR]ed " + _( "Music videos") source_content = "('{0}','musicvideos','metadata.musicvideos.theaudiodb.com','',2147483647,0,'<settings><setting id=\"fanarttvalbumthumbs\" value=\"true\" /><setting id=\"tadbalbumthumbs\" value=\"true\" /></settings>',0,0,NULL,NULL)".format( library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def auto_music_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, converter=str) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, converter=str)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("music") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _( "Music") source_content = "('{0}','musicvideos','metadata.musicvideos.imvdb','',2147483647,0,'<settings/>',0,0,NULL,NULL)".format( library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" chappaai_playlist_folder = "special://home/playlists/mixed/Chappaai/" if not xbmcvfs.exists(chappaai_playlist_folder): xbmcvfs.mkdir(chappaai_playlist_folder) playlist_folder = plugin.get_setting(SETTING_LIVE_PLAYLIST_FOLDER, unicode) # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set Chappaai as a channel video source?" ) if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): source_thumbnail = get_icon_path("live") source_name = "Chappaai " + _("Channels") source_content = "('{0}','','','',0,0,'<settings></settings>',0,0,NULL,NULL)".format( library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, converter=str) if plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, converter=str)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a movies video source?" ) if dialogs.yesno(_("Library setup"), msg): source_thumbnail = get_icon_path("movies") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Movies") source_content = '(\'{0}\',\'movies\',\'metadata.themoviedb.org\',\'\',2147483647,1,\'<settings><setting id="RatingS" value="TMDb" /><setting id="certprefix" value="Rated " /><setting id="fanart" value="true" /><setting id="keeporiginaltitle" value="false" /><setting id="language" value="{1}" /><setting id="tmdbcertcountry" value="us" /><setting id="trailer" value="true" /></settings>\',0,0,NULL,NULL)'.format( library_folder, LANG ) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) msg = _( "Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a music source?" ) if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): source_thumbnail = get_icon_path("tv") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _( "Music") source_content = "('{0}','musicvideos','metadata.musicvideos.imvdb','',2147483647,0,'<settings/>',0,0,NULL,NULL)".format( library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def auto_tv_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): xbmcvfs.mkdir(library_folder) source_thumbnail = xbmc.translatePath('special://home/addons/plugin.video.meta/resources/img/tv.png') source_name = "Meta TVShows" source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail)
def auto_movie_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): xbmcvfs.mkdir(library_folder) source_thumbnail = 'special://home/addons/plugin.video.meta/resources/img/movies.png' source_name = "Meta Movies" source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,1,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail)
def auto_live_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("live") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Channels") source_content = "('{0}','','','',0,0,'<settings></settings>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def auto_tvshows_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("tv") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("TV shows") source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def auto_music_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("musicvideos") source_name = "Chappaai " + _("Music videos") source_content = "('{0}','musicvideos','metadata.musicvideos.theaudiodb.com','',2147483647,0,'<settings><setting id=\"fanarttvalbumthumbs\" value=\"true\" /><setting id=\"tadbalbumthumbs\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def auto_movie_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("movies") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Movies") source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,1,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def auto_movie_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(library_folder): try: if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("movies") source_name = "MetalliQ " + _("Movies") source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,1,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def auto_music_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("music") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Music") source_content = "('{0}','musicvideos','metadata.musicvideos.imvdb','',2147483647,0,'<settings/>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_TV_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): xbmcvfs.mkdir(library_folder) # auto configure folder msg = _("Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a tv shows source?") if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): try: source_thumbnail = get_icon_path("tv") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("TV shows") source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content, source_thumbnail) except: pass # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _("Would you like to automatically set Meta as a movies video source?") if dialogs.yesno(_("Library setup"), msg): source_name = "Meta Movies" source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,0,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _("Would you like to automatically set Meta as a tv shows source?") if dialogs.yesno(_("Library setup"), msg): source_name = "Meta TVShows" source_content = "('{0}','tvshows','metadata.tvdb.com','',0,0,'<settings><setting id=\"RatingS\" value=\"TheTVDB\" /><setting id=\"absolutenumber\" value=\"false\" /><setting id=\"dvdorder\" value=\"false\" /><setting id=\"fallback\" value=\"true\" /><setting id=\"fanart\" value=\"true\" /><setting id=\"language\" value=\"{1}\" /></settings>',0,0,NULL,NULL)".format(library_folder, LANG) add_source(source_name, library_folder, source_content) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode) if plugin.get_setting(SETTING_MUSIC_PLAYLIST_FOLDER, unicode)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) msg = _("Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a music source?") if dialogs.yesno("{0} {1}".format(_("Library"), "setup"), msg): source_thumbnail = get_icon_path("tv") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Music") source_content = "('{0}','musicvideos','metadata.musicvideos.imvdb','',2147483647,0,'<settings/>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_LIVE_PLAYLIST_FOLDER, converter=str) # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _("Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a channel video source?") if dialogs.yesno(_("Library setup"), msg): source_thumbnail = get_icon_path("live") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Channels") source_content = "('{0}','','','',0,0,'<settings></settings>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)
def auto_movie_setup(library_folder): if library_folder[-1] != "/": library_folder += "/" playlist_folder = plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, converter=str) if plugin.get_setting(SETTING_MOVIES_PLAYLIST_FOLDER, converter=str)[-1] != "/": playlist_folder += "/" # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): try: xbmcvfs.mkdir(library_folder) source_thumbnail = get_icon_path("movies") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Movies") source_content = '(\'{0}\',\'movies\',\'metadata.themoviedb.org\',\'\',2147483647,1,\'<settings><setting id="RatingS" value="TMDb" /><setting id="certprefix" value="Rated " /><setting id="fanart" value="true" /><setting id="keeporiginaltitle" value="false" /><setting id="language" value="{1}" /><setting id="tmdbcertcountry" value="us" /><setting id="trailer" value="true" /></settings>\',0,0,NULL,NULL)'.format( library_folder, LANG ) add_source(source_name, library_folder, source_content, source_thumbnail) return True except: False
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set Meta as a movies video source?" ) if dialogs.yesno(_("Library setup"), msg): source_name = "Meta Movies" source_content = "('{0}','movies','metadata.themoviedb.org','',2147483647,0,'<settings><setting id=\"RatingS\" value=\"TMDb\" /><setting id=\"certprefix\" value=\"Rated \" /><setting id=\"fanart\" value=\"true\" /><setting id=\"keeporiginaltitle\" value=\"false\" /><setting id=\"language\" value=\"{1}\" /><setting id=\"tmdbcertcountry\" value=\"us\" /><setting id=\"trailer\" value=\"true\" /></settings>',0,0,NULL,NULL)".format( library_folder, LANG) add_source(source_name, library_folder, source_content) # return translated path return xbmc.translatePath(library_folder)
def setup_library(library_folder): if library_folder[-1] != "/": library_folder += "/" metalliq_playlist_folder = "special://profile/playlists/mixed/MetalliQ/" if not xbmcvfs.exists(metalliq_playlist_folder): xbmcvfs.mkdir(metalliq_playlist_folder) playlist_folder = plugin.get_setting(SETTING_LIVE_PLAYLIST_FOLDER, converter=str) # create folders if not xbmcvfs.exists(playlist_folder): xbmcvfs.mkdir(playlist_folder) if not xbmcvfs.exists(library_folder): # create folder xbmcvfs.mkdir(library_folder) # auto configure folder msg = _( "Would you like to automatically set [COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] as a channel video source?" ) if dialogs.yesno(_("Library setup"), msg): source_thumbnail = get_icon_path("live") source_name = "[COLOR ff0084ff]M[/COLOR]etalli[COLOR ff0084ff]Q[/COLOR] " + _("Channels") source_content = "('{0}','','','',0,0,'<settings></settings>',0,0,NULL,NULL)".format(library_folder) add_source(source_name, library_folder, source_content, source_thumbnail) # return translated path return xbmc.translatePath(library_folder)