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

Fix some minor issues highlighted by 10.7 #431

Merged
merged 3 commits into from
Dec 20, 2020

Conversation

oddstr13
Copy link
Member

@oddstr13 oddstr13 commented Nov 23, 2020

jellyfin/jellyfin#4557 should fix the 400 issue on the capabilities endpoint.

I'm getting a 400 on playback too, not sure why yet.

@sonarcloud
Copy link

sonarcloud bot commented Nov 26, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.6% 0.6% Duplication

@oddstr13 oddstr13 marked this pull request as ready for review November 28, 2020 22:31
@oddstr13 oddstr13 requested a review from a team November 29, 2020 09:01
@oddstr13 oddstr13 mentioned this pull request Nov 29, 2020
42 tasks
@mcarlton00
Copy link
Member

Syncing and playback works, but there's something funny with sub tracks. Looks like another double slash situation if you want to fix that before merging.

2020-11-29 15:45:12.959 T:140510928827968  NOTICE: JELLYFIN.helper.playutils -> ERROR::jellyfin_kodi/helper/playutils.py:549 404 Client Error: Not Found for url: http://{jellyfin-server}//Videos/83b14fd4-c415-418d-8f40-aad6df8e6272/83b14fd4c415418d8f40aad6df8e6272/Subtitles/2/0/Stream.srt?api_key={jellyfin-token}
                                            Traceback (most recent call last):
                                              File "jellyfin_kodi/helper/playutils.py", line 547, in download_external_subs
                                                response.raise_for_status()
                                              File "/home/matt/.kodi/addons/script.module.requests/lib/requests/models.py", line 940, in raise_for_status
                                                raise HTTPError(http_error_msg, response=self)
                                            HTTPError: 404 Client Error: Not Found for url: http://{jellyfin-server}//Videos/83b14fd4-c415-418d-8f40-aad6df8e6272/83b14fd4c415418d8f40aad6df8e6272/Subtitles/2/0/Stream.srt?api_key={jellyfin-token}
2020-11-29 15:45:12.961 T:140510928827968  NOTICE: JELLYFIN.helper.playutils -> ERROR::jellyfin_kodi/helper/playutils.py:521 404 Client Error: Not Found for url: http://{jellyfin-server}//Videos/83b14fd4-c415-418d-8f40-aad6df8e6272/83b14fd4c415418d8f40aad6df8e6272/Subtitles/2/0/Stream.srt?api_key={jellyfin-token}
                                            Traceback (most recent call last):
                                              File "jellyfin_kodi/helper/playutils.py", line 519, in set_external_subs
                                                subs.append(self.download_external_subs(url, filename))
                                              File "jellyfin_kodi/helper/playutils.py", line 547, in download_external_subs
                                                response.raise_for_status()
                                              File "/home/matt/.kodi/addons/script.module.requests/lib/requests/models.py", line 940, in raise_for_status
                                                raise HTTPError(http_error_msg, response=self)
                                            HTTPError: 404 Client Error: Not Found for url: http://{jellyfin-server}//Videos/83b14fd4-c415-418d-8f40-aad6df8e6272/83b14fd4c415418d8f40aad6df8e6272/Subtitles/2/0/Stream.srt?api_key={jellyfin-token}

@oddstr13
Copy link
Member Author

oddstr13 commented Nov 29, 2020

These may be annoying to track down and fix in the current networking code indeed

if stream['IsTextSubtitleStream'] and 'DeliveryUrl' in stream and stream['DeliveryUrl'].lower().startswith('/videos'):
url = "%s/%s" % (self.info['ServerAddress'], stream['DeliveryUrl'])
else:
url = "%s/Videos/%s/%s/Subtitles/%s/Stream.%s?api_key=%s" % (

I'm not sure if I can rely on ServerAddress always ending with /.

@mcarlton00
Copy link
Member

Note: upgrading from 10.6.4 to 10.7-rc1 currently erases all local synced libraries in Kodi.

2020-12-13 15:51:18.586 T:140615779436096  NOTICE: JELLYFIN.monitor -> INFO::jellyfin_kodi/monitor.py:45 --<[ kodi scan/video ]
2020-12-13 15:51:18.849 T:140615655802432  NOTICE: JELLYFIN.database -> ERROR::jellyfin_kodi/database/__init__.py:163 type: <type 'exceptions.ValueError'> value: u'f137a2dd21bbc1b99aa5c0f6bf02a805' is not in list
2020-12-13 15:51:18.851 T:140615655802432   ERROR: Exception in thread Thread-5:
                                            Traceback (most recent call last):
                                              File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
                                                self.run()
                                              File "/home/matt/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/library.py", line 85, in run
                                                if not self.startup():
                                              File "/home/matt/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/library.py", line 308, in startup
                                                Views().get_nodes()
                                              File "/home/matt/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 223, in get_nodes
                                                self.add_nodes(node_path, view)
                                              File "/home/matt/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 280, in add_nodes
                                                self.node_index(folder, view, mixed)
                                              File "/home/matt/.kodi/addons/plugin.video.jellyfin/jellyfin_kodi/views.py", line 351, in node_index
                                                index = self.sync['SortedViews'].index(view['Id'])
                                            ValueError: u'f137a2dd21bbc1b99aa5c0f6bf02a805' is not in list
2020-12-13 15:51:18.889 T:140615779436096  NOTICE: JELLYFIN.full_sync -> INFO::jellyfin_kodi/full_sync.py:58 -->[ fullsync ]
2020-12-13 15:51:18.914 T:140615779436096  NOTICE: JELLYFIN.helper.wrapper -> INFO::jellyfin_kodi/helper/wrapper.py:36 Processing Removing library
2020-12-13 15:51:18.994 T:140615779436096  NOTICE: JELLYFIN.full_sync -> INFO::jellyfin_kodi/full_sync.py:586 --<[ fullsync ]
2020-12-13 15:51:19.003 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:929 DELETE playlist /home/matt/.kodi/userdata/playlists/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805.xsp
2020-12-13 15:51:19.004 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/random.xml
2020-12-13 15:51:19.005 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/recommended.xml
2020-12-13 15:51:19.006 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/unwatched.xml
2020-12-13 15:51:19.007 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/genres.xml
2020-12-13 15:51:19.008 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/sets.xml
2020-12-13 15:51:19.009 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/recent.xml
2020-12-13 15:51:19.009 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/all.xml
2020-12-13 15:51:19.010 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/index.xml
2020-12-13 15:51:19.012 T:140615779436096  NOTICE: JELLYFIN.views -> INFO::jellyfin_kodi/views.py:956 DELETE node /home/matt/.kodi/userdata/library/video/jellyfinmoviesf137a2dd21bbc1b99aa5c0f6bf02a805/inprogress.xml

@mcarlton00
Copy link
Member

Above error is caused by jellyfin/jellyfin#4785 changing formats of the library IDs

@mcarlton00 mcarlton00 merged commit a51fd6b into jellyfin:master Dec 20, 2020
@mcarlton00 mcarlton00 mentioned this pull request Dec 23, 2020
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 this pull request may close these issues.

2 participants