WIP Ember Media Manager 1.4.8.0 ALPHA - Discussion Thread
(2017-04-07, 23:02)axlt2002 Wrote:
(2017-04-07, 19:11)DanCooper Wrote:
(2017-04-07, 18:04)axlt2002 Wrote: Hi Dan,

It is me again...Angel

I'm actually putting my hands on the Rate Update add-on in order to extend it to update also the TV Show Episodes rating and votes (actually, in fact, rating and votes are updated only at the TV Show level). The add-on uses IMDd site as source and thereore the knowledge of the IMDd id of the Movie/TV Show/Episode (e.g. tt3429842) is fundamental to have an efficient management, especially in case of huge collections. You would actually asking yourself what can EMM do in relation to this...well, as a starting point, EMM stores the IMDb id for all the mentioned contents; the point is that it uses "proprietary" tags.

The format used by Kodi to save the ids for a Movie is completely aligned with the one used by EMM:

Kodi format
Code:
<id>tt2245084</id>
<uniqueid type="unknown" default="true">tt2245084</uniqueid>

EMM format
Code:
<id>tt2245084</id>
<tmdb>12144</tmdb>

Passing to the TV Show and Episode the way how the ids are saved changes; while Kodi uses the same format of a Movie (id and uniqueid), EMM does as reported hereafter:

EMM format for TV Show
Code:
<id>305288</id>
<imdb>tt4574334</imdb>
<tmdb>66732</tmdb>

EMM format for Episode
Code:
<uniqueid>5468124</uniqueid>
<imdb>tt4593118</imdb>
<tmdb>1198665</tmdb>

Would it be possible to have implemented the same approach used for a Movie also for TV Show and Episode (i.e. use <id> to save the IMDb id and <tmdb> to save the TMDB id; the latter will be anyway ignored by Kodi)?

This request is because the add-on uses the field <id> retrieved from the Kodi Movie/TV Show libraries. At the first run, since the IMDb id is practically not available (being stored in the field <imdb> that Kodi does not store), it performs an exhaustive search on the IMDb site based on the TV Show title, taking some time, providing a window to select the correct TV Show and, finally, store in a local database the IMDb id paired with the <id>. You can imagine what this would be in case of Episodes...

I really hope you can make such modifications. I don't think it will imply some issue on EMM side. Please send me a PM in case you would like to share with me a test .exe of EMM so that I will be able to progress on the add-on code.

Looking forward for your collaboration.

Hi

I think that would not work proper in this way. There are some points that have to be changed for a perfect solution:

Kodi always use the ID of the selected scraper (depending on source settings) as <id>. In case of tv shows in most cases that whould be the TVDB ID, not the IMDB ID. For movies it is the IMDB ID, even if you use the TMDB scraper. I think that has been manually set in scraper since IMDB is the biggest and most popular source for movies.

Since Kodi 17 it's possible to save more than one ID for each movie/tv show/episode. There is a table named uniqueid that contains all known IDs. ATM Kodi save only one ID per media, also without any specification of the ID source (type it's always unknown). I'm already working on changes on Embers DB to save all the IDs as separate nodes in NFO like this:
Code:
<id>121361</id>
<uniqueid type="imdb">tt0944947</uniqueid>
<uniqueid type="tmdb">1399</uniqueid>
<uniqueid type="tvdb" default="true">121361</uniqueid>

I don't know why Kodi does not save the type even the Kodi scrapers has been used... I think that should be fixed.
Also there is no field in Kodis DB to set the field default. I've no idea how that will be worked.

Your addon should be use this table to check if there is an ID with type=imdb. If no ID has been found, run a search by title.


But the bigger and most crappy problem is that:
"SpongeBob SquarePants" as example has different episode numbering on TVDB/TMDB and IMDB:
TVDB & TMDB:
S01E01 Help Wanted 1999-05-01
S01E02 Reef Blower 1999-05-01
S01E03 Tea at the Treedome 1999-05-01

IMDB:
S01E01 Help Wanted / Reef Blower / Tea at the Treedome 1999-05-01

So there is no way to get a proper rating or other information from IMDB. For this reason TVDB has not saved the IMDB IDs for this epsiodes.
We have the same issue in Ember: if no IMDB is known, the IMDB scraper search be tv shows IMDB ID and search the episode by episode number on the IMDB website... with the result, that the result will no be mapped correctly and of this case will be wrong.


To summarize everything:
- I will use the new <uniqueid> node to save all known IDs
- for movies the <id> node will be the IMDB ID
- for tv shows the <id> node will be the TVDB ID as default

Thanks Dan for your usual availabilty and really clear way to explain the things. I understand now the rationale behind the actual behaviour of the add-on.

The only thing that is not completely celar to me is when you say "Your addon should be use this table to check if there is an ID with type=imdb"...are all the ids saved in the Kodi Library in Kodi 17? If I use the JSON command VideoLibrary.GetTVShows, Am I able to retrieve all of them or still only the "default" id? In fact the point is that the add-on checks the Kodi library and not the .nfo files.

More in general, I think that if a user makes use of EMM, he usually "combines" in some way the information coming from the different sites. In addition to that, he most probably (at least 99%) will not use an internal Kodi scraper afterwards...so that the value stored in <id> is quite not significant from a Kodi perspective. Therefore it should be available the possiblity to decide which id to use in <id> between the ones available. Do you think it is something that you can add as an option?

About the Episodes, the case you reported is without solution in fact; and we can not do anything for that. But having in general the possibility to use the IMDd id as the <id>, it will be really an advantage to search for them and retreive the interested data (please note that here we are talking about a specific task such as update the rating and votes only that is something that TVDB does not provide in a consistent number). The point here is also that if I have the Episode title in italian, is impossible to search for it on IMDb...the IMDB id is the solution...but if I can not retrieve it from the Kodi library, I'm just stuck! So that the question I asked in the previous paragraph...

Have a nice evening.

Yes, the uniqueid table is a part of the Kodi DB. I've tested it with a new NFO that contains multiple <uniqueid> nodes:

Call:
Code:
http://localhost:8080/jsonrpc?request={"jsonrpc":"2.0","id":"1","method":"VideoLibrary.GetTVShowDetails", "params": {"properties": ["uniqueid"], "tvshowid":10}}

Result:
Code:
{"id":"1","jsonrpc":"2.0","result":{"tvshowdetails":{"label":"Game of Thrones","tvshowid":10,"uniqueid":{"imdb":"tt0944947","unknown":"121361"}}}}

As you can see, the API tells you all saved IDs.

EDIT: tested with Kodi 17.1.
German Ember Media Manager Support

Daily Builds - Link
Latest official Ember-MM version - Ember Media Manager 1.4.x
Reply
 
Thread Rating:
  • 2 Vote(s) - 5 Average


Messages In This Thread
RE: Ember Media Manager 1.4.8.0 ALPHA - Discussion Thread - by DanCooper - 2017-04-08, 13:48
nfo file status? - by NightMyst - 2017-06-21, 07:24
Audio metadata error - by Doomnie - 2017-11-04, 08:16
EmberMM Import Poster.jpg - by MePoEmberMM - 2018-02-06, 01:27
User rating sync - by fred_gaou - 2018-04-28, 22:25
database is locked - by gorb - 2019-08-19, 11:41


Logout Mark Read Team Forum Stats Members Help
Ember Media Manager 1.4.8.0 ALPHA - Discussion Thread52