Req Number of movies in a collection
#16
(2021-10-22, 09:46)Chillbo Wrote: That's exactly what I had done here and it didn't work - a hidden list or fixed list container outside the normal focused layout of the current media view container. I placed it in MyVideoNav.xml, but it never properly updated... What might you be doing differently?

@Chillbo , In MyVideoNav.xml I have a conditional include for the hidden container with the movie set, since I only add this if the user has enabled that option in settings:

xml:

<include condition="Skin.HasSetting(ShowSetCount)">SetCountList</include>

The SetCountList include is this:

xml:

<include name="SetCountList">
        <!-- Hidden list for movie count for sets -->
        <control type="list" id="4450">
            <left>-100</left>
            <top>-100</top>
            <width>100</width>
            <height>100</height>
            <itemlayout height="100" width="100" />
            <focusedlayout height="100" width="100" />
            <content sortby="year" sortorder="ascending">$VAR[MovieSetPath]</content>
         </control>
    </include>

The variable MovieSetPath is:

xml:

<variable name="MovieSetPath">
        <value condition="String.IsEqual(ListItem.DBTYPE,set)">videodb://movies/sets/$INFO[ListItem.DBID]/?setid=$INFO[ListItem.DBID]</value>
    </variable>

And outside the views main container (and thus outside of itemlayout/focusedlayout), I use the info as shown below (in my case, this is part of an information panel that I show in almost all view types):

xml:

<value condition="String.IsEqual(ListItem.DBType,set) + Integer.IsGreater(Container(4450).NumItems,0)">$LOCALIZE[32253]: $INFO[Container(4450).NumItems]</value>

Hope that helps.  Please feel free to check the Amber code for anything that you need.

Regards,

​​​​​​​Bart
Amber Maintainer
Main HTPC: Intel Core i7, 32GB, nVidia GTX1080, Windows 11 Soundbar: Samsung HW-Q950A TV: LG CX Kodi: 19.3 Skin: Amber
Reply
#17
(2021-10-22, 11:19)mardukL Wrote: As said above, for refreshing use '-' value as fallback


This is my variable (adjusted to)
- where id =503 and 504 ares my viewtype (s)
- i dont like to show it if plugin has filled items, except tv shows

to have it 'refresh' i just add <value>-</value> at bootom , can be something, just have to be empty 'path'.


xml:
<variable name="View_503_Folderpath">
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + Container.Content(tvshows)]">videodb://tvshows/titles/$INFO[Container(503).ListItem.dbid]</value>
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,set)]">$INFO[Container.ListItem.FolderPath]</value>
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + !String.IsEmpty(Container.ListItem.SetId)]">videodb://movies/sets/$INFO[Container.ListItem.setid]/?setid=$INFO[Container.ListItem.setid]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + Container.Content(tvshows)]">videodb://tvshows/titles/$INFO[Container(504).ListItem.dbid]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,set)]">$INFO[Container.ListItem.FolderPath]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + !String.IsEmpty(Container.ListItem.SetId)]">videodb://movies/sets/$INFO[Container.ListItem.setid]/?setid=$INFO[Container.ListItem.setid]</value>
        <value condition="String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,tvshow)">$INFO[Container.ListItem.FolderPath]</value>
        <value>-</value>
    </variable>

Than outside of List
$INFO[Container(50352).NumItems]

Thank you, this is really helpful and makes the implementation with a label outside the list really snappy here!

This is still not usable inside the list which means the request for title amount and year range movie set infolabels continues to be valid... Would be great to not have to work around this issue anymore by placing information outside the normal information controls of lists. Nerd
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#18
(2021-10-25, 12:43)Chillbo Wrote:
(2021-10-22, 11:19)mardukL Wrote: As said above, for refreshing use '-' value as fallback


This is my variable (adjusted to)
- where id =503 and 504 ares my viewtype (s)
- i dont like to show it if plugin has filled items, except tv shows

to have it 'refresh' i just add <value>-</value> at bootom , can be something, just have to be empty 'path'.


xml:
<variable name="View_503_Folderpath">
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + Container.Content(tvshows)]">videodb://tvshows/titles/$INFO[Container(503).ListItem.dbid]</value>
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,set)]">$INFO[Container.ListItem.FolderPath]</value>
        <value condition="Control.IsVisible(503) + [!String.StartsWith(listitem.path,plugin) + !String.IsEmpty(Container.ListItem.SetId)]">videodb://movies/sets/$INFO[Container.ListItem.setid]/?setid=$INFO[Container.ListItem.setid]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + Container.Content(tvshows)]">videodb://tvshows/titles/$INFO[Container(504).ListItem.dbid]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,set)]">$INFO[Container.ListItem.FolderPath]</value>
        <value condition="Control.IsVisible(504) + [!String.StartsWith(listitem.path,plugin) + !String.IsEmpty(Container.ListItem.SetId)]">videodb://movies/sets/$INFO[Container.ListItem.setid]/?setid=$INFO[Container.ListItem.setid]</value>
        <value condition="String.StartsWith(listitem.path,plugin) + String.IsEqual(Container.ListItem.dbtype,tvshow)">$INFO[Container.ListItem.FolderPath]</value>
        <value>-</value>
    </variable>

Than outside of List
$INFO[Container(50352).NumItems]

Thank you, this is really helpful and makes the implementation with a label outside the list really snappy here!

This is still not usable inside the list which means the request for title amount and year range movie set infolabels continues to be valid... Would be great to not have to work around this issue anymore by placing information outside the normal information controls of lists. Nerd

yepp, this would be great.


glad it coming to help (refreshing wise if e.g. items which are'nt part of set).
for the infolavels beeing usable inside list ,i see sadly no other way then...

the thing  descrpided above , using hidden button which store the labels of the hidden container.  ( its just possible for the current focused one )


so if using the enable tag in the buttons, you can add visible conditions or use a variable for such labels in your focusedlayout
eg. control.isenabled(7778)
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#19
(2021-10-25, 14:00)mardukL Wrote: yepp, this would be great.


glad it coming to help (refreshing wise if e.g. items which are'nt part of set).
for the infolavels beeing usable inside list ,i see sadly no other way then...

the thing  descrpided above , using hidden button which store the labels of the hidden container.  ( its just possible for the current focused one )


so if using the enable tag in the buttons, you can add visible conditions or use a variable for such labels in your focusedlayout
eg. control.isenabled(7778)

I'm not sure I can follow... Adding hidden buttons to the secondary hidden list that I'm only adding to MyVideoNav.xml for the purpose of retrieving movie set information is helping me how? I'd still need number of movies in a movie set as well as range of years to be usable inside my primary visible view list. Are you saying it can somehow be achieved with your suggestion? Blush
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#20
(2021-10-25, 16:08)Chillbo Wrote:
(2021-10-25, 14:00)mardukL Wrote: yepp, this would be great.


glad it coming to help (refreshing wise if e.g. items which are'nt part of set).
for the infolavels beeing usable inside list ,i see sadly no other way then...

the thing  descrpided above , using hidden button which store the labels of the hidden container.  ( its just possible for the current focused one )


so if using the enable tag in the buttons, you can add visible conditions or use a variable for such labels in your focusedlayout
eg. control.isenabled(7778)

I'm not sure I can follow... Adding hidden buttons to the secondary hidden list that I'm only adding to MyVideoNav.xml for the purpose of retrieving movie set information is helping me how? I'd still need number of movies in a movie set as well as range of years to be usable inside my primary visible view list. Are you saying it can somehow be achieved with your suggestion? Blush


it is just helping if you want use
container(**).listitem.***
inside of focusedlayout of the "native" container.

so, if
$INFO[container(*hidden id*).listitem.*wishedlabelofset** ] wont work inside focusedlayout
then the only consequence is
use
$INFO[control.getlabel(*hiddenbutton*)]

it is very cumbersome, but the only way if really is need to use such labels inside the list (focusedlayout/itemlayout).

the other solutions are by far better ( using label/var outside of .
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#21
(2021-10-19, 17:14)beatmasterrs Wrote:
(2021-10-19, 17:10)Chillbo Wrote: It would also be helpful to get a range of years from a specific movie set (oldest and newest release year of the movies inside the set)...

You are right, that would be cool and you wouldn't need addons for the range of years anymore!
You can do this 
$INFO[Window(Home).Property(SkinHelper.ListItem.Year)]$INFO[Window(Home).Property(SkinHelper.ListItem.-1.Year)]

Of course that assumes you have Skin Helper installed.  It might be possible to achieve same result another way if you do not use Skin Helper
Reply
#22
(2021-11-09, 20:41)justin150 Wrote:
(2021-10-19, 17:14)beatmasterrs Wrote:
(2021-10-19, 17:10)Chillbo Wrote: It would also be helpful to get a range of years from a specific movie set (oldest and newest release year of the movies inside the set)...

You are right, that would be cool and you wouldn't need addons for the range of years anymore!
You can do this 
$INFO[Window(Home).Property(SkinHelper.ListItem.Year)]$INFO[Window(Home).Property(SkinHelper.ListItem.-1.Year)]

Of course that assumes you have Skin Helper installed.  It might be possible to achieve same result another way if you do not use Skin Helper
Sorry I should have remembered there is a simpler way as long as you know the container number where the set is.  In Silvio it is usually 4500

$INFO[Container(4500).ListItem(0).Year]$INFO[Container(4500).ListItem(-1).Year, - ]

gives you the result {year of first movie in set}-{year of last movie in set}
Reply
#23
(2021-11-09, 22:47)justin150 Wrote: Sorry I should have remembered there is a simpler way as long as you know the container number where the set is.  In Silvio it is usually 4500

$INFO[Container(4500).ListItem(0).Year]$INFO[Container(4500).ListItem(-1).Year, - ]

gives you the result {year of first movie in set}-{year of last movie in set}

Problem still is that you can't use this for a secondary label in a focused layout of a list or panel container. That's the issue here Smile
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply
#24
(2021-11-10, 10:39)Chillbo Wrote:
(2021-11-09, 22:47)justin150 Wrote: Sorry I should have remembered there is a simpler way as long as you know the container number where the set is.  In Silvio it is usually 4500

$INFO[Container(4500).ListItem(0).Year]$INFO[Container(4500).ListItem(-1).Year, - ]

gives you the result {year of first movie in set}-{year of last movie in set}

Problem still is that you can't use this for a secondary label in a focused layout of a list or panel container. That's the issue here Smile
You can definitely use it in focused layouts in Views but if you want that information in a panel/list container particularly if that container is used for a widget then you are definitely stuck, for the reasons jurialmunkey gave.

I have actually run across this issue for something other than movie sets for a list widget, it is a right pain and had to eventually concede defeat there as well.
Reply
#25
I think we're going in circles here... If you have a hidden list to get the movie set info in question, you can't use that info in your main focused layout which is not that hidden list. The info will never properly be filled - whether you use hidden labels that you try and pull the info from or whether you do it directly via InfoLabels like these: $INFO[Container(4500).ListItem(0).Year]$INFO[Container(4500).ListItem(-1).Year, - ]

The only two workarounds available to us seem to be to use the info outside the main focused layout (what I've reverted to now as well, but it's not favorable as only this particular piece of info now sits outside that layout) or pull the info from a helper script... This will apply to any list we'd like to use, if the info doesn't come and isn't used in the very same list (so applies to widgets as well).
And this tells us why we won't be able to circumvent this in any other way:

(2021-10-19, 16:58)beatmasterrs Wrote: Jurialmunkey has explained this here: https://forum.kodi.tv/showthread.php?tid...pid2853854
OSMC Skinner      |    The OSMC Skin for Kodi v20 Nexus (native 16:9, 21:9 and 4:3 skin, special cinemascope/CIH version available)      |     GitHub: https://github.com/Ch1llb0/skin.osmc
Reply

Logout Mark Read Team Forum Stats Members Help
Number of movies in a collection0