Skip to content

Commit 2a71d73

Browse files
committed
Add settings and library maintenance
1 parent 24217a6 commit 2a71d73

File tree

4 files changed

+103
-1
lines changed

4 files changed

+103
-1
lines changed

resources/language/resource.language.en_gb/strings.po

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,42 @@ msgctxt "#30835"
745745
msgid "De Warmste Week"
746746
msgstr ""
747747

748+
msgctxt "#30840"
749+
msgid "Kodi Library"
750+
msgstr ""
751+
752+
msgctxt "#30841"
753+
msgid "Indexing"
754+
msgstr ""
755+
756+
msgctxt "#30843"
757+
msgid "Add video locations to the Kodi Library… [COLOR gray](See README.md)[/COLOR]"
758+
msgstr ""
759+
760+
msgctxt "#30845"
761+
msgid "Index documentaries also"
762+
msgstr ""
763+
764+
msgctxt "#30847"
765+
msgid "Index music videos also"
766+
msgstr ""
767+
768+
msgctxt "#30849"
769+
msgid "Index only TV shows you follow"
770+
msgstr ""
771+
772+
msgctxt "#30851"
773+
msgid "Maintenance"
774+
msgstr ""
775+
776+
msgctxt "#30853"
777+
msgid "Refresh Library…"
778+
msgstr ""
779+
780+
msgctxt "#30855"
781+
msgid "Clean Library…"
782+
msgstr ""
783+
748784
msgctxt "#30860"
749785
msgid "Integration"
750786
msgstr ""

resources/language/resource.language.nl_nl/strings.po

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -745,6 +745,42 @@ msgctxt "#30835"
745745
msgid "De Warmste Week"
746746
msgstr "De Warmste Week"
747747

748+
msgctxt "#30840"
749+
msgid "Kodi Library"
750+
msgstr "Kodi-bibliotheek"
751+
752+
msgctxt "#30841"
753+
msgid "Indexing"
754+
msgstr "Indexeren"
755+
756+
msgctxt "#30843"
757+
msgid "Add video locations to the Kodi Library… [COLOR gray](See README.md)[/COLOR]"
758+
msgstr "Videolocaties toevoegen aan de Kodi-bibliotheek… [COLOR gray](Zie README.md)[/COLOR]"
759+
760+
msgctxt "#30845"
761+
msgid "Index documentaries also"
762+
msgstr "Index ook documentaires"
763+
764+
msgctxt "#30847"
765+
msgid "Index music videos also"
766+
msgstr "Indexeer ook muziek video's"
767+
768+
msgctxt "#30849"
769+
msgid "Index only TV shows you follow"
770+
msgstr "Indexeer enkel tv-programma's die je volgt"
771+
772+
msgctxt "#30851"
773+
msgid "Maintenance"
774+
msgstr "Onderhoud"
775+
776+
msgctxt "#30853"
777+
msgid "Refresh Library…"
778+
msgstr "Verniew bibliotheek…"
779+
780+
msgctxt "#30855"
781+
msgid "Clean Library…"
782+
msgstr "Bibliotheek opkuisen…"
783+
748784
msgctxt "#30860"
749785
msgid "Integration"
750786
msgstr "Integratie"

resources/lib/addon.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
except ImportError: # Python 2
1111
from urllib import unquote_plus
1212

13-
from kodiutils import end_of_directory, execute_builtin, get_global_setting, localize, log_access, notification, ok_dialog, refresh_caches
13+
from kodiutils import end_of_directory, execute_builtin, get_global_setting, jsonrpc, localize, log_access, notification, ok_dialog, refresh_caches
1414
from utils import from_unicode, to_unicode
1515

1616
plugin = Plugin() # pylint: disable=invalid-name
@@ -355,6 +355,26 @@ def library_tvshows(program=None):
355355
VRTPlayer().show_library_tvshows()
356356

357357

358+
@plugin.route('/library/configure')
359+
def library_configure():
360+
"""Configure the library integration"""
361+
# There seems to be no way to add sources automatically
362+
# → https://forum.kodi.tv/showthread.php?tid=228840
363+
execute_builtin('ActivateWindow(Videos,sources://video/)')
364+
365+
366+
@plugin.route('/library/update')
367+
def library_update():
368+
"""Refresh the library"""
369+
jsonrpc(method='VideoLibrary.Scan')
370+
371+
372+
@plugin.route('/library/clean')
373+
def library_clean():
374+
"""Clean the library"""
375+
jsonrpc(method='VideoLibrary.Clean')
376+
377+
358378
@plugin.route('/update/repos')
359379
def update_repos():
360380
"""Force an update of the repositories"""

resources/settings.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@
5151
<setting label="30834" type="bool" id="vrtnxt" default="true"/> <!-- VRT NXT -->
5252
<setting label="30835" type="bool" id="de-warmste-week" default="false"/> <!-- De Warmste Week -->
5353
</category>
54+
<category label="30840"> <!-- Kodi Library -->
55+
<setting label="30841" type="lsep"/> <!-- Indexing -->
56+
<setting label="30843" type="action" action="RunPlugin(plugin://plugin.video.vrt.nu/library/configure)" option="close"/>
57+
<setting label="30845" type="bool" id="library_include_docu" default="true"/>
58+
<setting label="30847" type="bool" id="library_include_music" default="true"/>
59+
<setting label="30849" type="bool" id="library_use_favorites" default="true"/>
60+
<setting label="30851" type="lsep"/> <!-- Maintenance -->
61+
<setting label="30853" type="action" action="RunPlugin(plugin://plugin.video.vrt.nu/library/update)"/>
62+
<setting label="30855" type="action" action="RunPlugin(plugin://plugin.video.vrt.nu/library/clean)"/>
63+
</category>
5464
<category label="30860"> <!--Integration -->
5565
<setting label="30861" type="lsep"/> <!-- Integration with other add-ons -->
5666
<!-- YouTube -->

0 commit comments

Comments
 (0)