via API check if Library update is running

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
rvank Offline
Junior Member
Posts: 12
Joined: Feb 2009
Reputation: 0
Post: #1
Hi All,

I want to update the library at the end of my movie download script.
It works perfectly already, but i don't want to initiate a second or third update if the first update is still processing.

Is there a way to check if the library update is still running or is the api call to update the library 'foolOo' proof. e.g. it does not matter that you send a new update command while the previous is still running.

Rob.
find quote
spiff Offline
Grumpy Bastard Developer
Posts: 12,181
Joined: Nov 2003
Reputation: 82
Post: #2
Code:
if (scanner->IsScanning())
  scanner->StopScanning();
else
  CGUIWindowVideoBase::OnScan("",info,settings);

it's fool proof but not in the way you want it to be. luckily there is
Code:
if (strTest.Equals("library.isscanning")) ret = LIBRARY_IS_SCANNING;
i'm not sure if you can query info labels using the http api. if that isn't the case you will have to do a .py middleman

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
althekiller Offline
Team-XBMC Developer
Posts: 4,703
Joined: May 2004
Reputation: 12
Post: #3
If this is a script, why don't you just create some file before you start the scan and delete it on completion. Then you can just test that files existance before you start any other instances.
find quote
CrashX Offline
Posting Freak
Posts: 1,216
Joined: Jan 2009
Reputation: 2
Post: #4
nevermind
find quote