![]() |
v18 Skinning - Any way to show a count of movies inside a movie set?? - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: v18 Skinning - Any way to show a count of movies inside a movie set?? (/showthread.php?tid=352279) Pages:
1
2
|
Skinning - Any way to show a count of movies inside a movie set?? - ukmark62 - 2020-03-05 Hi, I am not a skinner but have modded some existing skins over the years for personal use only. I'm struggling with how to show a count of movies inside a movie set on a skin. I have a list view that shows all movie entries. The entry might be a single movie or a movie set. If it is a movie set I would like to show a number to the right of that entry showing how many movies are inside that set. I can determine if the entry on the list is a set or not by using the boolean condition "ListItem.IsCollection" which is true for a movie set. However, I can't find a way of showing how many movies are in that set. I've tried the following 2 methods, the first one shows the number of items on the actual list rather than the number of items in that set and the second method shows nothing. I'm showing the movie year if it's not part of a set (that works fine), and want to show the count of movies in a set if it is a movie set. <variable name="MovieSet"> <value condition="!ListItem.IsCollection">$INFO[ListItem.Year]</value> <value condition="ListItem.IsCollection">$INFO[Container.NumItems]</value> </variable> <variable name="MovieSet"> <value condition="!ListItem.IsCollection">$INFO[ListItem.Year]</value> <value condition="ListItem.IsCollection">$INFO[Window(Home).Property(SkinHelper.ListItem.Count)]</value> </variable> Does anybody know how to achieve this? Is it even possible? Many thanks in advance for looking. RE: Skinning - Any way to show a count of movies inside a movie set?? - manfeed - 2020-03-05 Put this in the xml of the movie view (not in variables): <control type="fixedlist" id="59030"> <visible>ListItem.IsCollection</visible> <itemlayout> </itemlayout> <focusedlayout> </focusedlayout> <content sortby="year" sortorder="ascending">$INFO[ListItem.FolderPath]</content> </control> After that you can use... $INFO[Container(59030).NumItems] ...to show the number of movies of the set. RE: Skinning - Any way to show a count of movies inside a movie set?? - ukmark62 - 2020-03-05 (2020-03-05, 01:27)manfeed Wrote: Put this in the xml of the movie view (not in variables):Wow! Thanks so much for your very quick response. I did what you suggested and it has definitely improved. Please look at picture below:- The list is now showing a count for movies in a set and a year for single movies, but it is not always an accurate count of movies. Also, the number can change if you page up and down over the entries or if you go into a set and then come back out again the number is then corrected but other entries are made incorrect. It's really strange. https://mega.nz/#!DhIxyQbI!O5XbcX4nZIINxhPe7aF3-aWtnuNvfb1jxDvttBHXDZ4 I've also uploaded the two xmls I modded - a variables.xml and rightlist.xml:- Variables.xml https://mega.nz/#!ixIBBYwI!iGsfBbPkodNCZ3JdMz_i6QDiLDE8psFe3j3pIAS-Fvs RightList.xml https://mega.nz/#!uoYnnYJC!IsYoKH0H0N9aZezI9Qjt6ghGWPdb8mB-pPX-Gy1b-A0 I modded rightlist.xml by inserting your suggested code at the top of the xml file and using variable "MovieSet". In the variables.xml, I am setting the variable "MovieSet" to display either year or number of movies in set. Any further advice much appreciated and thanks so much again! RE: Skinning - Any way to show a count of movies inside a movie set?? - manfeed - 2020-03-05 Forget about using variables for this, try this way... https://mega.nz/#!l8MFSISC!wen0ZBFgBlq38CM6qbiLIfPleAdLa8ZymytsHXTvN-U ...some additional advice if you want to go ahead in modding/skinning; don't use this section, post in SKINNING section instead. Also, instead of asking right away, look for a skin that already does what you want to get, and and try to see how it does it; at the end of the day that's one of the advantages of the free software, the code is available to everyone. That way you will learn faster. Good luck! RE: Skinning - Any way to show a count of movies inside a movie set?? - ukmark62 - 2020-03-05 (2020-03-05, 10:51)manfeed Wrote: Forget about using variables for this, try this way...Got it working! First, I tried using marcelveldts "skin.helper.service" addon and using the "SkinHelper.ListItem.Count" value but that had the same issue as before - ie random numbers appearing on the list. So, I moved the value "$INFO[Container(59030).NumItems]" away from the list (itemlayout and focusedlayout sections) and just added it to show next to the poster view. I chose your method as it loads the value much faster than the "skin.helper.service" method. The change I made is shown below and I like it much more than before. I show the count just next to the poster. In the list, the default for sets was to show the year of the most recent entry for the set. Instead I now put the word "SET". ![]() View is below - case closed and thanks for your help! Without it, this would never have been accomplished!! I normally do try to figure these things out for myself using the existing code in various skins - just that I've never seen a count of movies in a set in a skin and still don't know of any. https://mega.nz/#!f0gHELqS!Qkcg6mibWhCcNr2LK6N-6WkmrXxtMTmxqA7nJTPGp5Q RE: Skinning - Any way to show a count of movies inside a movie set?? - manfeed - 2020-03-05 (2020-03-05, 17:48)ukmark62 Wrote: I normally do try to figure these things out for myself using the existing code in various skins - just that I've never seen a count of movies in a set in a skin and still don't know of any. It seems that Aeon Tajo skin is not very popular... ![]() RE: Skinning - Any way to show a count of movies inside a movie set?? - Dumyat - 2024-07-12 @manfeed The above works perfectly for the total movie count, but I've been trying work out how I can nail down on the total number of movies within a set that have a play count greater than 0, ie watched. Unfortunately, everything I've tried so far has failed. ![]() I downloaded your skin, hoping you might show this info for sets, but seems you show a watched flag if all the movies within a set have been watched. Do you think what I'm trying to achieve is actually possible, because I'm getting serious brain ache trying to figure it out! ![]() Any thoughts / feedback would be much appreciated. Cheers RE: Skinning - Any way to show a count of movies inside a movie set?? - manfeed - 2024-07-12 First off, I saw your post just by chance, it seems that @ + name of the user doesn't work in the forum anymore... I don't know how to do what you ask for, only thing that I can think of is using skinvariables script, from jurialmunkey. Here you can find more info... https://github.com/jurialmunkey/script.skinvariables/wiki/Filtering-Plugin-and-Library-Directories Anyway, I think that this kind of posts belong to the Skinning section, there you'll find more people willing to help. RE: Skinning - Any way to show a count of movies inside a movie set?? - Fuchs2468 - 2024-07-13 (2024-07-12, 14:57)Dumyat Wrote: The above works perfectly for the total movie count, but I've been trying work out how I can nail down on the total number of movies within a set that have a play count greater than 0, ie watched. Unfortunately, everything I've tried so far has failed. Since you also use SHS in your skin, here is a simple solution with SHS.
Here is the result: ![]() ![]() RE: Skinning - Any way to show a count of movies inside a movie set?? - Dumyat - 2024-07-13 (2024-07-12, 23:42)manfeed Wrote: Anyway, I think that this kind of posts belong to the Skinning section, there you'll find more people willing to help.Okay, thanks. RE: Skinning - Any way to show a count of movies inside a movie set?? - Dumyat - 2024-07-13 (2024-07-13, 00:07)Fuchs2468 Wrote:Ok, great. I will give your code a try.(2024-07-12, 14:57)Dumyat Wrote: The above works perfectly for the total movie count, but I've been trying work out how I can nail down on the total number of movies within a set that have a play count greater than 0, ie watched. Unfortunately, everything I've tried so far has failed.Since you also use SHS in your skin, here is a simple solution with SHS. When I tried the SHS watched count a couple of days ago, I was getting totally random results returned in most cases. In fact, in some instances it was showing I had watched more movies than the set actually contained. Thx RE: Skinning - Any way to show a count of movies inside a movie set?? - Hitcher - 2024-07-13 (2024-07-13, 01:08)Dumyat Wrote:Thread moved.(2024-07-12, 23:42)manfeed Wrote: Anyway, I think that this kind of posts belong to the Skinning section, there you'll find more people willing to help.Okay, thanks. RE: Skinning - Any way to show a count of movies inside a movie set?? - Fuchs2468 - 2024-07-14 (2024-07-13, 01:19)Dumyat Wrote: Ok, great. I will give your code a try. I tested my code in your skin today. Here is an optimization for your skin. It works perfectly, all values are correct. The John Wick movie set is also correct. I have 2 movies in my Kodi database and 5 movies are listed in the TMDB database. Tested in: - <variable name="PlotTextBoxVar"> - <variable name="ShiftRightTextBoxVar">
Kodi setting "Include sets containing a single movie" should be deactivated to give better results. look here: ![]() ![]() ![]() ![]() RE: Skinning - Any way to show a count of movies inside a movie set?? - Dumyat - 2024-07-14 (2024-07-14, 02:01)Fuchs2468 Wrote:The good news is this updated code is returning much better results for the watched count.(2024-07-13, 01:19)Dumyat Wrote: Ok, great. I will give your code a try.I tested my code in your skin today. Unfortunately, I'm still getting some rogue results being returned of some sets. On the face of it, these seem to be sets that I have opened within the last week or so and updated the watched status manually on quite a lot of movies via the context menu, as I have been working my way through my movie set collections, updating the artwork. It would seem these updates of the movie status I have made are not being reflected by the the SHS. Are you able to test this as well, ie change the status of an un-watched movie to watched within one of your movie sets and see if the total watched count then increases? If you do see the same thing happening, what would be the best way to clear the skin helper data just for the movie sets? Again, your input is very much appreciated. Thx RE: Skinning - Any way to show a count of movies inside a movie set?? - Fuchs2468 - 2024-07-14 (2024-07-14, 09:41)Dumyat Wrote: Are you able to test this as well, ie change the status of an un-watched movie to watched within one of your movie sets and see if the total watched count then increases? If you do see the same thing happening, what would be the best way to clear the skin helper data just for the movie sets? I found the problem, some time ago caching was added to script.module.metadatautils by SHS. I don't think the original author intended this. Because it prevents the data from being updated quickly. Here is my simple and quick solution. Go to: \addons\script.module.metadatautils\lib\metadatautils.py Line 128 there you will find this:
Delete line 128 with @use_cache(90). It should then look like this.
Now you should always receive all changes in the watched and unwatched status immediately. |