-
-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Movies are empty with latest Kodi #808
Comments
This has been discussed on the forum a bit. It appears that Kodi has broken something around database versions. Hopefully whatever it was gets fixed before a full release, but we may have to change something if they don't https://forum.jellyfin.org/t-movies-do-not-appear-on-coreelec-nightly-starting-20240109-cont |
I don't think they are going to fix anything - xbmc/xbmc#24507 |
Oh no, they'll put absolutely no effort into doing anything for us. They hate how this addon functions, because frankly it's a disgusting hack that probably shouldn't exist. My hope is that whatever they did was unintentional and will be changed again before a full release. It probably won't and we'll have to figure out a fix, but at this moment it's looking like that has to wait until the next beta since running nightly versions is an absolute nightmare for me |
"Hate" is such a strong word... There have been some DB changes involving the "movie versions" feature. I think it's plausible that this broke something on your side. |
Hi, I just noticed this issue too. But I was on a nightly and then downgraded back to release 20.3. I don't know if this problem is for the same reasons as here or if it is because of the version downgrade I just did. |
Below is the schema diff, in case it's useful --- /tmp/20.sql 2024-01-23 23:01:02.773076425 +1100
+++ /tmp/21.sql 2024-01-23 23:01:39.772200224 +1100
@@ -28,6 +28,8 @@
CREATE TABLE tag_link (tag_id integer, media_id integer, media_type TEXT);
CREATE TABLE rating (rating_id INTEGER PRIMARY KEY, media_id INTEGER, media_type TEXT, rating_type TEXT, rating FLOAT, votes INTEGER);
CREATE TABLE uniqueid (uniqueid_id INTEGER PRIMARY KEY, media_id INTEGER, media_type TEXT, value TEXT, type TEXT);
+CREATE TABLE videoversiontype (id INTEGER PRIMARY KEY, name TEXT, owner INTEGER, itemType INTEGER);
+CREATE TABLE videoversion (idFile INTEGER PRIMARY KEY, idMedia INTEGER, media_type TEXT, itemType INTEGER, idType INTEGER);
CREATE INDEX ix_bookmark ON bookmark (idFile, type);
CREATE UNIQUE INDEX ix_settings ON settings ( idFile )
;
@@ -67,6 +69,8 @@
CREATE UNIQUE INDEX ix_actor_link_1 ON actor_link (actor_id, media_type, media_id, role);
CREATE INDEX ix_actor_link_2 ON actor_link (media_id, media_type, actor_id);
CREATE INDEX ix_actor_link_3 ON actor_link (media_type);
+CREATE INDEX ix_videoversion ON videoversion (idMedia, media_type);
+CREATE INDEX ix_movie_title ON movie (c00);
CREATE UNIQUE INDEX ix_tag_1 ON tag (name);
CREATE UNIQUE INDEX ix_tag_link_1 ON tag_link (tag_id, media_type, media_id);
CREATE UNIQUE INDEX ix_tag_link_2 ON tag_link (media_id, media_type, tag_id);
@@ -89,7 +93,7 @@
CREATE UNIQUE INDEX ix_country_link_1 ON country_link (country_id, media_type, media_id);
CREATE UNIQUE INDEX ix_country_link_2 ON country_link (media_id, media_type, country_id);
CREATE INDEX ix_country_link_3 ON country_link (media_type);
-CREATE TRIGGER delete_movie AFTER DELETE ON movie FOR EACH ROW BEGIN DELETE FROM genre_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM actor_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM director_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM studio_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM country_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM writer_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM movielinktvshow WHERE idMovie=old.idMovie; DELETE FROM art WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM tag_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM rating WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM uniqueid WHERE media_id=old.idMovie AND media_type='movie'; END;
+CREATE TRIGGER delete_movie AFTER DELETE ON movie FOR EACH ROW BEGIN DELETE FROM genre_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM actor_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM director_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM studio_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM country_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM writer_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM movielinktvshow WHERE idMovie=old.idMovie; DELETE FROM art WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM tag_link WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM rating WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM uniqueid WHERE media_id=old.idMovie AND media_type='movie'; DELETE FROM videoversion WHERE idMedia=old.idMovie AND media_type='movie'; END;
CREATE TRIGGER delete_tvshow AFTER DELETE ON tvshow FOR EACH ROW BEGIN DELETE FROM actor_link WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM director_link WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM studio_link WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM tvshowlinkpath WHERE idShow=old.idShow; DELETE FROM genre_link WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM movielinktvshow WHERE idShow=old.idShow; DELETE FROM seasons WHERE idShow=old.idShow; DELETE FROM art WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM tag_link WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM rating WHERE media_id=old.idShow AND media_type='tvshow'; DELETE FROM uniqueid WHERE media_id=old.idShow AND media_type='tvshow'; END;
CREATE TRIGGER delete_musicvideo AFTER DELETE ON musicvideo FOR EACH ROW BEGIN DELETE FROM actor_link WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM director_link WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM genre_link WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM studio_link WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM art WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM tag_link WHERE media_id=old.idMVideo AND media_type='musicvideo'; DELETE FROM uniqueid WHERE media_id=old.idMVideo AND media_type='musicvideo'; END;
CREATE TRIGGER delete_episode AFTER DELETE ON episode FOR EACH ROW BEGIN DELETE FROM actor_link WHERE media_id=old.idEpisode AND media_type='episode'; DELETE FROM director_link WHERE media_id=old.idEpisode AND media_type='episode'; DELETE FROM writer_link WHERE media_id=old.idEpisode AND media_type='episode'; DELETE FROM art WHERE media_id=old.idEpisode AND media_type='episode'; DELETE FROM rating WHERE media_id=old.idEpisode AND media_type='episode'; DELETE FROM uniqueid WHERE media_id=old.idEpisode AND media_type='episode'; END;
@@ -97,18 +101,18 @@
CREATE TRIGGER delete_set AFTER DELETE ON sets FOR EACH ROW BEGIN DELETE FROM art WHERE media_id=old.idSet AND media_type='set'; END;
CREATE TRIGGER delete_person AFTER DELETE ON actor FOR EACH ROW BEGIN DELETE FROM art WHERE media_id=old.actor_id AND media_type IN ('actor','artist','writer','director'); END;
CREATE TRIGGER delete_tag AFTER DELETE ON tag_link FOR EACH ROW BEGIN DELETE FROM tag WHERE tag_id=old.tag_id AND tag_id NOT IN (SELECT DISTINCT tag_id FROM tag_link); END;
-CREATE TRIGGER delete_file AFTER DELETE ON files FOR EACH ROW BEGIN DELETE FROM bookmark WHERE idFile=old.idFile; DELETE FROM settings WHERE idFile=old.idFile; DELETE FROM stacktimes WHERE idFile=old.idFile; DELETE FROM streamdetails WHERE idFile=old.idFile; END;
+CREATE TRIGGER delete_file AFTER DELETE ON files FOR EACH ROW BEGIN DELETE FROM bookmark WHERE idFile=old.idFile; DELETE FROM settings WHERE idFile=old.idFile; DELETE FROM stacktimes WHERE idFile=old.idFile; DELETE FROM streamdetails WHERE idFile=old.idFile; DELETE FROM videoversion WHERE idFile=old.idFile; DELETE FROM art WHERE media_id=old.idFile AND media_type='videoversion'; END;
CREATE VIEW episode_view AS SELECT episode.*, files.strFileName AS strFileName, path.strPath AS strPath, files.playCount AS playCount, files.lastPlayed AS lastPlayed, files.dateAdded AS dateAdded, tvshow.c00 AS strTitle, tvshow.c08 AS genre, tvshow.c14 AS studio, tvshow.c05 AS premiered, tvshow.c13 AS mpaa, bookmark.timeInSeconds AS resumeTimeInSeconds, bookmark.totalTimeInSeconds AS totalTimeInSeconds, bookmark.playerState AS playerState, rating.rating AS rating, rating.votes AS votes, rating.rating_type AS rating_type, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type FROM episode JOIN files ON files.idFile=episode.idFile JOIN tvshow ON tvshow.idShow=episode.idShow JOIN seasons ON seasons.idSeason=episode.idSeason JOIN path ON files.idPath=path.idPath LEFT JOIN bookmark ON bookmark.idFile=episode.idFile AND bookmark.type=1 LEFT JOIN rating ON rating.rating_id=episode.c03 LEFT JOIN uniqueid ON uniqueid.uniqueid_id=episode.c20
/* episode_view(idEpisode,idFile,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,idShow,userrating,idSeason,strFileName,strPath,playCount,lastPlayed,dateAdded,strTitle,genre,studio,premiered,mpaa,resumeTimeInSeconds,totalTimeInSeconds,playerState,rating,votes,rating_type,uniqueid_value,uniqueid_type) */;
-CREATE VIEW tvshowcounts AS SELECT tvshow.idShow AS idShow, MAX(files.lastPlayed) AS lastPlayed, NULLIF(COUNT(episode.c12), 0) AS totalCount, COUNT(files.playCount) AS watchedcount, NULLIF(COUNT(DISTINCT(episode.c12)), 0) AS totalSeasons, MAX(files.dateAdded) as dateAdded FROM tvshow LEFT JOIN episode ON episode.idShow=tvshow.idShow LEFT JOIN files ON files.idFile=episode.idFile GROUP BY tvshow.idShow
-/* tvshowcounts(idShow,lastPlayed,totalCount,watchedcount,totalSeasons,dateAdded) */;
+CREATE VIEW tvshowcounts AS SELECT tvshow.idShow AS idShow, MAX(files.lastPlayed) AS lastPlayed, NULLIF(COUNT(episode.c12), 0) AS totalCount, COUNT(files.playCount) AS watchedcount, NULLIF(COUNT(DISTINCT(episode.c12)), 0) AS totalSeasons, MAX(files.dateAdded) as dateAdded, COUNT(bookmark.type) AS inProgressCount FROM tvshow LEFT JOIN episode ON episode.idShow=tvshow.idShow LEFT JOIN files ON files.idFile=episode.idFile LEFT JOIN bookmark ON bookmark.idFile=files.idFile AND bookmark.type=1 GROUP BY tvshow.idShow
+/* tvshowcounts(idShow,lastPlayed,totalCount,watchedcount,totalSeasons,dateAdded,inProgressCount) */;
CREATE VIEW tvshowlinkpath_minview AS SELECT idShow, min(idPath) AS idPath FROM tvshowlinkpath GROUP BY idShow
/* tvshowlinkpath_minview(idShow,idPath) */;
-CREATE VIEW tvshow_view AS SELECT tvshow.*, path.idParentPath AS idParentPath, path.strPath AS strPath, tvshowcounts.dateAdded AS dateAdded, lastPlayed, totalCount, watchedcount, totalSeasons, rating.rating AS rating, rating.votes AS votes, rating.rating_type AS rating_type, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type FROM tvshow LEFT JOIN tvshowlinkpath_minview ON tvshowlinkpath_minview.idShow=tvshow.idShow LEFT JOIN path ON path.idPath=tvshowlinkpath_minview.idPath INNER JOIN tvshowcounts ON tvshow.idShow = tvshowcounts.idShow LEFT JOIN rating ON rating.rating_id=tvshow.c04 LEFT JOIN uniqueid ON uniqueid.uniqueid_id=tvshow.c12
-/* tvshow_view(idShow,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,userrating,duration,idParentPath,strPath,dateAdded,lastPlayed,totalCount,watchedcount,totalSeasons,rating,votes,rating_type,uniqueid_value,uniqueid_type) */;
-CREATE VIEW season_view AS SELECT seasons.idSeason AS idSeason, seasons.idShow AS idShow, seasons.season AS season, seasons.name AS name, seasons.userrating AS userrating, tvshow_view.strPath AS strPath, tvshow_view.c00 AS showTitle, tvshow_view.c01 AS plot, tvshow_view.c05 AS premiered, tvshow_view.c08 AS genre, tvshow_view.c14 AS studio, tvshow_view.c13 AS mpaa, count(DISTINCT episode.idEpisode) AS episodes, count(files.playCount) AS playCount, min(episode.c05) AS aired FROM seasons JOIN tvshow_view ON tvshow_view.idShow = seasons.idShow JOIN episode ON episode.idShow = seasons.idShow AND episode.c12 = seasons.season JOIN files ON files.idFile = episode.idFile GROUP BY seasons.idSeason, seasons.idShow, seasons.season, seasons.name, seasons.userrating, tvshow_view.strPath, tvshow_view.c00, tvshow_view.c01, tvshow_view.c05, tvshow_view.c08, tvshow_view.c14, tvshow_view.c13
-/* season_view(idSeason,idShow,season,name,userrating,strPath,showTitle,plot,premiered,genre,studio,mpaa,episodes,playCount,aired) */;
+CREATE VIEW tvshow_view AS SELECT tvshow.*, path.idParentPath AS idParentPath, path.strPath AS strPath, tvshowcounts.dateAdded AS dateAdded, lastPlayed, totalCount, watchedcount, totalSeasons, rating.rating AS rating, rating.votes AS votes, rating.rating_type AS rating_type, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type, tvshowcounts.inProgressCount AS inProgressCount FROM tvshow LEFT JOIN tvshowlinkpath_minview ON tvshowlinkpath_minview.idShow=tvshow.idShow LEFT JOIN path ON path.idPath=tvshowlinkpath_minview.idPath INNER JOIN tvshowcounts ON tvshow.idShow = tvshowcounts.idShow LEFT JOIN rating ON rating.rating_id=tvshow.c04 LEFT JOIN uniqueid ON uniqueid.uniqueid_id=tvshow.c12
+/* tvshow_view(idShow,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,userrating,duration,idParentPath,strPath,dateAdded,lastPlayed,totalCount,watchedcount,totalSeasons,rating,votes,rating_type,uniqueid_value,uniqueid_type,inProgressCount) */;
+CREATE VIEW season_view AS SELECT seasons.idSeason AS idSeason, seasons.idShow AS idShow, seasons.season AS season, seasons.name AS name, seasons.userrating AS userrating, tvshow_view.strPath AS strPath, tvshow_view.c00 AS showTitle, tvshow_view.c01 AS plot, tvshow_view.c05 AS premiered, tvshow_view.c08 AS genre, tvshow_view.c14 AS studio, tvshow_view.c13 AS mpaa, count(DISTINCT episode.idEpisode) AS episodes, count(files.playCount) AS playCount, min(episode.c05) AS aired, count(bookmark.type) AS inProgressCount FROM seasons JOIN tvshow_view ON tvshow_view.idShow = seasons.idShow JOIN episode ON episode.idShow = seasons.idShow AND episode.c12 = seasons.season JOIN files ON files.idFile = episode.idFile LEFT JOIN bookmark ON bookmark.idFile = files.idFile AND bookmark.type = 1 GROUP BY seasons.idSeason, seasons.idShow, seasons.season, seasons.name, seasons.userrating, tvshow_view.strPath, tvshow_view.c00, tvshow_view.c01, tvshow_view.c05, tvshow_view.c08, tvshow_view.c14, tvshow_view.c13
+/* season_view(idSeason,idShow,season,name,userrating,strPath,showTitle,plot,premiered,genre,studio,mpaa,episodes,playCount,aired,inProgressCount) */;
CREATE VIEW musicvideo_view AS SELECT musicvideo.*, files.strFileName as strFileName, path.strPath as strPath, files.playCount as playCount, files.lastPlayed as lastPlayed, files.dateAdded as dateAdded, bookmark.timeInSeconds AS resumeTimeInSeconds, bookmark.totalTimeInSeconds AS totalTimeInSeconds, bookmark.playerState AS playerState, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type FROM musicvideo JOIN files ON files.idFile=musicvideo.idFile JOIN path ON path.idPath=files.idPath LEFT JOIN bookmark ON bookmark.idFile=musicvideo.idFile AND bookmark.type=1 LEFT JOIN uniqueid ON uniqueid.uniqueid_id=musicvideo.c15
/* musicvideo_view(idMVideo,idFile,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,userrating,premiered,strFileName,strPath,playCount,lastPlayed,dateAdded,resumeTimeInSeconds,totalTimeInSeconds,playerState,uniqueid_value,uniqueid_type) */;
-CREATE VIEW movie_view AS SELECT movie.*, sets.strSet AS strSet, sets.strOverview AS strSetOverview, files.strFileName AS strFileName, path.strPath AS strPath, files.playCount AS playCount, files.lastPlayed AS lastPlayed, files.dateAdded AS dateAdded, bookmark.timeInSeconds AS resumeTimeInSeconds, bookmark.totalTimeInSeconds AS totalTimeInSeconds, bookmark.playerState AS playerState, rating.rating AS rating, rating.votes AS votes, rating.rating_type AS rating_type, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type FROM movie LEFT JOIN sets ON sets.idSet = movie.idSet JOIN files ON files.idFile=movie.idFile JOIN path ON path.idPath=files.idPath LEFT JOIN bookmark ON bookmark.idFile=movie.idFile AND bookmark.type=1 LEFT JOIN rating ON rating.rating_id=movie.c05 LEFT JOIN uniqueid ON uniqueid.uniqueid_id=movie.c09
-/* movie_view(idMovie,idFile,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,idSet,userrating,premiered,strSet,strSetOverview,strFileName,strPath,playCount,lastPlayed,dateAdded,resumeTimeInSeconds,totalTimeInSeconds,playerState,rating,votes,rating_type,uniqueid_value,uniqueid_type) */;
+CREATE VIEW movie_view AS SELECT movie.*, sets.strSet AS strSet, sets.strOverview AS strSetOverview, files.strFileName AS strFileName, path.strPath AS strPath, files.playCount AS playCount, files.lastPlayed AS lastPlayed, files.dateAdded AS dateAdded, bookmark.timeInSeconds AS resumeTimeInSeconds, bookmark.totalTimeInSeconds AS totalTimeInSeconds, bookmark.playerState AS playerState, rating.rating AS rating, rating.votes AS votes, rating.rating_type AS rating_type, uniqueid.value AS uniqueid_value, uniqueid.type AS uniqueid_type, EXISTS( SELECT 1 FROM videoversion vv WHERE vv.idMedia = movie.idMovie AND vv.media_type = 'movie' AND vv.itemType = 0 AND vv.idFile <> movie.idFile ) AS hasVideoVersions, EXISTS( SELECT 1 FROM videoversion vv WHERE vv.idMedia = movie.idMovie AND vv.media_type = 'movie' AND vv.itemType = 1 ) AS hasVideoExtras, CASE WHEN vv.idFile = movie.idFile AND vv.itemType = 0 THEN 1 ELSE 0 END AS isDefaultVersion, vv.idFile AS videoVersionIdFile, vvt.id AS videoVersionTypeId, vvt.name AS videoVersionTypeName, vvt.itemType AS videoVersionTypeItemType FROM movie LEFT JOIN sets ON sets.idSet = movie.idSet LEFT JOIN rating ON rating.rating_id = movie.c05 LEFT JOIN uniqueid ON uniqueid.uniqueid_id = movie.c09 LEFT JOIN videoversion vv ON vv.idMedia = movie.idMovie AND vv.media_type = 'movie' AND vv.itemType = 0 JOIN videoversiontype vvt ON vvt.id = vv.idType AND vvt.itemType = vv.itemType JOIN files ON files.idFile = vv.idFile JOIN path ON path.idPath = files.idPath LEFT JOIN bookmark ON bookmark.idFile = vv.idFile AND bookmark.type = 1
+/* movie_view(idMovie,idFile,c00,c01,c02,c03,c04,c05,c06,c07,c08,c09,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,idSet,userrating,premiered,strSet,strSetOverview,strFileName,strPath,playCount,lastPlayed,dateAdded,resumeTimeInSeconds,totalTimeInSeconds,playerState,rating,votes,rating_type,uniqueid_value,uniqueid_type,hasVideoVersions,hasVideoExtras,isDefaultVersion,videoVersionIdFile,videoVersionTypeId,videoVersionTypeName,videoVersionTypeItemType) */; |
Well, I can't speak for other parties involved, but both me and @mcarlton00 … strongly dislike the fact that we're touching the DB. My dream scenario would be presenting Kodi with a virtual filesystem that it could scan, along with metadata. Not sure of how feasible that is with the current available facilities, or how much need to be changed in Kodi for something like that, however. Anyways, I've been expecting that particular feature PR to break things for us for a couple of years now, it was only a matter of time. @pdf Thanks for the diff, I'm sure it'll at least provide some pointers! |
Basically what I see is: @oddstr13 @mcarlton00 Doesn't Jellyfin already have similar "extracting" algorithms for emby-schemes? I ran up and down the last days but could only come up with the "VideoExtras" (e.g. behindthescenes, trailers, etc.). Overall I think it's quite a neat Kodi feature - though I can't understand why the OpenSource-community can't go hand-in-hand but over on xbmc they go like "ye - they fiddle with our DB so it's their problem". Everybody could benefit from another way to get external sources into their views... :( Would love to see that feature available on Jellyfin, too though. |
You're correct, Jellyfin already has version support for movies, and has had it since it started. Docs. And the addon has code to automatically handle that, so when you select something with multiple versions you should get prompted what version you want to play. However Kodi has now added a way to do that with just kodi, natively, and as a result the database schema has changed. Fortunately, this has the potential to simplify the playback code where we aren't going to have to check for versions when something is selected. Unfortunately, fixing this going forward also is going to mean breaking backwards compatibility with older kodi versions unless we do so carefully and have multiple different sql queries that get used in different versions. Such is life when we're piggybacking off another fully independent piece of software.
Yes, this was what I meant when I said we're not going to get a ton of help from upstream. The fact of the matter that this addon (along with plexkodiconnect and emby for kodi) function in a way team kodi explicitly says "you should not do this". Addons are not meant to interact with the database directly, and this situation highlights why. The recommended route is how jellycon, embycon, and other "dynamic" streaming plugins work, where they retrieve and display data from remote sources at the same time. Obviously those are a bit slower due to the extra processing time, but this is the tradeoff.
@oddstr13 I've actually played with this a bit. It would be fairly trivial to just set up a directory with nfo files and strm files, however I believe this could turn into a significant impact on disk space for large libraries, especially if we include images (poster/fanart/backdrops/etc). The other part is that this still involves us making edits to |
How significant this impact could be? I'm sure that aforementioned size can't be bigger than the size of the Jellyfin data directory (well, 10-15GB? 30?), and as for the large number of files... well, running the Kodi+Jellyfin addon on a half-dead SD card under RPi is definitely nonsense. |
Would such an exported filesystem allow playback status sync though? I suspect not, right? That's the only reason I use the add-on right now since all my Kodi usage is local/direct via NFS. If there was an add-on option to only sync playback status instead of messing with the library DB for Direct mode, I would 100% use that. |
@Orhideous A bit off topic for this issue directly, but since you asked: From some quick searching through my library, I'm seeing 1-4Kb per nfo file. Strm file themselves are largely negligible (64 bytes on my testing file). Rough math and estimating out from there, ~200Mb for a library with 50,000 files in it? This is actually pretty straightforward and not at all unreasonable. It starts getting a lot more problematic if we include posters and other images there, which could be 100s of Kb each, and we start to imagine that size could begin to be a problem on low end devices. I don't remember for sure, but I believe Kodi would also then copy that image to it's internal directories. It's been quite a while since I used vanilla Kodi and looked into how it behaved. I know that we have some users running on things like Pis or Fire TVs where this storage capacity requirements could potentially become a problem. There's also some potential for performance issues based on number of files, but I don't know where these limits are in the real world and I'd need to do significantly more testing before this becomes anything more than a footnote in my wandering, mostly incoherent thoughts of how to improve things. Transcoding support is also a small concern, but I believe last time I spent any time in this rabbit hole I confirmed that Kodi will read Since I'm already on my soapbox of ridiculousness, a potentially cleaner solution would be to have our own sqlite database alongside Kodi's, along with a compatibility layer that would allow Kodi to see it as if a "normal" filesystem. There's multiple major hurdles and questions with this approach, though. The first is just the technical challenge to make a "virtual" filesystem that Kodi's parser is capable of reading. I suspect this would be challenging on it's own, without the added complications that it has to work on multiple different OSes (linux, windows, android, iOS, and now webOS). Assuming that's even possible, then we start getting into fun performance questions. Can we query a database, real time generate the xml needed for a nfo file, and hand it back to Kodi's parser in a fast enough way that this even makes sense to do? Of course, going this route means that we still have to deal with the whole database sync thing, which has it's own headaches. And if we can do this, then we can make the virtual filesystem hooks just pull directly from the Jellyfin server on demand instead of this sync nonsense, and at that point we've just re-implemented JellyCon with extra steps. Thank you for coming to my TED Talk, I spend far too much of my time theory crafting stupid solutions to stupid problems. And all of these ideas are absolutely massive, fundamental reworks of how the addon functions, and I really haven't had a ton of time to devote to this particular brand of madness as of late.
@pdf One part of this is absolutely trivial and wouldn't change much at all from it's current implementation, one part is an interesting thought that would require some more research into what Kodi's official APIs offer. We don't read playback status from the database at all currently, we hook into the playback events to detect when things start and stop and what their position is. Updating playback status in the database from the jellyfin server is the part I'm unsure about currently, but it's obviously possible as it's effectively the entire basis of things like Trakt. |
Reviewing the diff that @pdf provided and doing some preliminary digging, I'm pretty sure what needs to change is jellyfin-kodi/jellyfin_kodi/objects/kodi/queries.py Lines 286 to 294 in 2e6eff9
along with jellyfin-kodi/jellyfin_kodi/objects/movies.py Line 145 in 2e6eff9
and
The simplest way is simply going to be adding the extra fields to that query, possibly nulled? Not sure what's required yet to make it work because I don't have a functioning beta3 install. I still can't get kodi to build manually, and the flatpak version apparently hasn't been updated? Or I'm dumb and forgot the right commands. Either way, that should make everything work as it does now. If we want to utilize the new movie versions feature instead of the one built into jellyfin, it will obviously take more effort to sort through and put each version into the db separately instead of handling it at playback time. However as mentioned, we need to have multiple queries so we can maintain backwards compatibility for those users who can't update to 21 right away, or are currently on stable. We've done this at least once before in 0aa2e71 and can use that as a template. |
Nope. Structure of movie table is the same: Difference is that you need (forcefully) the same movie in the videoversion-table so movieview works as intended. At least I think so. |
Ok. At least I get a videolist on 21b3 now - adding "Standard version" for all movies added. Edit: nvm ... Widgets work as intended after a restart of Kodi 21b3. |
@mcarlton00 |
From a quick glance it seems fine, but I don't have time to test it for myself today. Feel free to open a PR with the changes, more likely to get more eyes on it that way. |
@AmonFlorian thanks a lot for these changes. I tried them out and they are not working for me on an NVidia Shield 2017. I will try to dig in more in a few days but I wanted to give a heads up that I think more people need to test this before it goes in. I did the steps below multiple times, and I will also try this on a Linux desktop when I get back to this.
I still end up with no movies in the UI. I confirmed by looking at the MyVideos131.db file that the new videoversion table exists and has the same number of entries as the movie table. The logs show Kodi making the movie db query and getting back 0 items. Thanks again and I can test any potential fix for this. |
I also tried this, on Nvidia Shield Pro 2019, with the same results. I'm also happy to test anything. Unfortunately, I'm struggling to wrap my head around how this addon works, so testing will be my limits, I wish I could do more! |
@chriswalken |
I wonder if I have somehow messed up moving your build from GitHub to my Kodi install. |
You simply need to replace the three .py-files listed in the commit on your kodi install. No need to compile or anything. |
Yes I verified the videoversion table has the same number of entries as the movie table. Both tables look to be filled correctly (I see movie titles in the movie table, and the videoversion table has increasing IDs). Also in all cases I exited Kodi after updating the addon and resetting the DB within it. Sometimes I also killed the process after exiting (this is a nuace of the shield where processes can stay running in the background and you double tap one of the buttons and get a 'task switcher' view). I didn't say this in my comment but the first way I tried this was just replacing the three files after hand merging the changes. When that didn't work I deleted the pyc cache and tried again, even though I did see the relevant pyc files had been updated. I only commented here after doing the full addon install. Technically I still haven't ruled out my hand merging being the issue, so next I'll just replace with the updated raw files. The diff is tiny so I think it's unlikely I messed this up, but I do think I should rule it out completely. Thanks again. I think I'll be able to run more tests tonight or tomorrow. |
Hi, I just replaced the 3 files as told above and I confirm it now works on KODI 21 beta3. |
Thanks. Yeah, I was doing that but it was still intermittently not populating the home screen without a restart. After my last update I eventually figured out if I also threw in a |
Yeah, you can see that I commented out ReloadSkin() in my code. It could be skin dependent. |
Kodi xbox retail version omega Since omega update, when kodi updates library from jellyfin, movies folders get scanned but after import kodi shows movies as empty. Working nexus setup logs: Broken omega logs: |
Version 1.0 still produces the same issue for me. Tried "repair" , with no success. Would any specific log outputs be useful? |
still not working for me as discussed in #834 but to bring discussion here where it is more relevant (sorry about that) readded movie library tonight. log again shows scan was successful but library is empty similar to 0.7.4. videoversion table appears to be populated: but videoversiontype is not fwiw running INSERT INTO videoversiontype ( itemType, owner, name, id ) VALUES ( 0, 0, 'Standard Edition', 40400 ); on db from earlier in the thread made movies appear to clarify: version 1.0.0+py3 of the plugin, Kodi 21.0-RC2 on coreelec |
I suspect those of you who have run into the videoversiontype issue are coming from other nightly/beta versions of Kodi and not the standard release channel. Because that table comes directly from upstream Kodi and should be populated before we ever touch the database, which I've just verified on a brand new flatpak install of Kodi 21 RC2. So the only way I can think of it not having content is if you stepped through a version with a broken database of some kind. We can potentially add another step to the migration to ensure that the standard edition exists there, but I want to reiterate that we really shouldn't have to do that. |
I definitely agree with @mcarlton00 here. |
@mcarlton00 @AmonFlorian Thank you very much for making this fix, I really appreciate that time you all spend on it |
For those of you who can easily reach the filesystem, I think the easiest solution is just going to be to simply (preferably stop Kodi first), delete For those of you who can't easily access the filesystem, I don't have a particularly great solution. The only one that comes to mind is nuking the entire Kodi config and start from scratch. It's probably not fun, depending on what other customizations you've made to your install, but it might be the easiest route. This is sometimes the price to be paid when being a guinea pig and running pre-release software. I'd be curious if anybody can narrow down which pre-release is the one that introduced the problem. I've tested beta2 and RC2 and had no issue on either of them, so I suspect it's either beta1 or a previous master/nightly build of some kind. |
So I just did this. I deleted MyVideos131.db*, tried to repair, got stuck on the first movie, started kodi back, performed a local database reset, still no movies. For what it's worth, I'm running Kodi on webos since a few months after the first nightlies were available (no betas were available at the time) Edit: I just checked, videoversion is populated, but videoversiontype isn't. |
@reyqn Please at least provide logs and version information when reporting on a new platform "not working", in this case, ideally also information on the databases, their tables and sample contents. |
I'm not sure what you mean by version, but I'm using 1.0 of this add-on and Kodi RC2. It was said that logs wouldn't show anything so I didn't bother, but which one would you want? I also edited my last message to provide insight into my database tables. |
You have a broken Kodi database. |
Yeah I'll just populate it manually, I get that the issue I'm having has nothing to do with this addon anymore. Thanks! |
just got it to work. you have to delete every MyVideos??.db -File because if there is a lower version of this file, kodi generates the 131-version out of the old and it gets corrupted. additionally i uninstalled the jellyfin-addon prior to complete shutdown of the app and deletion of the db-files. then i reinstalled the addon and reconnected to my server. everything went fine and movies are there. |
This didn't work either for me, so I used this to edit the table, in case it helps someone:
The values come from https://github.com/xbmc/xbmc/blob/master/addons/resource.language.en_gb/resources/strings.po |
deleting MyVideos***.db along with associated copies and repairing the db through the plugin worked for me. did not need to uninstall the plugin. working beautifully now, thanks! |
One reason this may still be broken for some users is that the “Perform local database reset” feature actually breaks the database (wipes all entries from So after you delete your MyVideos database(s), you have to use the repair feature, not reset. |
Looks like you are correct. I've never looked into the guts of the reset function, but it loops through all tables in the database and deletes their contents, with an exclusion of the version table. We'll need to add another exclusion for jellyfin-kodi/jellyfin_kodi/database/__init__.py Lines 252 to 259 in 64b1c37
|
I assume this issue is resolved with v1.0.1? |
I followed the instructions something posted recently (repair vs reset and
reboot) and although my TV shows are back the movies are still not showing.
And that was with official repo version 1.0.1..
I'm using Coreelec's nightly build of Kodi 21 (RC2) so it's possible that's
expected but until Kodi is GA I'm kind of stuck I guess.
Great work by both teams nonetheless.
A long time supporter of Jellyfin/Kodi.
…On Sun, Mar 31, 2024 at 4:40 PM Odd Stråbø ***@***.***> wrote:
I assume this issue is resolved with v1.0.1?
—
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVBYNJQH3NBVFNSETUMMLLY3BYCTAVCNFSM6AAAAABB3G36DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYHA4TSMRWGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for your work on this plugin! Steps that worked for me to resolve this on Fedora 39, Kodi 21 RC2 and Jellyfin-Kodi 1.0.1-py3:
|
Thanks. That finally fixed it for me.
…On Sun, Mar 31, 2024 at 9:01 PM rp86 ***@***.***> wrote:
Thanks for your work on this plugin!
Steps that worked for me to resolve this on Fedora 39, Kodi 21 RC2 and
Jellyfin-Kodi 1.0.1-py3:
- Backup Kodi DB
- Delete MyVideos***.db
- Perform local database reset in addon (keeping addon settings)
- Re-add my Jellyfin libraries when auto-prompted by the addon after
Kodi restarted
—
Reply to this email directly, view it on GitHub
<#808 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAVBYNNSDES6YHK3DGXLMA3Y3CWWDAVCNFSM6AAAAABB3G36DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRYHE4DIMBWHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Describe the bug
When I install Jellyfin video plugin to Kodi and sync my library, Movies are empty. Other libraries like TV Shows are properly synchornized. Looks like video plugin "owns" Movies (I can't add folders there) but movies are not pulled.
I found this problem on Android TV, but it also happens on PC and probably on other platforms, my logs are from PC.
This is a recent regression. I checked these revisions:
xbmc/xbmc@5198ea5 (master @ 2024-Jan-13) - bugged
xbmc/xbmc@979dbf5 (21.0b2-Omega @ 2023-Dec-9) - working.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Movies are synchonized.
Logs
Failure (master) - https://paste.kodi.tv/sipakinizu.kodi
Success (21.0b2-Omega) - https://paste.kodi.tv/uhavuyogus.kodi
System (please complete the following information):
The text was updated successfully, but these errors were encountered: