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

Error while opening SendToKodi directly from Kodi #76

Open
GautamMKGarg opened this issue Sep 10, 2022 · 3 comments
Open

Error while opening SendToKodi directly from Kodi #76

GautamMKGarg opened this issue Sep 10, 2022 · 3 comments
Labels

Comments

@GautamMKGarg
Copy link

Describe the bug
If we try to open "SendToKodi" plugin directly from Kodi. Kodi throws error.

To Reproduce
Open Kodi >> Go to Addons Section >> Click on SendToKodi. It will throw error.

Expected behavior
If we open SendToKodi from Kodi, it should not throw error. Either setting page should be displayed (similar to Yatse). Or we can make it even better by asking user to enter the URL directly in Kodi. Once user enters Youtube or any other extractor's link, code can be executed to play that video/music.

Kodi and sendtokodi version (please complete the following information):

  • Kodi: [Matrix 19.4]
  • Addon: [master]

Provide a Kodi log

  • If you do not know how the get the log check the official Kodi wiki

2022-09-10 20:41:51.943 T:5920    ERROR <general>: Control 55 in window 10025 has been asked to focus, but it can't
2022-09-10 20:41:51.959 T:27652    INFO <general>: initializing python engine.
2022-09-10 20:41:55.055 T:27652   ERROR <general>: ERROR: [generic] '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube
                                                   
2022-09-10 20:41:55.057 T:27652   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'lib.yt_dlp.utils.DownloadError'>
                                                   Error Contents: ERROR: [generic] '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube
                                                   Traceback (most recent call last):
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\extractor\common.py", line 670, in extract
                                                       ie_result = self._real_extract(url)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\extractor\generic.py", line 2615, in _real_extract
                                                       raise ExtractorError(
                                                   lib.yt_dlp.utils.ExtractorError: '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube
                                                   
                                                   During handling of the above exception, another exception occurred:
                                                   
                                                   Traceback (most recent call last):
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 1459, in wrapper
                                                       return func(self, *args, **kwargs)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 1535, in __extract_info
                                                       ie_result = ie.extract(url)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\extractor\common.py", line 696, in extract
                                                       raise type(e)(e.orig_msg, **kwargs)
                                                   lib.yt_dlp.utils.ExtractorError: [generic] '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube
                                                   
                                                   During handling of the above exception, another exception occurred:
                                                   
                                                   Traceback (most recent call last):
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\service.py", line 250, in <module>
                                                       result = ydl.extract_info(url, download=False)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 1448, in extract_info
                                                       return self.__extract_info(url, self.get_info_extractor(key), download, extra_info, process)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 1477, in wrapper
                                                       self.report_error(str(e), e.format_traceback())
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 994, in report_error
                                                       self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
                                                     File "C:\Users\GG\AppData\Roaming\Kodi\addons\plugin.video.sendtokodi\lib\yt_dlp\YoutubeDL.py", line 934, in trouble
                                                       raise DownloadError(message, exc_info)
                                                   lib.yt_dlp.utils.DownloadError: ERROR: [generic] '' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:" ) to search YouTube
                                                   -->End of Python script error report<--
                                                   
2022-09-10 20:41:55.171 T:27652    INFO <general>: Python interpreter stopped
2022-09-10 20:41:55.177 T:10228   ERROR <general>: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.sendtokodi/
2022-09-10 20:41:55.188 T:5920    ERROR <general>: CGUIMediaWindow::GetDirectory(plugin://plugin.video.sendtokodi/) failed


@GautamMKGarg
Copy link
Author

@firsttris
@nullket

GautamMKGarg added a commit to GautamMKGarg/plugin.video.sendtokodi that referenced this issue Sep 17, 2022
@firsttris firsttris added the bug label Sep 18, 2022
@firsttris
Copy link
Owner

it was intended as service addon, before it didnt do this, maybe some code change lead to this behaviour

@anohren
Copy link
Collaborator

anohren commented Mar 12, 2023

it was intended as service addon, before it didnt do this, maybe some code change lead to this behaviour

Unless you've changed something drastically since last I looked, isn't this still a "plugin" addon and not a "script" addon (absolutely awful terminology, I agree)? Hence Kodi should be free to treat it as a directory node in its library node hierarchy (I'm sure they call it a "virtual file system" or something equally confusing).

From my understanding you can't have a plug-in be a service, since it's just a glorified name for a callback.

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

No branches or pull requests

3 participants