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

Sync Failed #849

Closed
hf-hf opened this issue Apr 7, 2024 · 6 comments · Fixed by #853
Closed

Sync Failed #849

hf-hf opened this issue Apr 7, 2024 · 6 comments · Fixed by #853

Comments

@hf-hf
Copy link

hf-hf commented Apr 7, 2024

Describe the bug
Resource Sync failed,reinstalling Kodi and sync again still cannot run,I think the log may indicate that a certain resource is missing the VideoRangeType field. After clearing some resources and rescanning the media library, it still hasn't returned to normal.

Logs

2024-04-07 16:00:03.338 T:45264    info <general>: JELLYFIN.jellyfin_kodi.objects.tvshows -> DEBUG::jellyfin_kodi\objects\tvshows.py:299 EpisodeId be1c02b26f5f1863ccdbee0fea57fe3f not found
2024-04-07 16:00:03.350 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> ERROR::jellyfin_kodi\database\__init__.py:165 type: <class 'KeyError'> value: 'VideoRangeType'
2024-04-07 16:00:03.353 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> DEBUG::jellyfin_kodi\database\__init__.py:169 [jellyfin] 1 rows updated.
2024-04-07 16:00:03.356 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> DEBUG::jellyfin_kodi\database\__init__.py:172 ---<[ database: jellyfin ] 1847219069936
2024-04-07 16:00:03.359 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> ERROR::jellyfin_kodi\database\__init__.py:165 type: <class 'KeyError'> value: 'VideoRangeType'
2024-04-07 16:00:03.361 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> DEBUG::jellyfin_kodi\database\__init__.py:169 [video] 21 rows updated.
2024-04-07 16:00:03.371 T:45264    info <general>: JELLYFIN.jellyfin_kodi.database -> DEBUG::jellyfin_kodi\database\__init__.py:172 ---<[ database: video ] 1847219071616
2024-04-07 16:00:03.380 T:13560    info <general>: Loading skin file: DialogConfirm.xml, load type: KEEP_IN_MEMORY
2024-04-07 16:00:05.315 T:13560 warning <general>: CGUIWindowManager - CGUIWindowManager::HandleAction - ignoring action 107, because topmost modal dialog closing animation is running
2024-04-07 16:00:05.335 T:45264    info <general>: JELLYFIN.jellyfin_kodi.full_sync -> ERROR::jellyfin_kodi\full_sync.py:274 full sync exited unexpectedly
2024-04-07 16:00:05.343 T:45264    info <general>: JELLYFIN.jellyfin_kodi.full_sync -> ERROR::jellyfin_kodi\full_sync.py:275 'VideoRangeType'
                                                   Traceback (most recent call last):
                                                     File "jellyfin_kodi\full_sync.py", line 260, in process_library
                                                       media[library['CollectionType']](library)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 41, in wrapper
                                                       result = func(self, dialog=dialog, *args, **kwargs)
                                                     File "jellyfin_kodi\full_sync.py", line 358, in tvshows
                                                       obj.episode(episode)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 65, in wrapper
                                                       return func(*args, **kwargs)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 77, in wrapper
                                                       return func(self, item, e_item=e_item, *args, **kwargs)
                                                     File "jellyfin_kodi\objects\tvshows.py", line 325, in episode
                                                       obj['Video'] = API.video_streams(obj['Video'] or [], obj['Container'])
                                                     File "jellyfin_kodi\helper\api.py", line 79, in video_streams
                                                       elif track['VideoRangeType'] in ["HDR10", "HDR10Plus"]:
                                                   KeyError: 'VideoRangeType'
                                                   
2024-04-07 16:00:05.346 T:45264    info <general>: JELLYFIN.jellyfin_kodi.helper.utils -> DEBUG::jellyfin_kodi\helper\utils.py:56 --[ window clear: jellyfin_sync ]
2024-04-07 16:00:05.352 T:45264    info <general>: JELLYFIN.jellyfin_kodi.full_sync -> INFO::jellyfin_kodi\full_sync.py:603 --<[ fullsync ]
2024-04-07 16:00:05.360 T:45264    info <general>: JELLYFIN.jellyfin_kodi.library -> ERROR::jellyfin_kodi\library.py:532 'VideoRangeType'
                                                   Traceback (most recent call last):
                                                     File "jellyfin_kodi\library.py", line 530, in add_library
                                                       sync.libraries(library_id, update)
                                                     File "jellyfin_kodi\full_sync.py", line 109, in libraries
                                                       self.start()
                                                     File "jellyfin_kodi\full_sync.py", line 193, in start
                                                       self.process_library(library)
                                                     File "jellyfin_kodi\full_sync.py", line 260, in process_library
                                                       media[library['CollectionType']](library)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 41, in wrapper
                                                       result = func(self, dialog=dialog, *args, **kwargs)
                                                     File "jellyfin_kodi\full_sync.py", line 358, in tvshows
                                                       obj.episode(episode)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 65, in wrapper
                                                       return func(*args, **kwargs)
                                                     File "jellyfin_kodi\helper\wrapper.py", line 77, in wrapper
                                                       return func(self, item, e_item=e_item, *args, **kwargs)
                                                     File "jellyfin_kodi\objects\tvshows.py", line 325, in episode
                                                       obj['Video'] = API.video_streams(obj['Video'] or [], obj['Container'])
                                                     File "jellyfin_kodi\helper\api.py", line 79, in video_streams
                                                       elif track['VideoRangeType'] in ["HDR10", "HDR10Plus"]:
                                                   KeyError: 'VideoRangeType'

System (please complete the following information):
Jellyfin Version: 10.8.0
Kodi Version: Kodi v21 (Omega)

@mcarlton00
Copy link
Member

Looks like fallout from #804. Was this a movie library or something else? I didn't notice any errors from my testing, but it's always possible I missed something.

@gurg1e

This comment was marked as off-topic.

@oddstr13

This comment was marked as off-topic.

@hf-hf
Copy link
Author

hf-hf commented Apr 9, 2024

@mcarlton00 The sync of both movies and tvshows library programs has this issue.In the problematic program, I printed the track information, and indeed the VideoRangeType field is missing.

Movies sync print logs:
44.649 T:63120 info : JELLYFIN.jellyfin_kodi.database -> DEBUG::jellyfin_kodi\database_init_.py:60 --->[ database: jellyfin ] 2039767368688
2024-04-09 14:26:44.654 T:63120 info : JELLYFIN.jellyfin_kodi.objects.movies -> DEBUG::jellyfin_kodi\objects\movies.py:62 MovieId 9d09f6944d1883338fd4f26d47d92b2d not found
2024-04-09 14:26:44.663 T:63120 info : JELLYFIN.jellyfin_kodi.helper.api -> DEBUG::jellyfin_kodi\helper\api.py:75 Track VideoRangeType: {'Codec': 'h264', 'TimeBase': '1/1000', 'VideoRange': 'SDR', 'DisplayTitle': '1080p H264 SDR', 'NalLengthSize': '0', 'IsInterlaced': False, 'IsAVC': False, 'BitRate': 2418371, 'BitDepth': 8, 'RefFrames': 1, 'IsDefault': True, 'IsForced': False, 'Height': 1080, 'Width': 1920, 'AverageFrameRate': 25, 'RealFrameRate': 25, 'Profile': 'High', 'Type': 'Video', 'AspectRatio': '16:9', 'Index': 0, 'IsExternal': False, 'IsTextSubtitleStream': False, 'SupportsExternalStream': False, 'PixelFormat': 'yuv420p', 'Level': 41}
2024-04-09 14:26:44.665 T:63120 info : JELLYFIN.jellyfin_kodi.database -> ERROR::jellyfin_kodi\database_init_.py:165 type: <class 'KeyError'> value: 'VideoRangeType'

Tvshows sync print logs:
2024-04-09 11:51:49.720 T:30480 info : JELLYFIN.jellyfin_kodi.objects.tvshows -> DEBUG::jellyfin_kodi\objects\tvshows.py:299 EpisodeId 7a59de3f51b5df490168513e217c743d not found
2024-04-09 11:51:49.731 T:30480 info : JELLYFIN.jellyfin_kodi.helper.api -> DEBUG::jellyfin_kodi\helper\api.py:75 Track VideoRangeType: {'Codec': 'h264', 'CodecTag': 'avc1', 'Language': 'und', 'ColorSpace': 'bt709', 'ColorTransfer': 'bt709', 'ColorPrimaries': 'bt709', 'TimeBase': '1/12800', 'VideoRange': 'SDR', 'DisplayTitle': '1080p H264 SDR', 'NalLengthSize': '0', 'IsInterlaced': False, 'IsAVC': False, 'BitRate': 1803192, 'BitDepth': 8, 'RefFrames': 1, 'IsDefault': True, 'IsForced': False, 'Height': 1080, 'Width': 1920, 'AverageFrameRate': 24.999517, 'RealFrameRate': 25, 'Profile': 'High', 'Type': 'Video', 'AspectRatio': '16:9', 'Index': 0, 'IsExternal': False, 'IsTextSubtitleStream': False, 'SupportsExternalStream': False, 'PixelFormat': 'yuv420p', 'Level': 40}
2024-04-09 11:51:49.734 T:30480 info : JELLYFIN.jellyfin_kodi.database -> ERROR::jellyfin_kodi\database_init_.py:165 type: <class 'KeyError'> value: 'VideoRangeType'

@hf-hf
Copy link
Author

hf-hf commented Apr 9, 2024

I modified helper/api.py to use VideoRange when VideoRangeType is missing. After building and installing it, the synchronization works properly now.

@oddstr13
Copy link
Member

oddstr13 commented Apr 9, 2024

@hf-hf Should be fixed in 1.0.2

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.

4 participants