Kodi Addon: metadata improvements

Thanks for this great addon, I was wondering if a few changes might be considered:

I don't see another thread related to issues/additions to this addon, so I am posting here.

First, I am using kodi JSON to gather details from the pvr (for a kodi addon related to PVR in general that I am working on) where I see missing data:

http://127.0.0.1:8080/jsonrpc?request={
"jsonrpc": "2.0",
"id": 1,
"method": "PVR.GetBroadcasts",
"params": {"channelid": 35, "properties": ["thumbnail","episodename","title","plot","runtime","year","isseries","cast","genre","director"]}
}

  1. For movies, I see that "title" includes the year, could this be adjusted to not include the year and instead use the "year" EPG tag setting:

SetYear()

  1. There is a series flag (isseries in JSON above), which seems to be set even for movies, could this be fixed:

Per: Kodi Development: enum EPG_TAG_FLAG

EPG_TAG_FLAG_IS_SERIES

  1. Optional (but more details are always welcome), add:

SetDirector()
SetCast()

Thanks again and have a wonderful holiday weekend!

1 Like

Thanks for documenting this. I am taking a look now.

We should only be adding this for TV shows from what I can tell. Are you seeing this incorrect behavior on OTA/TVE recordings, or ones from a different source?

Fixed in latest build:

Thanks for all the extra metadata.

for the isseries data (am looking directly in Kodi EPG DB and related code, it looks like it maybe an issue on Kodi side. I will investigate further and let you know what I find.

The rest of the data looks great now, thank you!

Thanks. I think I managed to remove isseries for all movies, but let me know if you still see something wrong.

I did flush and reload all EPG data using the new repo version.

RE: Kodi Development: class PVREPGTag

Are you setting "Episode part number" to -1 for Movies?
(looked in Kodi code, and it has check on "Series number", "Episode number" and "Episode part number" to all be -1, else it flags "isseries" as "True")

As for movie Year, you are setting the "Year"?
(I do see "First Aired" , but not "Year" data in the Kodi DB)
If so, maybe Kodi is seeing the "Episode part number" above and forcing Year to 0 (will need to look deeper when I have time).

Okay, I was not setting episode part number so maybe that's the problem.

No looks like I forgot to do it for EPG.

Both issues fixed in next build.

Running Kodi version 2021.12.31.0221

Seems some movies are still not getting year (and "Episode part number" set correctly).

This is from the same channel, 2 different movies as seen via JSON call to Kodi:

{
"broadcastid": 7455,
"cast": "Elizabeth Taylor,Richard Burton,Rex Harrison",
"director": "Joseph L. Mankiewicz",
"episodename": "",
"genre": [
"Historical drama"
],
"isseries": true,
"label": "Cleopatra",
"plot": "The queen of Egypt (Elizabeth Taylor) loves Caesar (Rex Harrison) and Mark Antony (Richard Burton).",
"runtime": 255,
"thumbnail": "https://tmsimg.fancybits.co/assets/p2551_v_v8_ac.jpg?w=480&h=720",
"title": "Cleopatra",
"year": 0
},
{
"broadcastid": 7456,
"cast": "Richard Burton,Jean Simmons,Victor Mature",
"director": "Henry Koster",
"episodename": "",
"genre": [
"Historical drama"
],
"isseries": false,
"label": "The Robe",
"plot": "Christ's robe links tribune (Richard Burton), lover (Jean Simmons) and slave (Victor Mature).",
"runtime": 135,
"thumbnail": "https://tmsimg.fancybits.co/assets/p203_v_v8_ab.jpg?w=480&h=720",
"title": "The Robe",
"year": 1953
},

  In the Kodi EPG DB, "Cleopatra" does not have a "Year" and "Episode part number" is zero, while "The Robe" correctly has "Year" and  "Episode part number" is -1

Hmm, not sure why it would work for some movies and not others.

Can you find the original json for those from the DVR's guide payload?

Hm, looks like there is some duplication in Kodi DB (maybe cached older data). Let me blow away the actual database, and reload to see if there is actually still an issue. Thanks.

1 Like

Looks like it was a Kodi issue. The settings to clear data apparently did not work and there were duplicate entries. So I blew away the DB manually, and let it reload and so far the data looks good now. I'll consider this solved. Thanks, and enjoy 2022!

2 Likes

Did you delete the entire Kodi data folder or were you able to delete something specific to the Channels DVR add-on? Thanks.

I strategically deleted just the Epg13.db in userdata/Database , Kodi then notices this and auto rebuilds with fresh data from the PVR on next startup. So this was a surgical strike, with no affect on other Kodi DBs :slight_smile:

1 Like

Thanks. It looks much better now. Thanks @tmm1 too of course.

1 Like