firsttris / plugin.video.sendtokodi

:tv: plays various stream sites on kodi using youtube-dl
MIT License
125 stars 28 forks source link

Error while opening SendToKodi directly from Kodi #76

Open GautamMKGarg opened 2 years ago

GautamMKGarg commented 2 years ago

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):

Provide a Kodi log

2022-09-10 20:41:51.943 T:5920 ERROR : Control 55 in window 10025 has been asked to focus, but it can't 2022-09-10 20:41:51.959 T:27652 INFO : initializing python engine. 2022-09-10 20:41:55.055 T:27652 ERROR : 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 : EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--

2022-09-10 20:41:55.171 T:27652 INFO : Python interpreter stopped 2022-09-10 20:41:55.177 T:10228 ERROR : XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.video.sendtokodi/ 2022-09-10 20:41:55.188 T:5920 ERROR : CGUIMediaWindow::GetDirectory(plugin://plugin.video.sendtokodi/) failed

GautamMKGarg commented 2 years ago

@firsttris @nullket

firsttris commented 2 years ago

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

anohren commented 1 year ago

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.