Skip to content

dbuteau#17

Open
dbuteau wants to merge 9 commits intorobweber:masterfrom
dbuteau:master
Open

dbuteau#17
dbuteau wants to merge 9 commits intorobweber:masterfrom
dbuteau:master

Conversation

@dbuteau
Copy link
Copy Markdown

@dbuteau dbuteau commented Jan 13, 2018

Made lot of improvement, don't know if you're interested in. Feel free to merge or refuse:

  • AddJob now return the job.id created: (ease later use for addon, they can memorize/keep the id in their config)
  • Anchor the job.id: the id is wrote in the cron.xml now (need by above, the id must not change anymore addons count on it )
  • add updateJob method: addons can now update/replace their own previously created cron
  • on addJob method: check if expression + command is already in job list, if yes does not add the cron. Avoid filling xml with exactly same cron (for example if two differents addon add same command and same expressions, or if an addon add cron each time it's launched without checking if already launched/created). Because i think having 10+ same cron, launching same command in same time is resources-consuming (furthermore xml & ui is uselessly filled)
  • stop using utils.log use xbmc.log in place

Seems to work fine on my kodi

…st before adding it,avoiding another addon add again same cron; make Id fix and part of job line in xml, no more changing id, addon can keep their jobid in their config for deleting or updating it later
Refresh readme for including new feature:
- now the cron.xml is indented correctly (all was on only one line before)
- now addJob method return jobId for giving capability to addon caller to keep this id for reuse later
- now check if command + expression already exist before adding it. If already exist do nothing (and add a warning in xbmc logs)
- all this give the possibility for addon to update an already defined cron
@robweber
Copy link
Copy Markdown
Owner

Wow, thanks for all the work. I'll go through all this in detail over the next day or two but based on the descriptions I like the additions here. Thanks!

@dbuteau
Copy link
Copy Markdown
Author

dbuteau commented Jan 13, 2018

warning don't merge, i just realized i forgot to change UI for job.ID change
It create an exception when editing cron in GUI...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants