Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[screensaver.videosaver] v.1.1.5 #2653

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 28 additions & 8 deletions screensaver.videosaver/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="screensaver.videosaver" name="Video ScreenSaver" version="1.0.9" provider-name="Lunatixz">
<addon id="screensaver.videosaver" name="Video ScreenSaver" version="1.1.5" provider-name="Lunatixz">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
<import addon="script.module.six" version="1.0.0"/>
Expand All @@ -8,20 +8,40 @@
</requires>
<extension point="xbmc.ui.screensaver" library="default.py"/>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Create a screensaver from any Kodi video source.</summary>
<description lang="en_GB">Dynamic screensaver using Local content, SmartPlaylists, Plugins and UPNP Servers.</description>
<summary lang="es_ES">Crea un protector de pantalla de cualquier fuente de vídeo en Kodi.</summary>
<description lang="es_ES">Protector de pantalla dinámico que utiliza contenido local, listas de reproducción inteligentes, complementos y servidores UPNP.</description>
<license>GPL-3.0-or-later</license>
<platform>all</platform>
<forum>https://forum.kodi.tv/showthread.php?tid=319730</forum>
<source>https://github.com/Lunatixz/Kodi_Addons/tree/master/screensaver.videosaver</source>
<disclaimer lang="en_GB" >Streaming sources not recommend for metered Internet.</disclaimer>
<disclaimer lang="es_ES" >Se recomienda no usar recursos en Streaming para conexiones a Internet de uso medido.</disclaimer>
<news>v.1.0.9[CR]- Matrix Compatibility</news>
<news>v.1.1.4[CR]- Added Random Seek and Position</news>
<assets>
<icon>resources/images/icon.png</icon>
<fanart>resources/images/fanart.jpg</fanart>
</assets>
<summary lang="da_DK">Opret en pauseskærm fra enhver Kodi-videokilde.</summary>
<summary lang="de_DE">Einen Bildschirmschoner aus einer beliebigen Kodi-Videoquelle erstellen.</summary>
<summary lang="en_GB">Create a screensaver from any Kodi video source.</summary>
<summary lang="es_ES">Crea un protector de pantalla de cualquier fuente de vídeo en Kodi.</summary>
<summary lang="fi_FI">Luo näytönsäästäjä mistä tahansa Kodin videolähteestä.</summary>
<summary lang="fr_FR">Créer un économiseur d&apos;écran à partir de n&apos;importe quelle source vidéo Kodi.</summary>
<summary lang="hr_HR">Stvori čuvara zaslona iz Kodi video izvora.</summary>
<summary lang="it_IT">Crea un salvaschermo da qualsiasi sorgente video Kodi.</summary>
<summary lang="zh_CN">从任意 Kodi 视频源创建屏幕保护程序。</summary>
<description lang="da_DK">Dynamisk pauseskærm der benytter lokalt indhold, smarte playlister, plugins og UPNP-servere.</description>
<description lang="de_DE">Dynamischer Bildschirmschoner mit lokalen Inhalten, SmartPlaylists, Plugins und UPnP-Servern.</description>
<description lang="en_GB">Dynamic screensaver using Local content, SmartPlaylists, Plugins and UPNP Servers.</description>
<description lang="es_ES">Protector de pantalla dinámico que utiliza contenido local, listas de reproducción inteligentes, complementos y servidores UPNP.</description>
<description lang="fi_FI">Dynaaminen näytönsäästäjä, joka hyödyntää paikallista sisältöä, älytoistolistoja, lisäosia sekä UPnP-palvelimia.</description>
<description lang="fr_FR">Économiseur d&apos;écran dynamique utilisant le contenu local, les SmartPlaylists, les plugins et les serveurs UPNP.</description>
<description lang="hr_HR">Promjenjivi čuvar zaslona koji koristi lokalni sadržaj, pametne popise izvođrnja, dodatke i UPNP poslužitelje.</description>
<description lang="uk_UA">Динамічна заставка з локальних файлів, списків SmartPlaylists, плагінів чи серверів UPNP.</description>
<description lang="zh_CN">使用本地内容、智能播放列表、插件和 UPNP 服务器的动态屏幕保护程序。</description>
<disclaimer lang="da_DK">Streamingkilder anbefales ikke til forbrugsbetalt internet.</disclaimer>
<disclaimer lang="de_DE">Streamingquellen werden bei kostenpflichtigen Internet nicht empfohlen.</disclaimer>
<disclaimer lang="en_GB">Streaming sources not recommend for metered Internet.</disclaimer>
<disclaimer lang="es_ES">Se recomienda no usar recursos en Streaming para conexiones a Internet de uso medido.</disclaimer>
<disclaimer lang="fi_FI">Suoratoistolähteitä ei suositella tiedonsiirtomäärän mukaan veloitettavilla yhteyksillä.</disclaimer>
<disclaimer lang="fr_FR">Les sources de streaming ne sont pas recommandées pour Internet contrôlé.</disclaimer>
<disclaimer lang="hr_HR">Izvori strujanja nisu preporučeni s mrežama ograničenim podacima.</disclaimer>
<disclaimer lang="zh_CN">流媒体源不建议通过互联网。</disclaimer>
</extension>
</addon>
19 changes: 7 additions & 12 deletions screensaver.videosaver/browse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2021 Lunatixz
# Copyright (C) 2024 Lunatixz
#
#
# This file is part of Video ScreenSaver.
Expand All @@ -17,7 +17,6 @@
# along with Video ScreenSaver. If not, see <http://www.gnu.org/licenses/>.

import sys, traceback

from kodi_six import xbmc, xbmcaddon, xbmcplugin, xbmcgui, xbmcvfs, py2_encode, py2_decode

# Plugin Info
Expand Down Expand Up @@ -48,12 +47,9 @@ def buildMenuListItem(label1="", label2="", path="", art={'thumb':ICON,'fanart':
def browseDialog(type=0, heading=ADDON_NAME, default='', shares='', mask='', options=None, useThumbs=True, treatAsFolder=False, prompt=True, multi=False):
if prompt and not default:
if options is None:
options = [{"label":"Video" , "label2":"Video Sources" , "default":"library://video/" , "mask":VIDEO_EXTS , "type":type, "multi":False},
{"label":"Files" , "label2":"File Sources" , "default":"" , "mask":"" , "type":type, "multi":False},
{"label":"Local" , "label2":"Local Drives" , "default":"" , "mask":"" , "type":type, "multi":False},
{"label":"Network" , "label2":"Local Drives and Network Share", "default":"" , "mask":"" , "type":type, "multi":False}]
if type == 0:
options.insert(0,{"label":"Video Playlists" , "label2":"Video Playlists" , "default":"special://profile/playlists/video/" , "mask":'.xsp' , "type":1, "multi":False})
options = [{"label":"Video", "label2":"Video Sources", "default":"library://video/", "mask":VIDEO_EXTS , "type":type, "multi":False}]
if type == 0: options.insert(0,{"label":"Video Playlists", "label2":"Video Playlists", "default":"special://profile/playlists/video/", "mask":'.xsp', "type":1, "multi":False})

listitems = [buildMenuListItem(option['label'],option['label2']) for option in options]
select = selectDialog(listitems, LANGUAGE(32018), multi=False)
if select is not None:
Expand All @@ -62,6 +58,7 @@ def browseDialog(type=0, heading=ADDON_NAME, default='', shares='', mask='', opt
type = options[select]['type']
multi = options[select]['multi']
default = options[select]['default']
else: return

if multi == True:
# https://codedocs.xyz/xbmc/xbmc/group__python___dialog.html#ga856f475ecd92b1afa37357deabe4b9e4
Expand All @@ -77,10 +74,8 @@ def browseDialog(type=0, heading=ADDON_NAME, default='', shares='', mask='', opt
# 2 ShowAndGetImage
# 3 ShowAndGetWriteableDirectory
retval = xbmcgui.Dialog().browseSingle(type, heading, shares, mask, useThumbs, treatAsFolder, default)
if retval:
if prompt and retval == default: return None
return retval
return None
if options is not None and default == retval: return
return retval

if __name__ == '__main__':
if not xbmcgui.Window(10000).getProperty("%s.Running"%(ADDON_ID)) == "True":
Expand Down
Loading
Loading