add-ons / plugin.video.vrt.nu

Kodi add-on to watch content from VRT MAX
https://www.facebook.com/groups/kodivlaanderen
GNU General Public License v3.0
110 stars 20 forks source link

Playing a program by airdate doesn't add the program info to the metadata #380

Closed michaelarnauts closed 5 years ago

michaelarnauts commented 5 years ago

Describe the bug

When playing a program with the airdate api, the program info isn't filled in. The title is just .mpd.

Since we can get the program from the epg, I assume we can fill in the stream details? Ofcourse, we we are using the subclip functionality, we can't do this.

To Reproduce

Steps to reproduce the behavior:

  1. Go to plugin://plugin.video.vrt.nu/play/airdate/een/2019-07-11T19:40:00/2019-07-11T20:00:00
  2. This will play "Dagelijkse kost", but without metadata. The title is just .mpd
michaelarnauts commented 5 years ago

Just noticed. .mpd is used when playing trough RunPlugin, and nothing is used when playing trough PlayMedia.

michaelarnauts commented 5 years ago

@mediaminister you'll know best about this issue :)

mediaminister commented 5 years ago

Metadata is not yet implemented in the airdate function.

The airdate function is indeed based on EPG data, but this is very limited: https://www.vrt.be/bin/epg/schedule.2019-07-11.json Maybe we can add a title and image, but the airdate function works differently compared to the normal GUI listitems. When using RunPlugin we directly send the stream url to Kodi Player, when using PlayMedia we use setResolvedUrl.

The subclip functionality works as a fallback for a missing url in the EPG, so we can always add a program title.

We also can request more data at https://vrtnu-api.vrt.be/search?i=video if we use the whatson.id from the EPG data.

I'll look into this.

mediaminister commented 5 years ago

I implemented a proof of concept of this in https://github.com/mediaminister/plugin.video.vrt.nu/tree/metadata

I made separate functions for all metadata components in the apihelper class because I didn't find a good way to use the current metadatacreator and apihelper functions.

I came to the conclusion that we should rethink metadatacreator and apihelper completely because for this functionality we need to reuse the same metadata for the play and show_listing kodiwrapper functions.

Please provide your feedback on this proof of concept.

dagwieers commented 5 years ago

@mediaminister I am torn, I see what you are doing and I agree this area needs improving, but I don't think this is elegant, it is just spread out more :-/

I probably would also move it to another file, rather than complicate vrtapihelper more. But I have no good alternative. This needs some time to reflect over IMO.

mediaminister commented 5 years ago

Okay, I see. The intention was to move these new functions to metadatacreator and reuse them to create all Titleitems. Maybe integrating Titleitem helper class into metadatacreator is needed.

But, I'll go back to the drawing board and come up with something more elegant.

mediaminister commented 5 years ago

I created a draft pull request where I tried to fix this problem in a better way: https://github.com/pietje666/plugin.video.vrt.nu/pull/395

dagwieers commented 5 years ago

PR #395 was merged so I think this can be closed now. Please let us know if you have any issues, or further improvements.