2018-11-20, 09:15
I've started working on a Python scraper, and I've come upon a problem (ohh I wish I had started this earlier).
The Python scrapers run as plugins, by passing just a "plugin://" path through "CDirectory::GetDirectory" and "CPluginDirectory::GetPluginResult", so it loses the path-specific settings attached to the individual CScraper instance.
The clearest example I have for path-specific settings is for TV shows: the main source path can be configured for aired-date episode order that applies to most shows, and just a few specific TV shows can be configured to use DVD or "intended" order, when that differs from the aired order (Firefly for instance).
I've come up with a possible solution, but it's awful: pass along the settings XML (from "CScraper::GetPathSettings") as another path parameter, then the Python scraper will have to parse it themselves rather than using the existing
The Python scrapers run as plugins, by passing just a "plugin://" path through "CDirectory::GetDirectory" and "CPluginDirectory::GetPluginResult", so it loses the path-specific settings attached to the individual CScraper instance.
The clearest example I have for path-specific settings is for TV shows: the main source path can be configured for aired-date episode order that applies to most shows, and just a few specific TV shows can be configured to use DVD or "intended" order, when that differs from the aired order (Firefly for instance).
I've come up with a possible solution, but it's awful: pass along the settings XML (from "CScraper::GetPathSettings") as another path parameter, then the Python scraper will have to parse it themselves rather than using the existing
xbmcaddon.Addon().getSetting(setting_name)
or xbmcplugin.getSetting(handle, setting_name)
methods. Scraper master @spiff, do you have any thoughts on this, do you see a good solution that won't be too disruptive here in the RC phase? If I had caught this earlier I would look into setting it up so that path-specific settings can be pulled from xbmcplugin.getSetting(handle, setting_name)
, but that's a bigger change that I don't feel comfortable making in RC.