Skip to content
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

PKC 3.9.3 Movies Duplicate #2068

Closed
labdiynez opened this issue Apr 22, 2024 · 8 comments · Fixed by #2070
Closed

PKC 3.9.3 Movies Duplicate #2068

labdiynez opened this issue Apr 22, 2024 · 8 comments · Fixed by #2070

Comments

@labdiynez
Copy link

labdiynez commented Apr 22, 2024

Help yourself

Describe the bug

3.9.3 for Kodi Matrix and beyond (beta only)
Direct Paths
Movies Duplicate

image

To Reproduce

Steps to reproduce the behavior:
If I use version 3.9.0 this problem does not occur.

Expected behavior

A clear and concise description of what you expected to happen.

kodi.log

@croneter
Copy link
Owner

croneter commented Apr 24, 2024

I can confirm this bug. I fear that the culprit might be #2061 and a racing condition. Investigating....

Nope, that change is not the culprit.

@thorindwarf
Copy link

thorindwarf commented Apr 24, 2024

I'm also seeing duplicated movies in my Kodi. PKC 3.9.3.

@croneter
Copy link
Owner

The culprit is our new feature #2041. Movies that have several editions (e.g. director's cut, normal version) get an additional entry in the Kodi database on each restart of Kodi (or each full sync).

Can someone quickly confirm that please?

@thorindwarf
Copy link

You are right about the increasing after restart but I only have duplications for 1 movie (currently 121 of them) but it has one single edition/version.

@croneter
Copy link
Owner

croneter commented Apr 24, 2024

OK this is a nasty one, because all of a sudden I don't have this issue anymore 😢

@thorindwarf: could you please enable debug logging, restart Kodi, CHECK the number of duplicates you have, then additionally start a manual library sync (video => video add-ons => PlexKodiConnect => Perform manual library sync) 3 times (wait a while to make sure a sync completes), then check the number of duplicates again, then share the log file?

See https://github.com/croneter/PlexKodiConnect/wiki/How-to-Report-A-Bug

@croneter
Copy link
Owner

@thorindwarf I think I got it, fixing now... No need for log files 😉

@thorindwarf
Copy link

I upgraded to 3.9.4, reset db of course and now I'm getting these in the log. Sorry for the bad formatting:

`2024-04-24 16:04:07.886 T:29418 info : PLEX.sync.sections: Starting synching sections from the PMS
2024-04-24 16:04:08.069 T:29330 error : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'TypeError'>
Error Contents: Base.check_db() got an unexpected keyword argument 'check_by_guid'
Traceback (most recent call last):
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/default.py", line 179, in
main()
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/default.py", line 167, in main
triage(mode, params, path, arguments, itemid)
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/default.py", line 79, in triage
entrypoint.browse_plex(key=params.get('key'),
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/entrypoint.py", line 551, in browse_plex
show_listing(xml, plex_type, section_id, synched, key)
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/entrypoint.py", line 254, in show_listing
all_items = mass_api(xml, check_by_guid=key == "watchlist")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/plex_api/init.py", line 52, in mass_api
api.check_db(plexdb=plexdb, check_by_guid=False)
TypeError: Base.check_db() got an unexpected keyword argument 'check_by_guid'
-->End of Python script error report<--

2024-04-24 16:04:08.316 T:29248 error : GetDirectory - Error getting plugin:https://plugin.video.plexkodiconnect/?mode=browseplex&key=%2Fhubs%2FcontinueWatching&plex_type=mixed&reload=`

2024-04-24 16:05:07.936 T:29460 info <general>: PLEX.tvshows: ADD season plex_id 470375 - Season 5 2024-04-24 16:05:08.165 T:29460 info <general>: PLEX.sync.process_metadata: Finished processing section successfully: {'index': 3, 'name': 'TV Shows', 'section_id': 5, 'section_type': 'show', 'plex_type': 'season', 'sync_to_kodi': True, 'last_sync': None} 2024-04-24 16:05:08.173 T:29460 info <general>: PLEX.tvshows: ADD episode plex_id: 370470 - Принцът и дамата с чантата 2024-04-24 16:05:08.179 T:29460 error <general>: PLEX.sync: Exception encountered: name 'plex_guid' is not defined 2024-04-24 16:05:08.179 T:29460 error <general>: PLEX.utils: Error encountered: - name 'plex_guid' is not defined 2024-04-24 16:05:08.184 T:29460 error <general>: PLEX.utils: _____________________________________________________________ 2024-04-24 16:05:08.184 T:29460 error <general>: PLEX.utils: Traceback (most recent call last): 2024-04-24 16:05:08.184 T:29460 error <general>: PLEX.utils: File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/common.py", line 31, in run 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: self._run() 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/library_sync/process_metadata.py", line 81, in _run 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: context.add_update(item['xml'][0], 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: File "/storage/.kodi/addons/plugin.video.plexkodiconnect/resources/lib/itemtypes/tvshows.py", line 573, in add_update 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: plex_guid=plex_guid, 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: ^^^^^^^^^ 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: NameError: name 'plex_guid' is not defined 2024-04-24 16:05:08.185 T:29460 error <general>: PLEX.utils: _____________________________________________________________ 2024-04-24 16:05:08.187 T:29418 info <general>: PLEX.utils: It took 0:00:41.053952 to run the function process_new_and_changed_items

@croneter
Copy link
Owner

@thorindwarf already fixed, but wait for 3.9.6 - coming up in like 3 min

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants