Solved using smart playlist as Widget path ignores 'order'
#1
Hi, lately i noticed that the tags

xml:
 <order direction="foo">bar</order>

inside the playlistfilename.xsp file
gets ignored when try to fill container with that file as dynamic content.

AS LONG AS I DINDT SET THE
sortorder + sortby tags manualy for the <content> tag of the Container.


Here is an playlist.xsp example playlist i like to refer
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Imdb Top 250</name>
    <match>all</match>
    <rule field="top250" operator="isnot">
        <value>0</value>
    </rule>
    <group>none</group>
    <limit>250</limit>
    <order direction="ascending">top250</order>
</smartplaylist>

Simple Example:

Omiting sortorder,sortby
xml:
<content target="videos">special://skin/playlists/video/ImdbTop250.xsp</content>
or
Using Blank sortorder,sortby
xml:
<content target="videos" sortorder="" sortby="">special://skin/playlists/video/ImdbTop250.xsp</content>

Result in
- the wished/determined from .xsp  <order direction="ascending">top250</order>  gets ignored, and lead to use custom ovverride
- all titles which match the rules are ordered ascending by Label/Title

Expected
- <order direction="ascending">top250</order> of xsp file determine the sortorder and sortby for dynamic content

If i use Custom/Hardcoded
e.g.
xml:
<content target="videos" sortorder="ascending" sortby="top250">special://skin/playlists/video/ImdbTop250.xsp</content>

Result in
- the wished order and direction is used,
but that makes xsp file usage useless for that case.

Is there something i am missing??

i believe it was working correct a while back, but not really sure...



Using them for custom ActivateWindow Actions all is fine, and the playlist is Orderd Correct
e.g.
xml:
ActivateWindow(videos,special://skin/playlists/video/ImdbTop250.xsp,return)
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#2
Is this the same thing i'm experiencing here?  I've chased this all the way back to includes and the sort order seems to have no effect, but i figured i was just not seeing it yet.

This is a widget, correct?

Image
Reply
#3
(2020-05-08, 19:57)YerMusic (IO) Wrote: Is this the same thing i'm experiencing here?  I've chased this all the way back to includes and the sort order seems to have no effect, but i figured i was just not seeing it yet.

This is a widget, correct?

Image

yepp.cotrect.a dynamic one.
But the
tags to skin dynamic content containers are working.

the issue i get was using smart playlist file as a content path SHOULD NOT need skinned tags
(except target and path)

( its maybe just order tags with no corresponding SORT_METHODs, but dint find time to investigate it my self)
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#4
Works properly for me.
Image

That's a smart playlist with the same rules you had (Top250 is not 0, sort by Top250 ascending, limit to 250) and with sortby="" sortorder="" in the content tags.

These movies are all in order of Top250 values in my library.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
(2020-05-09, 03:38)jurialmunkey Wrote: Works properly for me.
Image

That's a smart playlist with the same rules you had (Top250 is not 0, sort by Top250 ascending, limit to 250) and with sortby="" sortorder="" in the content tags.

These movies are all in order of Top250 values in my library.

@jurialmunkey

First , Thanks for checking against.

But i am still wondered.
As i still cant reproduce to get it work correct.

Till i set the skin strings manually.

Did you use another KODI Version than the one below ??

If so, can you post your KODI version, so that i can test there again.
Or refer to the skin where it worked on your end?

I tested on estuary and own skin, on the android system (b) with a fresh app install and library.

a)
log:
2020-05-09 23:15:24.373 T:1420 NOTICE: Starting Kodi (18.6 Git:20200229-8e967df921). Platform: Windows NT x86 64-bit
2020-05-09 23:15:24.373 T:1420 NOTICE: Using Release Kodi x64 build
2020-05-09 23:15:24.373 T:1420 NOTICE: Kodi compiled 2020-02-29 by MSVC 191627034 for Windows NT x86 64-bit version 10.0 (0x0A000006)
2020-05-09 23:15:24.373 T:1420 NOTICE: Running on Windows 10, kernel: Windows NT x86 64-bit version 10.0.18362
b)
log:
2020-05-09 21:55:12.164 T:26917 NOTICE: Starting Kodi (18.6 Git:20200229-8e967df921). Platform: Android ARM 32-bit
2020-05-09 21:55:12.164 T:26917 NOTICE: Using Release Kodi x32 build
2020-05-09 21:55:12.164 T:26917 NOTICE: Kodi compiled 2020-02-29 by Clang 7.0.2 (https://android.googlesource.com/toolchain/clang 003100370607242ddd5815e4a043907ea9004281) (https://android.googlesource.com/toolchain/llvm 1d739ffb0366421d383e04ff80ec2ee591315116) for Android ARM 32-bit API level 21 (API level 21)
2020-05-09 21:55:12.164 T:26917 NOTICE: Running on samsung SM-G950F with Android 9.0.0 API level 28, kernel: Linux ARM 32-bit version 4.4.111-17263988
2020-05-09 21:55:12.164 T:26917 NOTICE: FFmpeg version/source: 4.0.4-Kodi

With same Results. (Issues descriped in Heading/1st Post)

tested in own skin
- which use this template for a widget container
xml:
<include name="Widget_Container_Template">
<param name="height" default="350" />

<definition>

<control type="$PARAM[type]" id="$PARAM[id]">
<nested />
<scrolltime tween="quadratic">400</scrolltime>
<top>50</top>
<preloaditems>2</preloaditems>
<focusposition>0</focusposition>
<orientation>horizontal</orientation>
<height>$PARAM[height]</height>
<visible>$PARAM[visible]</visible>

<include content="WidgetHome_landscape" condition="String.IsEqual(Skin.String(userwidget$PARAM[nr]_layout),landscape)">
<param name="nr" value="$PARAM[nr]" />
<param name="id" value="$PARAM[id]" />
</include>
<include content="WidgetHome_poster" condition="String.IsEqual(Skin.String(userwidget$PARAM[nr]_layout),poster)">
<param name="nr" value="$PARAM[nr]" />
<param name="id" value="$PARAM[id]" />
</include>
<include content="WidgetHome_square" condition="String.IsEqual(Skin.String(userwidget$PARAM[nr]_layout),square)">
<param name="nr" value="$PARAM[nr]" />
<param name="id" value="$PARAM[id]" />
</include>
<include content="WidgetHome_circle" condition="String.IsEqual(Skin.String(userwidget$PARAM[nr]_layout),circle)">
<param name="nr" value="$PARAM[nr]" />
<param name="id" value="$PARAM[id]" />
</include>
<include content="WidgetHome_banner" condition="String.IsEqual(Skin.String(userwidget$PARAM[nr]_layout),banner)">
<param name="nr" value="$PARAM[nr]" />
<param name="id" value="$PARAM[id]" />
</include>
<content target="$INFO[Skin.String(userwidget$PARAM[nr]_target)]" limit="$INFO[Skin.String(userwidget$PARAM[nr]_limit)]" sortorder="$INFO[Skin.String(userwidget$PARAM[nr]_sortorder)]" sortby="$INFO[Skin.String(userwidget$PARAM[nr]_sortby)]">$INFO[Skin.String(userwidget$PARAM[nr]_path)]</content>
</control>
</definition>
</include>

e.g. first widget
xml:
<include content="Widget_Container_Template" condition="!Skin.HasSetting(userwidget1_IsSection) + !Skin.HasSetting(userwidget1_forceFixedlist)">
<param name="type" value="panel" />
<param name="nr" value="1" />
<param name="id" value="5001" />
<param name="visible" value="Integer.IsGreater(Container(5001).NumItems,0) | Container(5001).IsUpdating" />
</include>


if sortby,sortorder left blank/empty skin.string
(also tested without using <nested /> tag for the include)

and with default estuary
(home.xml)

xml:
<include content="WidgetListPoster" condition="Library.HasContent(movies)">
<param name="content_path" value="special://skin/playlists/imdbTop250.xsp"/>
<param name="widget_header" value="imdb top 250"/>
<param name="widget_target" value="videos"/>
<param name="list_id" value="5100"/>
</include>
the WidgetListPoster was tested without editing and with omitting
xml:
<content sortby="$PARAM[sortby]" sortorder="$PARAM[sortorder]" target="$PARAM[widget_target]" limit="">$PARAM[content_path]</content>
<content sortby="" sortorder="" target="videos" limit="">$PARAM[content_path]</content>

using this xsp file
xml:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
<name>Imdb Top 250</name>
<match>all</match>
<rule field="top250" operator="isnot">
<value>0</value>
</rule>
<group>none</group>
<limit>250</limit>
<order direction="ascending">top250</order>
</smartplaylist>
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#6
Tested on Kodi 18.6 on Windows.

You need to remove the line <group>none</group> from your smart playlist.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#7
(2020-05-10, 08:15)jurialmunkey Wrote: Tested on Kodi 18.6 on Windows.

You need to remove the line <group>none</group> from your smart playlist.

Wow, thanks !!
Had never thought this causing it.

That way it worked perfect for the home widget, although i need another one with the
xml:
<group>none</group>
for dont show set item/folder , if a user has bool 'videolibrary.groupmoviesets'
set to 'true' if using the xsp for ActivateWindow() and want to keep a real movie list without grouping into sets.
Skins |  Titan M O D   •   S W A N (WIP)
Reply

Logout Mark Read Team Forum Stats Members Help
using smart playlist as Widget path ignores 'order'0