Skip to content

Replace deprecated Kodi listitem setters#416

Merged
mcarlton00 merged 9 commits into
jellyfin:masterfrom
mcarlton00:kodi-deprecations
May 21, 2026
Merged

Replace deprecated Kodi listitem setters#416
mcarlton00 merged 9 commits into
jellyfin:masterfrom
mcarlton00:kodi-deprecations

Conversation

@mcarlton00

Copy link
Copy Markdown
Member

Fixes #406

@mcarlton00 mcarlton00 added the cleanup Code Quality label Mar 23, 2026
Comment thread resources/lib/item_functions.py Outdated
Comment thread resources/lib/item_functions.py Outdated
Comment thread resources/lib/item_functions.py Outdated
Comment thread resources/lib/item_functions.py Outdated
Comment thread resources/lib/item_functions.py Outdated
@mcarlton00

Copy link
Copy Markdown
Member Author

Good catches, thanks for review

Comment thread resources/lib/item_functions.py Outdated
@rcorex

rcorex commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

hi @mcarlton00 @jjlin thanks for your work here. i've used this patch, and modified it to make it work. tested it on the latest kodi nightly builds with no more errors.

I've also fixed up the other deprecation warnings for ListItem.setInfo().

You can see the diff with all the changes here, and apply them if you'd like. Or should I submit another PR?

rcorex@f8054f4

@rcorex

rcorex commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Removed incorrect not operators from the cast and studio conditional checks so the script actually reads the metadata instead of skipping it.

Fixed a native typo by changing video_tag.setCase to the correct API method video_tag.setCast.

Added filters and string conversions (ensure_text) to all metadata arrays to prevent Kodi from crashing when Jellyfin sends empty or None values from poorly scraped media.

Explicit List Casting: Wrapped the variables passed to Kodi's video tags in explicit list() functions to satisfy the C++ wrapper's strict type-checking and resolve the "Tuple or List" crash.

Updated the script to convert basic text dictionaries into dedicated xbmc.Actor objects, which is strictly required by modern Kodi versions (Nexus and above).

@mcarlton00

Copy link
Copy Markdown
Member Author

If you want to open a separate PR we can compare against that's fine. I'm not going to pull your commits in here because I don't feel like dealing with the inevitable merge conflicts

@rcorex

rcorex commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

Alright, PR opened.

@mcarlton00

mcarlton00 commented Apr 4, 2026

Copy link
Copy Markdown
Member Author

Need to find one of my Pis and spin up an older version of libreelec to test the ugly Kodi 19 bits

@mcarlton00
mcarlton00 merged commit 673eac2 into jellyfin:master May 21, 2026
3 checks passed
@mcarlton00
mcarlton00 deleted the kodi-deprecations branch May 21, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Code Quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kodi log is getting flooded because setProperty and setProperty are deprecated

3 participants