Hiltronix / plugin.video.sickrage

SickRage Interface Addon for Kodi/XBMC
GNU General Public License v2.0
7 stars 4 forks source link

Feature request: Add TV show by id #2

Closed phil65 closed 9 years ago

phil65 commented 9 years ago

Hey, would you be so kind and add an option to directly add a tvshow by passing a tvdb id as a param? (something like plugin://plugin.video.sickrage?action=addshow&tvdb_id=TVDB_ID ) I could integrate this into my ExtendedInfo add-on then. Cheers

Hiltronix commented 9 years ago

Sure. I think I could do that. Give me a couple days to look into that and I'll get back to you.

On 2015-06-25 12:44 PM, Philipp Temminghoff wrote:

Hey, would you be so kind and add an option to directly add a tvshow by passing a tvdb id as a param? (something like plugin://plugin.video.sickrage?action=addshow&tvdb_id=TVDB_ID ) I could integrate this into my ExtendedInfo add-on then. Cheers

— Reply to this email directly or view it on GitHub https://github.com/Hiltronix/plugin.video.sickrage/issues/2.

Hiltronix Computer Services Winnipeg, Manitoba, Canada

Hiltronix commented 9 years ago

Take a look at version 1.0.6. I included the change you requested. Also see the ChangeLog. I set up the API request pretty much like you suggested, as well as added the same for show name.

Examples: RunPlugin(plugin://plugin.video.sickrage?action=addshow&tvdb_id=TVDB_ID) RunPlugin(plugin://plugin.video.sickrage?action=addshow&show_name=SHOW_NAME)

In the case of the TVDV_ID lookup, it first converts the id code to the TV show name, and it pops up with the show name list prompt, as if you entered the name to search. So in rare cases where multiple shows have the same name, you'll still have to select it based on date as the SickRage web interface does. The reason I did it this way was to allow for someone sending a TVDBid that doesn't exist, so it still falls back to the normal user interface and confirmation of the correct show.

I hope that works for you. Please test it out and let me know.

Carey

On 2015-06-25 12:44 PM, Philipp Temminghoff wrote:

Hey, would you be so kind and add an option to directly add a tvshow by passing a tvdb id as a param? (something like plugin://plugin.video.sickrage?action=addshow&tvdb_id=TVDB_ID ) I could integrate this into my ExtendedInfo add-on then. Cheers

— Reply to this email directly or view it on GitHub https://github.com/Hiltronix/plugin.video.sickrage/issues/2.

Hiltronix Computer Services Winnipeg, Manitoba, Canada

phil65 commented 9 years ago

Cool thx, will add that for the next version I think.

Hiltronix commented 9 years ago

@phil65 Hi. I was just reviewing the latest version (3.0.0) of your extendedInfo addon, to learn more about it so I could add it as further TV show lookup in my SickRage addon project. And I noticed that the current code in DialogTVSHowInfo.py for adding to Sickbeard was:

"RunScript(special://home/addons/plugin.program.sickbeard/resources/lib/addshow.py," + title + ")"]]

and I remembered that you had made this FR thread asking me to add an param option for addshow. I was just wondering if it was intended for your "Manage > Add to SickBeard" feature? Unless I'm wrong, "plugin.program.sickbeard" is the addon from Zach Moore that is currently broken.

Also, I noticed in the addons mailing list that Martijn Kaijser approved extendedInfo 3.0.0 this morning. But it still appears in the Kodi Repo as 2.0.10. Do you know if there is a delay after approval for an addon to download as the new version? Even if I uninstall extendedInfo 3.0.0 that I manually installed, and try to install 2.0.10 from the Kodi Repo, it appears to be broken and doesn't download for me today.

Thanks for your feedback and insight.

phil65 commented 9 years ago

I can take some time until all mirrors are synced. And sorry, I forgot to include this change. Will be part of 3.0.1 then.

phil65 commented 9 years ago

https://github.com/phil65/script.extendedinfo/commit/188c92ac44426e91cf4cca481c3ce6aebc70e419 I didnt test it though because I do not have a sickbeard installation workin atm.

troych commented 7 years ago

Sorry to bump this but is this not working at the moment? I'm running Kodi 17 Beta6.

Debuglog when I select "Add to sickbeard":


14:16:45.527 T:139701838117248   DEBUG: RunScriptWithParams - calling plugin SickRage('plugin://plugin.video.sickrage/','-1','?action=addshow&show_name=')
14:16:45.534 T:139699298670336   DEBUG: Thread LanguageInvoker start, auto delete: false
14:16:45.534 T:139699298670336    INFO: initializing python engine.
14:16:45.534 T:139699298670336   DEBUG: CPythonInvoker(112, /home/kodi/.kodi/addons/plugin.video.sickrage/default.py): start processing
14:16:45.753 T:139699298670336   DEBUG: -->Python Interpreter Initialized<--
14:16:45.753 T:139699298670336   DEBUG: CPythonInvoker(112, /home/kodi/.kodi/addons/plugin.video.sickrage/default.py): the source file to load is "/home/kodi/.kodi/addons/plugin.video.sickrage/default.py"
14:16:45.754 T:139699298670336   DEBUG: CPythonInvoker(112, /home/kodi/.kodi/addons/plugin.video.sickrage/default.py): setting the Python path to /home/kodi/.kodi/addons/plugin.video.sickrage:/home/kodi/.kodi/addons/script.module.addon.common/lib:/home/kodi/.kodi/addons/script.module.metahandler/lib:/home/kodi/.kodi/addons/script.module.myconnpy/lib:/home/kodi/.kodi/addons/script.module.simplejson/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat
14:16:45.754 T:139699298670336   DEBUG: CPythonInvoker(112, /home/kodi/.kodi/addons/plugin.video.sickrage/default.py): entering source directory /home/kodi/.kodi/addons/plugin.video.sickrage
14:16:45.755 T:139699298670336   DEBUG: CPythonInvoker(112, /home/kodi/.kodi/addons/plugin.video.sickrage/default.py): instantiating addon using automatically obtained id of "plugin.video.sickrage" dependent on version 2.1.0 of the xbmc.python api
14:16:46.109 T:139699298670336   DEBUG: addshow
14:16:46.109 T:139699298670336 WARNING: Attempt to use invalid handle -1
Hiltronix commented 7 years ago

Quite honestly I haven't tested the plugin with v.17 yet. I'll take a look.

troych commented 7 years ago

Just tried it with Jarvis and it does indeed work with that. Good to know it's "just" a beta problem then.