Jump to content

scripting resets


kolbasz

Recommended Posts

kolbasz

OK, no idea if this is possible or even someone beyond me would consider.  But, I was hoping to better the update process.  Right now, when kodi updates in the middle of the night, it is usually good to go.  However, there are times I know I need a DB reset because things are not working, such as videos updating or resuming, etc.  I restart kodi and bam, emby needs a db reset.  If the process was 2 seconds sweet, but it isnt.  More like 5-10 and if you have music, forget it, WAF is low when having to wait.

 

So, whether it is possible or not, is there a way to call a script or heck, even a cron job that resets the db, even nightly if it wants, just to avoid the wait when you are sitting down for a movie?  If not, fine, but it was a thought.  My issue is that I am running Rpi and cubox, so they are always on.  the DB prompt is on a reboot when things are acting up.  However, if I can say reset DB on upgrade automatically at 4am, problem solved, right?

Link to comment
Share on other sites

Angelblue05

I think it's a valid suggestion. I'll look into what we can do to implement this behavior.

 

Eventually, resets will be a thing of the past once we defined the structure 100%.

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

LongMan

I have considered this too. Could a possible solution be to reset the Db at shutdown. The way windows update works. From my observation, the program works fine even when a Db reset is needed. So If I turn on my HTPC and the addon automatically updates, and requires a reset. I can say no, it still works, and I can watch my movie. 

My suggestion, instead reset Yes or No, use Reset Now and Reset Later (or better, Reset at Shutdown). Now, when I am finished for the night and shutting down, prompt "Do you want to Reset the Db Now?" and do it while I am sleeping. Not sure of the logic but it appears that Kodi is always restarted during a reset. Resetting at shutdown might be a bit more complicated. Hope it is possible.

 

  1. After Addon is updated: Prompt User, Database reset needed to enjoy new Emby Features. Reset Db Now OR Reset Db at Shutdown.
  2. If Now, reset Db Else Save Reset instruction for later.
  3. Listen for shutdown event.
  4. Prompt user with reset Db request (In case, the user will continue using it after restart)
  5. If Yes, Do first part of reset. ( I suspect deleting the current Db)
  6. Send system restart to kodi ( New Db is created)
  7. On restart, Do fullsync
  8. Send system shut down to kodi.

 

Is that possible?

 

Think of WAF in 2 ways.

  • I am around and can fix it.
  • I am away and she delete all addon settings. (REAL WRATH).

Happened to a friend after upgrade to 1.1.39 and she said there are no movies or TV Shows and nothing is happening. I had to drive over there,  which is when I realized she had chosen the second setting as well to reset all addon settings (BTW maybe that should be separate from DB reset)

 

Cheers,

Long Man.

Link to comment
Share on other sites

Angelblue05

We will have to see what can be done.

 

Currently we have to restart Kodi after a reset because we are wiping the database clean. It is something we will eventually improve, but it's not a priority at the moment. Remember, the database reset is only required at the moment, since we are still defining our structure. Once this is over, resets will be a thing of the past and all of this will not be a concern anymore - except for reinstalling/uninstalling which is initiated by the user.

Edited by Angelblue05
  • Like 1
Link to comment
Share on other sites

LongMan

That's nice to know. As I said, for me, no problem. But after seeing my setup, friends ask "Can you setup something similar for me?". They might not be as tech savvy. Not that I am very savvy. But at least I can help myself.

 

Cheers

Link to comment
Share on other sites

  • 2 weeks later...
kolbasz

what part of the structure is still being defined?  I mean, what happens that eventually requires the reset?  just asking in general to know and understand.

 

I guess really the option is to turn off resets, then if something is jacked, fix it with an update as needed.  Most of the time I am OK.  However, I will occasionally see shows are not marked watched or that the resume is failing, etc.  times like this I realize the DB is broken and I force a reset.  then everything kicks back into place.

 

so, no auto update, no real problem

deal with it as needed, always bleeding edge

script the reset as needed, maybe a setting that just approves it at said time.

hope structure is finalized soon

 

long story short, there are ways to deal with it.  I guess a script just makes bleeding edge a possibility.  Otherwise, stay stable build and be done or at rev. X

 

As for the folks mentioning shutting down, this is much harder when talking Rpi/2 and cubox type devices.  Or so I think...

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...