a4k-openproject / script.module.openscrapers

OpenScrapers Project
GNU General Public License v3.0
102 stars 40 forks source link

Control module does not access Openscrapers settings. #107

Closed Tikipeter closed 4 years ago

Tikipeter commented 4 years ago

Hi there. I've written an Easynews scraper for Openscrapers, but there is a problem with the control.py file that should be used to access the settings of openscrapers.

The 'addon' variable (accessing xbmcaddon.Addon) needs to explicitly state the openscrapers id as it's 'id' arg... addon = xbmcaddon.Addon(id='script.module.openscrapers') at the moment it is like this... addon = xbmcaddon.Addon()

This has implications with other variables in the code, such as "setting" which is assigned "addon.getSetting". If 'addon' is not set to openscrapers, then this 'setting' call will call the settings of whichever addon is accessing the scraper. So, for example, if Venom calls the new Easynews scraper, then the 'settings' calls in the Easynews scraper will check Venom's settings instead of Openscrapers settings.

I can fix this with a pull request, I just don't know whether it will affect the scrapers test code incorporated into Openscrapers.

reddit-reaper commented 4 years ago

@Tikipeter yeah go ahead i appreciate any PRs :) scraper-test is broken right now anyways since i have yet to figure out a way to ignore the kodi specific modules that are in some scrapers lol

Tikipeter commented 4 years ago

The following pull request from sraedler fixes this issue. They got to it before I could. :) https://github.com/a4k-openproject/script.module.openscrapers/pull/108