Kodi DB Assistance: uniqueid table
#1
In my Kodi's uniqueid table most movie records with value field having tt% have 'imdb' in type field, which make sense.
However about 5% of the tt% records have type 'tmdb'. Is this an anomaly and they should have 'imdb' type?

I'm trying to determine which movie sets have duplicate movies, so trying to make sense of uniqueid table.
Reply
#2
(2022-08-06, 18:50)Taipan12 Wrote: Is this an anomaly and they should have 'imdb' type?

No, it is a table with combined content. Meaning the media_id field can refer to at least a tvshow, tv episode, movie or music_video.
Got a Kodi problem? Provide a full Debug log (wiki) | Usefull pages: First time user (wiki) | Troubleshooting (wiki) | Free content (wiki) | Forum rules (wiki) | VPN policy (wiki)
Reply
#3
I know this table has combined content. My question  refers  only to media_type = 'movie' records.
Within these media_type='movie'  records there are records with value field that begins with 'tt', which I know is an imdb id.
However for some of these records the scraper (type field) is set to 'tmdb', and for these records only I ask if this is an anomaly,
as tmdb has numeric IDs, not ones that begin with 'tt'.
Reply
#4
(2022-08-06, 18:50)Taipan12 Wrote: However about 5% of the tt% records have type 'tmdb'. Is this an anomaly and they should have 'imdb' type?
Yes, this is an anomaly.
ttxxxx belongs to IMDB only.
How have you added the affected entries to your library? Did you use NFO files or scraper. Are they recent additions or older entries?
If you type the ttxxxx string into the IMDB search box, is it the correct movie?
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#5
I usually scan through the scraper. It is set to tmdb. Only when it doesn't match the movie I use an nfo. 
I already fixed the anomalies so can't answer regarding the past, but I added a new movie today,
scanned it through the scraper, and it added two records to uniqueid table:
value = 'tt14549466' in both
one record with 'imdb' type, and one with 'tmdb' type.
Reply
#6
One more thing that may assist finding the cause:
movies.c09 = 110010

and in the uniqueid table:
uniqueid_id = 110010 where type = 'imdb'
uniqueid_id = 110011 where type = 'tmdb'. this uniqueid_id is orphan (no match for it in the movies table)

Just to add the reason for all my questions: I have many user-managed movie sets that include duplicates of the same movie (with various resolution or dubbing).
Many of these sets have no description, so when browsing the movies list I can't read the plot in these movies/sets without having to enter the movie set, which is inconvenient.
So for sets that include only copies of the same movie, I am trying to develop an SQL that will copy the movie plot to the set description.
First step for that is to identify which sets include only duplicates of the same movie, hence using the uniqueid table. 
If anyone thinks of a better way to do it I will glad to hear.
Reply
#7
(2022-08-07, 08:55)Taipan12 Wrote: uniqueid_id = 110010 where type = 'imdb'
uniqueid_id = 110011 where type = 'tmdb'. this uniqueid_id is orphan (no match for it in the movies table)
Nope it is not orphan. You are misunderstanding the table.
Each uniqueID in the UniqueID table is linked to a movie, tv show or episode.
One of those UniqueID's has to be marked as default. The ID that appears in the movie table, or tv show table or episode table is the default ID. The other ID's are extras, and are there and accessible for addons to use, like the WatchedList addon, LightIMDB addon and others.
The more ID's you have, the better chance that addons and other library functions work better. But a default ID is always required.

Now that I explained that, do you think there is still a problem with ttxxxx being used in two locations? If yes, delete that movie, rescrape it and provide a Debug Log that captures it.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#8
OK, I get the uniqueid_id field logic, thank you.

I deleted the movie and re-added it through scanning and again two UniqueID raws:
1st UniqueID raw: uniqueid_id=110014, value='tt14549466', type='imdb'
2nd UniqueID raw: uniqueid_id=110015, value='tt14549466', type='tmdb'

Debug log: gicidiloru.kodi (paste)
Reply
#9
(2022-08-07, 12:52)Taipan12 Wrote: Debug log: gicidiloru.kodi (paste)
Yep, I can see the duplication. Easy fix.
You are using a dead scraper. It has not been updated for a very long time and is no longer in our repository.
Change to movie scraper no 7... https://forum.kodi.tv/showthread.php?tid=363391
That should fix the problem
https://kodi.wiki/view/Changing_Scrapers
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki) || Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply
#10
Done, thank you!
Reply
#11
Thread moved to general scraping, as it is a support request.
|Banned add-ons (wiki)|Forum rules (wiki)|VPN policy (wiki)|First time user (wiki)|FAQs (wiki) Troubleshooting (wiki)|Add-ons (wiki)|Free content (wiki)|Debug Log (wiki)|

Kodi Blog Posts
Reply



Logout Mark Read Team Forum Stats Members Help
Kodi DB Assistance: uniqueid table0
This forum uses Lukasz Tkacz MyBB addons.