2022-12-05, 22:07
ListItem Helper for Kodi 17 (Krypton) · 18 (Leia) · 19 (Matrix) · 20 (Nexus) · 21 (Omega) · 22 (Piers)
A very lightweight Service which provides
1) Values from OMDb/TMDb/MDBlist API and Kodi database (Ratings (Rotten Tomatoes, Letterboxd, Trakt, Metacritic, IMDb) and some additional values like budgets, revenues and awards) [for Movies]
2) Validation of ListItem.IMDBNumber with automatic correction functionality [for Movies]
3) Simple Image blurring functionality
DOWNLOAD via axbmcuser repo @ Services -> ListItem Helper
>>>> repository.axbmcuser.zip <<<<
! Entering OMDb/TMDb/MDBList API keys in the configuration dialog is required.
____________________________________________________________________________
Property names (home):
ListItemHelper.rating.rottentomatoes.percent
ListItemHelper.rating.rottentomatoes.image
ListItemHelper.rating.rottentomatoes.url
ListItemHelper.rating.rottentomatoes.audience
ListItemHelper.rating.metacritic.percent
ListItemHelper.rating.imdb.percent
ListItemHelper.rating.imdb
ListItemHelper.rating.imdb.votes
ListItemHelper.rating.letterboxd
ListItemHelper.rating.letterboxd.percent
ListItemHelper.rating.letterboxd.votes
ListItemHelper.rating.trakt
ListItemHelper.rating.trakt.percent
ListItemHelper.rating.trakt.votes
ListItemHelper.rating.highestScaleTo5
ListItemHelper.rating.highestScaleTo10
ListItemHelper.rating.highestScaleTo100
ListItemHelper.awards
ListItemHelper.budget
ListItemHelper.budget.million
ListItemHelper.budget.formatted
ListItemHelper.revenue
ListItemHelper.revenue.million
ListItemHelper.revenue.formatted
ListItemHelper.revenue.boxoffice
ListItemHelper.DBID
ListItemHelper.IMDBNumber
ListItemHelper.IMDBNumber.isValid
ListItemHelper.IMDBNumber.corrected
ListItemHelper.IMDBNumber.corrected.isValid
ListItemHelper.TMDBID
ListItemHelper.TVDBID
ListItemHelper.ageRating.commonsense
ListItemHelper.studio.1 (up to .50)
ListItemHelper.genre.1 (up to .50)
ListItemHelper.writer.1 (up to .50)
ListItemHelper.director.1 (up to .50)
Local ratings from Kodi database:
ListItemHelper.listitem.rating.tomatometerallcritics
ListItemHelper.listitem.rating.tomatometerallcritics.scaleTo100
ListItemHelper.listitem.votes.tomatometerallcritics
ListItemHelper.listitem.rating.rottentomatoes
ListItemHelper.listitem.rating.rottentomatoes.scaleTo100
ListItemHelper.listitem.votes.rottentomatoes
ListItemHelper.listitem.rating.tomatometerallaudience
ListItemHelper.listitem.rating.tomatometerallaudience.scaleTo100
ListItemHelper.listitem.votes.tomatometerallaudience
ListItemHelper.listitem.rating.metacritic
ListItemHelper.listitem.rating.metacritic.scaleTo100
ListItemHelper.listitem.votes.metacritic
ListItemHelper.listitem.rating.metascore
ListItemHelper.listitem.rating.metascore.scaleTo100
ListItemHelper.listitem.votes.metascore
ListItemHelper.listitem.rating.imdb
ListItemHelper.listitem.rating.imdb.scaleTo100
ListItemHelper.listitem.votes.imdb
Example:
For use with other containers like home screen widgets set the following properties when the container is focused:
(home) ListItemHelper.WidgetContainerId
to the container ID (Example: 8000)
(home) ListItemHelper.WidgetContainerWindowName
to the window name where the container resides (Example: home)
Important remarks:
- Unset the WidgetContainer-properties when leaving focus from the container/widget.
____________________________________________________________________________
Usage of image blurring functionality:
Add this to your window - just as an example.
Required parameters:
- "action=blurimg"
- "file" Source image which you intend to blur
- "prop" property value name where the blurred image will be accessible afterwards (see example below)
Optional parameters:
- "radius" (optional) Default radius (blurring intensity), defaults to 4 if not provided. I medium-strong blur corresponds to a value of like ~20 at the time of writing.
- "saturation" (optional) If a value is provied, 1 results in no saturation change. A value lower than 1 desaturates, a value above 1 results in stronger saturation.
- "force" (optional) If provided and set to "True", the image blurring is forced, even if a cached image is found. Useful in situations where the source file changed and you want to force a refresh.
You can access the blurred image afterwards with:
____________________________________________________________________________
Usage of ListItem.IMDBNumber validation and correction functionality:
ListItem.IMDBNumber (sometimes wrongly scraped with TMDB ID) automatically gets validated for correct IMDB ID format.
Example 1:
Example 2:
____________________________________________________________________________
Known Skins which use the service:
A Confluence ZEITGEIST (Thread)
____________________________________________________________________________
Example usage of OMDb/TMDb/MDBList API + image blurring:
____________________________________________________________________________
This addon may partly contain forked code of the following addons:
- script.toolbox by phil65
- script.module.metadatautils by marcelveldt and others
- script.embuary.helper by sualfred
which has been either replaced, rewritten, expanded, changed and/or massively stripped down for fast execution and minimal functionality.
Many thanks to the above authors and all other contributors.
____________________________________________________________________________
A very lightweight Service which provides
1) Values from OMDb/TMDb/MDBlist API and Kodi database (Ratings (Rotten Tomatoes, Letterboxd, Trakt, Metacritic, IMDb) and some additional values like budgets, revenues and awards) [for Movies]
2) Validation of ListItem.IMDBNumber with automatic correction functionality [for Movies]
3) Simple Image blurring functionality
DOWNLOAD via axbmcuser repo @ Services -> ListItem Helper
>>>> repository.axbmcuser.zip <<<<
! Entering OMDb/TMDb/MDBList API keys in the configuration dialog is required.
____________________________________________________________________________
Property names (home):
ListItemHelper.rating.rottentomatoes.percent
ListItemHelper.rating.rottentomatoes.image
ListItemHelper.rating.rottentomatoes.url
ListItemHelper.rating.rottentomatoes.audience
ListItemHelper.rating.metacritic.percent
ListItemHelper.rating.imdb.percent
ListItemHelper.rating.imdb
ListItemHelper.rating.imdb.votes
ListItemHelper.rating.letterboxd
ListItemHelper.rating.letterboxd.percent
ListItemHelper.rating.letterboxd.votes
ListItemHelper.rating.trakt
ListItemHelper.rating.trakt.percent
ListItemHelper.rating.trakt.votes
ListItemHelper.rating.highestScaleTo5
ListItemHelper.rating.highestScaleTo10
ListItemHelper.rating.highestScaleTo100
ListItemHelper.awards
ListItemHelper.budget
ListItemHelper.budget.million
ListItemHelper.budget.formatted
ListItemHelper.revenue
ListItemHelper.revenue.million
ListItemHelper.revenue.formatted
ListItemHelper.revenue.boxoffice
ListItemHelper.DBID
ListItemHelper.IMDBNumber
ListItemHelper.IMDBNumber.isValid
ListItemHelper.IMDBNumber.corrected
ListItemHelper.IMDBNumber.corrected.isValid
ListItemHelper.TMDBID
ListItemHelper.TVDBID
ListItemHelper.ageRating.commonsense
ListItemHelper.studio.1 (up to .50)
ListItemHelper.genre.1 (up to .50)
ListItemHelper.writer.1 (up to .50)
ListItemHelper.director.1 (up to .50)
Local ratings from Kodi database:
ListItemHelper.listitem.rating.tomatometerallcritics
ListItemHelper.listitem.rating.tomatometerallcritics.scaleTo100
ListItemHelper.listitem.votes.tomatometerallcritics
ListItemHelper.listitem.rating.rottentomatoes
ListItemHelper.listitem.rating.rottentomatoes.scaleTo100
ListItemHelper.listitem.votes.rottentomatoes
ListItemHelper.listitem.rating.tomatometerallaudience
ListItemHelper.listitem.rating.tomatometerallaudience.scaleTo100
ListItemHelper.listitem.votes.tomatometerallaudience
ListItemHelper.listitem.rating.metacritic
ListItemHelper.listitem.rating.metacritic.scaleTo100
ListItemHelper.listitem.votes.metacritic
ListItemHelper.listitem.rating.metascore
ListItemHelper.listitem.rating.metascore.scaleTo100
ListItemHelper.listitem.votes.metascore
ListItemHelper.listitem.rating.imdb
ListItemHelper.listitem.rating.imdb.scaleTo100
ListItemHelper.listitem.votes.imdb
Example:
Code:
$INFO[Window(home).Property(ListItemHelper.budget.million)]
For use with other containers like home screen widgets set the following properties when the container is focused:
(home) ListItemHelper.WidgetContainerId
to the container ID (Example: 8000)
(home) ListItemHelper.WidgetContainerWindowName
to the window name where the container resides (Example: home)
Important remarks:
- Unset the WidgetContainer-properties when leaving focus from the container/widget.
____________________________________________________________________________
Usage of image blurring functionality:
Add this to your window - just as an example.
Code:
<onload condition="System.hasAddon(service.listitem.helper)">RunScript(service.listitem.helper,action=blurimg,file='"$VAR[SomeVarWithMyImageToBlur]"',prop=dialogvideoinfo_test_blur,radius=20)</onload>
Required parameters:
- "action=blurimg"
- "file" Source image which you intend to blur
- "prop" property value name where the blurred image will be accessible afterwards (see example below)
Optional parameters:
- "radius" (optional) Default radius (blurring intensity), defaults to 4 if not provided. I medium-strong blur corresponds to a value of like ~20 at the time of writing.
- "saturation" (optional) If a value is provied, 1 results in no saturation change. A value lower than 1 desaturates, a value above 1 results in stronger saturation.
- "force" (optional) If provided and set to "True", the image blurring is forced, even if a cached image is found. Useful in situations where the source file changed and you want to force a refresh.
You can access the blurred image afterwards with:
Code:
$INFO[Window(home).Property(dialogvideoinfo_test_blur)
____________________________________________________________________________
Usage of ListItem.IMDBNumber validation and correction functionality:
ListItem.IMDBNumber (sometimes wrongly scraped with TMDB ID) automatically gets validated for correct IMDB ID format.
Example 1:
Code:
- ListItem.IMDBNumber is valid right away
- ListItem.IMDBNumber, (home) ListItemHelper.IMDBNumber and (home) ListItemHelper.IMDBNumber.corrected will all contain the same valid IMDB ID value.
- (home) ListItemHelper.IMDBNumber.isValid and (home) ListItemHelper.IMDBNumber.corrected.isValid will return "True"
Example 2:
Code:
- ListItem.IMDBNumber is invalid due to scraping and contains a TMDB ID
- ListItem.IMDBNumber and (home) ListItemHelper.IMDBNumber will contain the invalid TMDB ID
- (home) ListItemHelper.IMDBNumber.IsValid will return "False"
- service.listitem.helper will query KODI Database via JSON to see if a uniqueid('imdb') and uniqueid('unknown') with valid IMDB ID format is present
- Assuming the query is successful (most likely the case)
- (home) ListItemHelper.IMDBNumber.corrected will contain the corrected valid IMDB ID value from KODI Database found via uniqueid.
- (home) ListItemHelper.IMDBNumber.corrected.isValid will return "True"
____________________________________________________________________________
Known Skins which use the service:
A Confluence ZEITGEIST (Thread)
____________________________________________________________________________
Example usage of OMDb/TMDb/MDBList API + image blurring:
____________________________________________________________________________
This addon may partly contain forked code of the following addons:
- script.toolbox by phil65
- script.module.metadatautils by marcelveldt and others
- script.embuary.helper by sualfred
which has been either replaced, rewritten, expanded, changed and/or massively stripped down for fast execution and minimal functionality.
Many thanks to the above authors and all other contributors.
____________________________________________________________________________