Release Version 0.9.8

add folder display settings
add random musly list folder
add incoming / incoming hits folder
small (mostly whitespace) fixes
This commit is contained in:
bassdart 2019-05-26 19:46:56 +02:00
parent 664517d2d3
commit 4ba6096b9b
6 changed files with 120 additions and 27 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.vidfltr" name="VIDFLTR Music Videos" version="0.9.7" provider-name="bassdart">
<addon id="plugin.video.vidfltr" name="VIDFLTR Music Videos" version="0.9.8" provider-name="bassdart">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.kodi-six" />
@ -30,7 +30,12 @@
<clearlogo>resources/img/kodi/clearlogo.png</clearlogo>
<screenshot></screenshot>
</assets>
<news>0.9.7
<news>0.9.8
- add folder display settings
- add random musly list folder
- add incoming / incoming hits folder
- small (mostly whitespace) fixes
0.9.7
- Vimeo Add-on is broken, play with Youtube-DL until it's fixed
0.9.6
- add display of official/unofficial count in main artist and country folders

View file

@ -1,3 +1,8 @@
0.9.8
- add folder display settings
- add random musly list folder
- add incoming / incoming hits folder
- small (mostly whitespace) fixes
0.9.7
- Vimeo Add-on is broken, play with Youtube-DL until it's fixed
0.9.6

View file

@ -60,9 +60,21 @@ likecounthigh = int(addon.getSetting("likecounthigh"))
dislikecounthigh = int(addon.getSetting("dislikecounthigh"))
# needed for comapatibilty mode used with KODI <= 17 aka Krypton
xbmcversion = int(xbmc.getInfoLabel('System.BuildVersion')[:2])
# get folder settings
showincoming = addon.getSetting("show-incoming")
showincominghits = addon.getSetting("show-incoming-hits")
showrandom = addon.getSetting("show-random")
showsorted = addon.getSetting("show-sorted")
showstyles = addon.getSetting("show-styles")
showartists = addon.getSetting("show-artists")
showcountries = addon.getSetting("show-countries")
showsearch = addon.getSetting("show-search")
showmuslyrandom = addon.getSetting("show-musly-random")
showupdate = addon.getSetting("show-update")
# play from here. Does work in general but refreshes the container which is bit contra-productive in random lists ;)
# XBMC.PlayMedia(plugin://plugin.video.vidfltr/?mode=sortTitlesBy&url=year%7crandom%7c-1,isdir)
# But it's ok in a musly-list?:
# XBMC.PlayMedia(plugin://plugin.video.vidfltr/?mode=sortTitlesBy&url=%26start%3d1555257469%26limit%3drelated%26sort%3dnone,isdir
if not os.path.isdir(addon_work_folder):
os.mkdir(addon_work_folder)
@ -123,13 +135,24 @@ def alphabet():
return alphabet
def main():
addDir(translation(30029), '', 'mainrandom', fanart)
addDir(translation(30012), '', 'mainsorted', fanart)
addDir(translation(30022), '&sort=all', 'styles', fanart)
addDir(translation(30005), '', 'artists', fanart)
addDir(translation(30118), '', 'countrycodes', fanart)
addDir(translation(30001), '', 'search', fanart)
addDir(translation(30006), '', 'updateData', fanart)
if showincoming == "true":
addDir(translation(30007), '&limit=all&sort=date&start=0', 'sortTitlesBy', fanart)
if showincominghits == "true":
addDir(translation(30008), '&limit=all&sort=date&start=0&hit=true', 'sortTitlesBy', fanart)
if showrandom == "true":
addDir(translation(30029), '', 'mainrandom', fanart)
if showsorted == "true":
addDir(translation(30012), '', 'mainsorted', fanart)
if showstyles == "true":
addDir(translation(30022), '&sort=all', 'styles', fanart)
if showartists == "true":
addDir(translation(30005), '', 'artists', fanart)
if showcountries == "true":
addDir(translation(30118), '', 'countrycodes', fanart)
if showsearch == "true":
addDir(translation(30001), '', 'search', fanart)
if showupdate == "true":
addDir(translation(30006), '', 'updateData', fanart)
endOfDirectory()
@ -159,6 +182,8 @@ def mainrandom():
addDir(translation(30031), '&limit=all&sort=random&start=0&hit=true', 'sortTitlesBy', fanart)
addDir(translation(30117), '&sort=random', 'numbers', fanart)
addDir(translation(30022), '&sort=random', 'styles', fanart)
if showmuslyrandom == "true":
addDir(translation(30024), '&limit=related&start=0&sort=none', 'sortTitlesBy', fanart)
endOfDirectory()
def mainsorted():
@ -244,7 +269,7 @@ def play(url):
# without youtube_dl
xbmc.log(msg="without ytdl", level=xbmc.LOGDEBUG)
playback_url = entry['url']
# default mode: play from provider -- either with ytdl or vimeo/youtube/dailymotion addon
else:
xbmc.log(msg="play from provider", level=xbmc.LOGDEBUG)
@ -262,7 +287,7 @@ def play(url):
idVideo = entry['purl']
ytdl = YDStreamExtractor.getVideoInfo(idVideo)
playback_url = ytdl.streamURL()
else:
else:
# without youtube_dl
xbmc.log(msg="without ytdl", level=xbmc.LOGDEBUG)
playback_url = entry['url']
@ -287,6 +312,7 @@ def play(url):
xbmc.log(msg=playback_url, level=xbmc.LOGNOTICE)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
def styles():
data = getVideos()
channels = []
@ -560,7 +586,8 @@ def sortTitlesBy(limit, sort, start):
fanart = getFanart(channel)
# limit selection if "all" isn't activated in videoselection
if videoselection != "2" and channel != "related" and channel != "relartists":
#if videoselection != "2" and channel != "related" and channel != "relartists":
if videoselection != "2":
data = limitselection(data)
# limit to hits
@ -641,7 +668,17 @@ def sortTitlesBy(limit, sort, start):
result.append(entry)
# related tracks (generated with musly)
elif channel != "" and channel == "related":
start = str(start)
# random musly list
if start == 0:
# pick a random item from the already limited list (based on videoselection setting)
entry = random.choice(data)
start = str(entry['slug'])
else:
start = str(start)
# now we have to add the unlimited video list
# It will be limited later, again, if the videoselection
# setting should also be honoured in related lists
data = getVideos()
for entry in data:
if entry['slug'] == start:
slugs = []
@ -670,7 +707,8 @@ def sortTitlesBy(limit, sort, start):
for entry in data:
if entry['slug'] == start:
result.insert(0, entry)
if relatedselection != "true":
# limit selection?
if videoselection != "2" and relatedselection != "true":
result = limitselection(result)
maximum = len(result)
@ -691,7 +729,8 @@ def sortTitlesBy(limit, sort, start):
if entry['artists'] in artists:
result.append(entry)
xbmc.log(msg=str(results), level=xbmc.LOGNOTICE)
if relatedselection != "true":
# limit selection?
if videoselection != "2" and relatedselection != "true":
result = limitselection(result)
start = 0
@ -877,7 +916,7 @@ def getFanart(channel):
return fanart
def limitselection(data):
xbmc.log(msg="limit by videoselection", level=xbmc.DEBUG)
xbmc.log(msg="limit by videoselection", level=xbmc.LOGDEBUG)
result = []
for entry in data:
if videoselection == "0":
@ -924,8 +963,8 @@ def addDir(name, url, mode, iconimage, total=0):
def addVideo(entry, mycount="playcount"):
ok = True
# initiaize the global video playlist. The item will be added later
# playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
# initialize the global video playlist. The item will be added later
# playlist = xbmc.PlayList(xbmc.PLAYLIST_VIDEO)
# Altlast. Sinn dahinter?
if len(entry) > 7:
@ -1007,6 +1046,7 @@ hit = urllib.unquote_plus(extraparams.get('hit', '')).decode('utf-8')
mycount = urllib.unquote_plus(extraparams.get('count', '')).decode('utf-8')
slug = urllib.unquote_plus(extraparams.get('slug', '')).decode('utf-8')
#xbmc.log(msg=str(sys.argv), level=xbmc.LOGNOTICE)
#xbmc.log(msg=str(mode), level=xbmc.LOGNOTICE)
#xbmc.log(msg=str(url), level=xbmc.LOGNOTICE)
@ -1047,10 +1087,6 @@ elif mode == 'artists':
artists()
elif mode == 'styles':
styles()
elif mode == 'stylesrandom':
stylesrandom()
elif mode == 'channelsrandom':
channelsrandom(url)
elif mode == 'related':
related(limit)
elif mode == 'play':

View file

@ -36,6 +36,14 @@ msgctxt "#30006"
msgid "Refresh Data"
msgstr "Daten aktualisieren"
msgctxt "#30007"
msgid "Incoming"
msgstr "Neueste"
msgctxt "#30008"
msgid "Incoming Hits"
msgstr "Neueste Hits"
msgctxt "#30011"
msgid "Random"
msgstr "Zufällig"
@ -84,6 +92,10 @@ msgctxt "#30022"
msgid "Genre"
msgstr "Genre"
msgctxt "#30024"
msgid "Random Musly Playlist"
msgstr "Zufällige Musly Liste"
msgctxt "#30025"
msgid "Artists"
msgstr "Künstler"
@ -229,8 +241,8 @@ msgid "Show in title that video is unofficial"
msgstr "Im Titel anzeigen das Video inoffiziell ist"
msgctxt "#30121"
msgid "Similar music"
msgstr "Ähnliche Musik"
msgid "Similar music (Musly)"
msgstr "Ähnliche Musik (Musly)"
msgctxt "#30122"
msgid "More from..."
@ -243,3 +255,7 @@ msgstr "Zeige alle Videos in Similar- und "Mehr von"-Playlisten"
msgctxt "#30124"
msgid "unknown"
msgstr "unbekannt"
msgctxt "#30125"
msgid "Folder"
msgstr "Verzeichnisse"

View file

@ -36,6 +36,14 @@ msgctxt "#30006"
msgid "Refresh Data"
msgstr ""
msgctxt "#30007"
msgid "Incoming"
msgstr ""
msgctxt "#30008"
msgid "Incoming Hits"
msgstr ""
msgctxt "#30011"
msgid "Random"
msgstr ""
@ -84,6 +92,10 @@ msgctxt "#30022"
msgid "Genre"
msgstr ""
msgctxt "#30024"
msgid "Random Musly Playlist"
msgstr ""
msgctxt "#30025"
msgid "Artists"
msgstr ""
@ -229,7 +241,7 @@ msgid "Show in title that video is unofficial"
msgstr ""
msgctxt "#30121"
msgid "Similar music"
msgid "Similar music (Musly)"
msgstr ""
msgctxt "#30122"
@ -243,3 +255,7 @@ msgstr ""
msgctxt "#30124"
msgid "unknown"
msgstr ""
msgctxt "#30125"
msgid "Folder"
msgstr ""

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<settings>
<!-- standard -->
<category label="30097">
<setting label="30098" type="slider" id="maxFileAge" default="1440" range="720,720,4320" option="int" />
<setting label="30030" type="slider" id="filesinlists" default="50" range="25,25,500" option="int" />
@ -10,6 +11,7 @@
<setting label="30106" type="select" id="mediatype" default="musicvideo" values="musicvideo|movie|video"/>
<setting label="30104" type="bool" id="playLocalFile" default="false" visible="System.HasAddon(service.nfo.watchedstate.updater_bassdart)"/>
</category>
<!-- advanced -->
<category label="30110">
<setting label="30111" type="slider" id="pcounthigh" default="10000000" range="100000,100000,50000000" option="int" />
<setting label="30112" type="slider" id="lcounthigh" default="5" range="1,1,50" option="int" visible="System.HasAddon(service.nfo.watchedstate.updater_bassdart)"/>
@ -18,4 +20,17 @@
<setting label="30115" type="slider" id="likecounthigh" default="5000" range="1000,500,100000" option="int" />
<setting label="30116" type="slider" id="dislikecounthigh" default="1500" range="500,500,100000" option="int" />
</category>
<!-- folder -->
<category label="30125">
<setting label="30007" type="bool" id="show-incoming" default="true"/>
<setting label="30008" type="bool" id="show-incoming-hits" default="false"/>
<setting label="30029" type="bool" id="show-random" default="true"/>
<setting label="30012" type="bool" id="show-sorted" default="true"/>
<setting label="30022" type="bool" id="show-styles" default="true"/>
<setting label="30025" type="bool" id="show-artists" default="true"/>
<setting label="30118" type="bool" id="show-countries" default="true"/>
<setting label="30001" type="bool" id="show-search" default="true"/>
<setting label="30024" type="bool" id="show-musly-random" default="false"/>
<setting label="30006" type="bool" id="show-update" default="false"/>
</category>
</settings>