Help with IDs and Ratings please...

Any questions? Need some help?
Post Reply
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Help with IDs and Ratings please...

Post by ca81 »

Hi,

My current goal is to get individual episode ratings and movie ratings from IMDB for my media files.
  1. @rednoah has mentioned previously that episode ratings are not supported viewtopic.php?t=3080

    Playing around with FileBot GUI (ver4.9.1), I recently got it to display individual episode ratings using the code

    Code: Select all

    {episode.info.rating}
    but I am not able to figure out where (as in TVDB, IMDB, TMDB, etc.) these episode ratings are coming from :( ...Can someone please help understand if this piece of code is actually giving me individual episode level ratings and if so then from where?? And can we change the source to IMDB?
  1. I am trying the following bits of code

    Code: Select all

    {id}, {tmdbid}, {imdbid}, {omdbid}, 
    and only the {id} seems to work while all else give me a blank. Could anyone please guide me on what is wrong here?
thanks,
~kg

ps: Apologies for repeating #1 in the list as I am unable to figure out how to get a numbered list to work properly in the forum comments :(
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help with IDs and Ratings please...

Post by kim »

Looks like "{episode.info.rating}" is only "working" on TVDB... BUT I think this will always return "0.0" aka no support or not working on TVDB now ?

episode id

Code: Select all

{episode.info.id}
btw: I have made a custom AMC script that does support episodes (rating and more)
viewtopic.php?f=4&t=5451&p=31192#p31191
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

Below is the bits of code that I am using:
{id}, {tmdbid}, {imdbid}, {omdbid},
{info.certification.replace('-':'')}-{episode.info.rating},
{rating},
The above code gives the below output for the TV series 'The Night Manager':
https://imgur.com/CV6Wvl5

After the 'certification' i.e. TV14, I am getting individual episode ratings i.e. 8.2, 8.2, 8.0, 8.2, 8.0, 8.4 while the overall series rating of 8.5 is also shown for each episode. Where are these individual ratings coming from is what's confusing me :?
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help with IDs and Ratings please...

Post by kim »

You are using GUI -> Episode Mode -> TheTVDB ?
then data from TVDB

this show IS the episode rating, but i think i remember some things breaking (not working) from a date year(s) ago aka only old data works

btw: you can test with e.g.

Code: Select all

{episode.info.id}
=5364427
https://thetvdb.com/series/the-night-ma ... es/5364427

or

Series:

Code: Select all

{votes}
Episode:

Code: Select all

{episode.info.votes}
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

kim wrote: 10 Sep 2020, 18:50 Looks like "{episode.info.rating}" is only "working" on TVDB... BUT I think this will always return "0.0" aka no support or not working on TVDB now ?

episode id

Code: Select all

{episode.info.id}
btw: I have made a custom AMC script that does support episodes (rating and more)
viewtopic.php?f=4&t=5451&p=31192#p31191
Thanks {episode.info.rating} seems to for TVDB and if I add {episode.info.id} to my code then I get the below:
https://imgur.com/Rp3uFxJ and I don't know if these episode id's are from TVDB coz am unable to find them on the website :(

regarding your custom script (viewtopic.php?f=4&t=5451&p=31192#p31191), I am n00b at coding and will need to spend a decent time to understand it. Would it be ok, if I PM you in case I have any confusion?

thanks,
~kg
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

kim wrote: 10 Sep 2020, 19:14 You are using GUI -> Episode Mode -> TheTVDB ?
then data from TVDB
Yes, I am using the GUI -->Episode mode-->The TVDB.
Thanks for pointing out the simple logic that is using The TVDB then results will be from there only :lol:
kim wrote: 10 Sep 2020, 19:14 this show IS the episode rating, but i think i remember some things breaking (not working) from a date year(s) ago aka only old data works

btw: you can test with e.g.

Code: Select all

{episode.info.id}
=5364427
https://thetvdb.com/series/the-night-ma ... es/5364427
thanks again!!! ....I did not think about using the episode id directly in the URL and was scrolling up/down the webpage to try and find the episode id :P
Also, is there anyway to get these rating from IMDB instead of TVDB ??
kim wrote: 10 Sep 2020, 19:14 Series:

Code: Select all

{votes}
Episode:

Code: Select all

{episode.info.votes}
will try this to see what comes up.

thanks,
~kg
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help with IDs and Ratings please...

Post by kim »

You better start here:
Automated Media Center aka AMC

default AMC script is ONLINE (cant change)

my version need to be local path

No PM, if you don't know something, then others properly need same info = forum
(all info should be in the forum, just search)

btw: amc is only for making the nfo files and getting images via command line
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

kim wrote: 10 Sep 2020, 19:40 You better start here:
Automated Media Center aka AMC

default AMC script is ONLINE (cant change)

my version need to be local path
thanks!!, will check this out.
kim wrote: 10 Sep 2020, 19:40 No PM, if you don't know something, then others properly need same info = forum
(all info should be in the forum, just search)
valid point. No PM
kim wrote: 10 Sep 2020, 19:40 btw: amc is only for making the nfo files and getting images via command line
nfo files..hmm. Don't know what nfo files are or what they are used for....another area to read up on :)

thanks,
~kg
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help with IDs and Ratings please...

Post by kim »

nfo = files with movie/series/episode info used by e.g. KODI and PLEX

nfo sample:
https://kodi.wiki/view/NFO_files/TV_shows
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with IDs and Ratings please...

Post by rednoah »

{episode.info} will give you the extended Episode metadata (i.e. additional network request) based on {episode.id} (i.e. unique episode id) and {episode.seriesInfo} (i.e. database and unique series id). {episode.info} is thus based on TheTVDB information, assuming that {episode} is based on TheTVDB information. Additionally, {episode.info} extended Episode metadata is currently only supported for TheTVDB, and will simply be undefined if a different database is chosen.


:!: TheTVDB used to allow users rate TV Shows and Episodes on a scale from 1 to 10 stars. This feature has since been removed from the website. But the API is still returning valid values for these fields. Frozen in time in the database because the website doesn't allow you to vote for things anymore.
:idea: Please read the FAQ and How to Request Help.
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

@kim/rednoah - Thanks a ton for your help & guidance.

I have modified my code snippet to:

Code: Select all

{(episode.info.rating==0.0) ? {omdb.rating} : {episode.info.rating}}
and my understanding is that this is giving me the episode ratings from TheTVDB in case any exist and if none exist then it gives me the omdb rating for the overall series.

n hoping that TheTVDB again starts to allow everyone to rate TV Shows and Episodes :)

peace,
~kg
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with IDs and Ratings please...

Post by rednoah »

{...} doesn't quite work the way you think it does:
viewtopic.php?t=1895


Here's how I'd write it:

Code: Select all

{ episode.info.rating > 0 ? episode.info.rating : omdb.rating }
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: Help with IDs and Ratings please...

Post by kim »

when did you add TV support to omdb ?

btw: omdb (imdb) is ALWAYS better for episodes then all the others
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with IDs and Ratings please...

Post by rednoah »

If the TheTVDB series record has an IMDb ID, then we can request rating information from OMDb as if it was a movie.
:idea: Please read the FAQ and How to Request Help.
ca81
Posts: 29
Joined: 14 Dec 2019, 20:08

Re: Help with IDs and Ratings please...

Post by ca81 »

rednoah wrote: 11 Sep 2020, 14:55 {...} doesn't quite work the way you think it does:
viewtopic.php?t=1895

Here's how I'd write it:

Code: Select all

{ episode.info.rating > 0 ? episode.info.rating : omdb.rating }
Thanks @rednoah, will use your code snippet.
I went through the thread viewtopic.php?t=1895 but am unable to figure out the correct method of use for {...} :(. Guess I will need to read up on this in more detail and try out different permutations/combinations to understand how it works.

On a slightly separate note, I use the FileBot GUI and in its format editor I am unable to add comments. I have tried both // and /* along with */ as mentioned here: http://docs.groovy-lang.org/next/html/d ... ne_comment but somehow these don't seem to work :( Can someone please advise how it can be done or what I am doing wrong?

The commenting options that I tried along with their output: 1) https://imgur.com/xvAyuNR 2) https://imgur.com/2im80NE

thanks,
~kg
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with IDs and Ratings please...

Post by rednoah »

You can use Groovy comments, but only in Groovy code sections. The outer-most {...} delimitate Groovy code. Everything else, before after or in between, is a literal part.

e.g.

Code: Select all

/this/is/a/literal/part
{ /* Groovy begins here */
	// this is a groovy comment		
	episode.info.rating > 0 ? episode.info.rating : omdb.rating
/* Groovy code ends here */ }
/another/literal/part
:idea: Please read the FAQ and How to Request Help.
Post Reply