[split] Oscars 2020 (smartplaylist)
#1
Hopefully this helps someone, I was bored so decided as someone had mentioned the Oscars to do all of the winners and also the runners up (We cannot call people losers now, it is not PC) https://en.wikipedia.org/wiki/92nd_Academy_Awards

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>The Oscars 2020</name>
    <match>all</match>
    <rule field="title" operator="is">
        <value>Parasite</value>
<value>Ford V Ferrari</value>
<value>The Irishman</value>
<value>JoJo Rabbit</value>
<value>Joker</value>
<value>Little Women</value>
<value>Marriage Story</value>
<value>1917</value>
<value>Once Upon A Time In Hollywood</value>
<value>Pain And Glory</value>
<value>The Two Popes</value>
<value>A Beautiful Day In The Neighbourhood</value>
<value>Knives Out</value>
<value>Toy Story 4</value> 
<value>How To Train Your Dragon: The Hidden World</value>
<value>I Lost My Body</value>
<value>Klaus</value>
<value>Missing Link</value>
<value>American Factory</value>
<value>The Cave</value>
<value>The Edge Of Democracy</value>
<value>For Sama</value>
<value>Honeyland</value>
<value>The Neighbours Window</value> 
<value>Brotherhood</value>
<value>Nefta Football Club</value>
<value>Saria</value>
<value>A Sister</value>
<value>Star Wars: The Rise Of Skywalker</value>
<value>Bombshell</value>
<value>Maleficent: Mistress Of Evil</value>
<value>Judy</value>
<value>Harriet</value>
<value>Richard Jewell</value>
<value>Corpus Christi</value>
<value>Les Miserables</value>
<value>Learning To Skateboard In A Warzone (If You're A Girl)</value>
<value>In The Absence</value> 
<value>Life Overtakes Me</value>
<value>St. Louis Superman</value>
<value>Walk Run Cha-Cha</value>
<value>Hair Love</value>
<value>Dcera (Daughter)</value>
<value>Kitbull</value>
<value>Memorable</value>
<value>Sister</value>
<value>Rocketman</value>
<value>Breakthrough</value>
<value>Frozen II</value>
<value>Ad Astra</value>
<value>The Lighthouse</value>
<value>Avengers: Endgame</value>
<value>The Lion King</value>     
            </rule>
    <rule field="year" operator="greaterthan">
        <value>1909</value>
    </rule>
</smartplaylist>
Reply
#2
Snapped this up. saves some effort, but how about the other 90 Academy Awards Smile
Reply
#3
(2020-02-10, 17:52)PatK Wrote: Snapped this up. saves some effort, but how about the other 90 Academy Awards Smile

Your wish is my command Wink

<name>The Oscars All Time (Me being a smarty pants, thank God for cut and paste and excel</name>
  
[PatK edited a very long list and placed here]
Reply
#4
I note the last 'The Oscars All Time' list is quite large and is best broken into two parts Oscars A & B and reassembled with a third short smart playlist. Ensure both sections work to your satisfaction prior to utilizing the third.
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<smartplaylist type="movies">
    <name>Oscars of all time</name>
    <match>one</match>
    <rule field="playlist" operator="is">
        <value>Oscars A</value>
    </rule>
    <rule field="playlist" operator="is">
        <value>Oscars B</value>
    </rule>
    <order direction="descending">year</order>
</smartplaylist>
This thread deserves it's own post title, not buried {Moving.}
Reply
#5
This is very interesting! I was always interested to bring more Award information into Kodi and this was my pretty first Skin modding project at the ages where i have no idea what is a .xml file.
But i had never the idea to hardcode this in the skin!

2 Questions:
  • With this i can only read out the data "that it won at least 1 Oscar", not how many Oscars or in which category?
  • Why are the values matched to movie title? Kodi is international focussed. Only english natives or guys scraping in english can use this! A lot of effort was done that the Skin can provide an amount of languages with Transifex. Of course transifex is useless here but why not making the values with the IMDB ID? Then it's language indepentend and reproduceable for all audience!
___

My first Project was to not only get Oscars data, also to translate it to images. First attempt was to use Tags. But my Skinning skill was to less i registered very late that Tags can only be shown in DialogVideoInfo, not in views (also in Kodi Matrix).
Cause of this a conversion to images is also only possible in DialogVideoInfo.
Another con is that tagging is a lot of manual work to do and for that hard to reproduce - not for all audience!

___

My second attempt and also current concept with some extended modifications is with the SkinHelper real time Online Scraper.
If in a label or textbox just $INFO[Window(Home).Property(SkinHelper.ListItem.Awards)]
And for image conversion just in a visible condition...

For example Matrix (1999) you will get this data in textform:
Won 4 Oscars. Another 37 wins & 50 nominations.
And for image conversion on this visible condition the "won 4 Oscars" image texture will be shown.
<visible>String.Contains(Window(Home).Property(SkinHelper.ListItem.Awards),won 4 Oscars)</visible>

With this it is a easy way to also get an amout.
But OMDB data is very strict, only the highest win and its amout is explicitly stated. Everything else is "Another x wins & x nominations"
This is the Award Order:
    Oscars amount won -> everything else will be ignored -> "Another x wins & x nominations"
if no Oscars won
    Oscars amount nominated -> everything else will be ignored -> "Another x wins & x nominations"
if no Oscars won or nominated
    Golden Globes amount won -> everything else will be ignored -> "Another x wins & x nominations"
if no Golden Globees won
    Golden Globes amount nominated -> everything else will be ignored -> "Another x wins & x nominations"
if no Golden Globes won or nominated
    BAFTA Awards amount won -> everything else will be ignored -> "Another x wins & x nominations"
if no BAFTA Awards amount won
    BAFTA Awards amount nominated -> everything else will be ignored -> "Another x wins & x nominations"
if no BAFTA Awards won or nominated
    just "x wins & x nominations"
if no
    empty data

____

So implemented in the end an image transversion for Oscars, Golden Globes, BAFTA
... all double with won and nominated.
If won then image is shown as full texture if only nominated its 50% transparency.
For different views in two versions, left-winged or centered... https://i.ibb.co/3mqwb1g/Screenshot-59.png https://i.ibb.co/GT5XY4M/Screenshot-60.png


Addidionaly also added to show an image for "Academy Award for Best Picture" -> https://en.wikipedia.org/wiki/Academy_Aw...st_Picture
I made for this an own artwork type and just put a image of it in every movie it's concerning $INFO[ListItem.Art(oscarbestpicture)]
It's dirty but working  Rofl


Please no comments regarding image size and placing and design... only focus on functionality
____

Long talk short!
  • In the end i want to ged rid of the SkinHelper function cause it's
  • everytime working with a delay
  • depentend on the internet connection
  • not storaging, just caching
  • making skin slower
  • good data but more could be fine
____

Another concept was...

with the help of @sualfred Embuary Helper it is possible to make some kind of "fake InfoLables" with your own custom data in it.
It can read out .txt files and show the Text in Kodi. I just placed like Artwork Types a file called "Moviefilename-awards.txt" into it and read the data out.
It's working fine and a possibility to get rid of the SkinHelper. But in the end there are also too many cons:
lot of work
  • 1 second delay (if HDD already running)
  • always accessing files the whole time
  • making skin slower
  • not reproducable for general audience
____

But now i see here possibilities to hardcode this in the Skin.
Lets think only about the oscars now...
  • I have a few questions for that:
  • Is this possible for a language Independent solution? For example for matching with IMDB ID.
  • Is it possible to combine this or stick together (in a seperate list) with the amount of oscars won and nominated?
  • Also for the best picture of the year?
  • Let's go a step further also with the categories won/nominated?

I'm not only talking of an image conversion now, just to get the data and the possibility to stick it together.
For example to stick a sentence in a textbox together on example movie American Beauty (1999)
Won 5 Oscars in the categories: Category A, Category B, Category C, Category D, Category F
Won "value_winlist" in the categories: "value_categoryA", "value_categoryB", "value_categoryC", "value_categoryD"
or a more complete information:
Won 5 Oscars from 8 Nominations in the categories: Category A, Category B, Category C, Category D, Category F, also nomiated for Category G, Category H, Category I

If this could be skin hardcoded to be able to get extended information (one skinner will use less or more) also sticking a sentence in a textbox together then also a image conversion is no problem.
Cause the data is static and only 1 time a year new data comes in it's perfect for hardcode it in the skin.

Pros:
  • Every con of my previous solution is gone (delay, web dependency, access HDD's, skin speed)
  • This could be a "fire and forget" solution for without any work for the user
  • Data has to be only updated once a year
Cons:
  • Lot of work in first place for 1 man
  • Skin integration from the skinner (but once done then done)
  • Skin should be updated once a year (after the oscars)

People who know me here know that i am not the best coder, but a very well Content Manager.
I can collect all the Data in excel sheets and convert it in the skin, but at very first cause of lack of coding skills i really need some tips/advice, a first concept how to built this up.
Like all my project in my Signature before content it needs at first a running base code.
___

Any advice?
Reply
#6
@"chrissix" , I think your idea is great Smile

My initial thoughts on how to do this would be for some skilled Python coder (unfortunately, not me) to write an addon to do something like:

1. Read a file (updated yearly, includes IMDB ID of the movies) of source info with what movies won what Oscars, and put the info in a local db (sqlite or some such)
2. Maybe has something like a service monitor that looks up the imdbid of the currently focused item and, if it finds it in its local db, fills up home window properties with amount of awards won, which categories, so you can display this info in a skin wherever you are (not just video info dialog)

I don't know how much overhead it would create, but I don't think it would be much, given that it would not have to go online to get any info.  

I think it would have a way of running it directly, to  do things like fetch a new source file and update the db.

Anyway, that's just me thinking out loud. Smile

Regards,

Bart
Reply
#7
I know this is an old thread so not sure if anyone will see this but I put something together which may be what you are looking for. I built a json file that has all Oscar data by IMDb Id and integrated into Embuary Helper addon.

https://raw.githubusercontent.com/thacol.../oscars.py
Reply

Logout Mark Read Team Forum Stats Members Help
[split] Oscars 2020 (smartplaylist)1