Closed shnabz closed 6 years ago
It seems to be writing the cron.xml to my app's root dir.
I changed line 153 to f = xbmcvfs.File(xbmc.translatePath('special://profile/addon_data/service.cronxbmc/cron.xml'),"w")
and now it's working.
Interesting, the utils.data_dir()
might actually be resolving to the data directory of whatever addon you're using it in if you're calling the manager class directly from another addon. I never really thought through how that would work when using it as an import.
Probably best to hardcode the cron.xml path as you've done. If you want to do a PR with your changes I'll merge it in, otherwise I can add it too.
Importing it as part of another addon is definitely one of the ways you can use cronxbmc. The fact that it didn't work is an oversight on my part. There is even a part in the README file regarding how to import it.
I'll push this fix later today, I think your solution will keep it working as expected.
👍🏼
I can add a cron, and I can see that I have added a cron by using manager.getJobs(). Howevere it doesn't show in the GUI or the xml and the cron never gets called. No error messages are shown in the Kodi log.