croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.16k stars 77 forks source link

Use InfoTagVideo to set list item data #2040

Closed Spacetech closed 6 months ago

Spacetech commented 7 months ago

Use InfoTagVideo methods for setting data for Video list items. This fixes/removes these warnings from the kodi log:

2024-02-29 08:24:33.062 T:1039596 warning <general>: "resumetime" in ListItem.setProperty() is deprecated and might be removed in future Kodi versions. Please use InfoTagVideo.setResumePoint().
2024-02-29 08:24:33.062 T:1039596 warning <general>: "totaltime" in ListItem.setProperty() is deprecated and might be removed in future Kodi versions. Please use InfoTagVideo.setResumePoint().
2024-03-03 11:48:35.889 T:982116 warning <general>: Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo.
2024-02-29 08:24:33.062 T:1039596 warning <general>: ListItem.addStreamInfo() is deprecated and might be removed in future Kodi versions. Please use InfoTagVideo.addVideoStream(), InfoTagVideo.addAudioStream() and InfoTagVideo.addSubtitleStream().

I tested this on latest Kodi 21 nightly. I browsed around a bunch of my video libraries and things look good on my skin (Arctic Fuse). No errors are showing up. It would be great if more people can test this though.

I don't have any music libraries so I only applied this to the Video type.

References:

This might resolve #1965 since it should now be setting hdrtype on the video stream.

croneter commented 7 months ago

What happens with Kodi 19 and Kodi 20? I want to retain compatibility as long as possible as a LOT of people use some set-up with older Kodi versions. Should be fine since you're checking against v.KODIVERSION?

Spacetech commented 7 months ago

KODIVERSION

Yes I assume it will be fine due to the KODIVERSION check. I have not tested it on older versions though. My current setup is 21 nightly.

croneter commented 6 months ago

Thanks again!! :heart: