Well I have a feeling that I have the same problem.
Often when I start up MP (I have the autostart plugin switch to MyTV on startup) I end up with a screen prompting me to select the tvserver as it cannot be found.
I will endeavour to get some logs for this tonight and post a proper report.
But if the problem is just that the SQL service has not started then that should be a fairly easy fix. the TV service one is already in and the code is practically the same
TVservice startup delay in /trunk/mediaportal/xbmc/MediaPortal.cs
Now I am not a dev with access, and only really an amateur at this
But adding this afterwards should work for MSSQL server
These lines need to be added as well
As well as the configuration form being updated
Often when I start up MP (I have the autostart plugin switch to MyTV on startup) I end up with a screen prompting me to select the tvserver as it cannot be found.
I will endeavour to get some logs for this tonight and post a proper report.
But if the problem is just that the SQL service has not started then that should be a fairly easy fix. the TV service one is already in and the code is practically the same
TVservice startup delay in /trunk/mediaportal/xbmc/MediaPortal.cs
Code:
312 if (_waitForTvServer)
313 {
314 Log.Info("Main: Wait for TvServer requested. Checking if installed...");
315 System.ServiceProcess.ServiceController ctrl = new System.ServiceProcess.ServiceController("TVService");
316 try
317 {
318 string name = ctrl.ServiceName;
319 }
320 catch (Exception)
321 {
322 ctrl = null;
323 Log.Info("Main: TvServer not installed, so we can go on.");
324 }
325 if (ctrl != null)
326 {
327 Log.Info("Main: TvServer found. Checking status...");
328 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.StartPending)
329 {
330 Log.Info("Main: TvServer is start pending. Waiting until it starts up...");
331 if (splashScreen != null)
332 splashScreen.SetInformation("Waiting for startup of TvServer...");
333 try
334 {
335 ctrl.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Running);
336 }
337 catch (Exception) { }
338 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.Running)
339 Log.Info("Main: Ok. TvServer is started.");
340 else
341 Log.Info("Main: Failed. TvServer is in status {0}", ctrl.Status.ToString());
342 }
343 Log.Info("Main: TvServer is in status {0}. So we can go on.", ctrl.Status.ToString());
344 ctrl.Close();
345 }
346 }
Now I am not a dev with access, and only really an amateur at this
But adding this afterwards should work for MSSQL server
Code:
312 if (_waitForSQLServer)
313 {
314 Log.Info("Main: Wait for SQLServer requested. Checking if installed...");
315 System.ServiceProcess.ServiceController ctrl = new System.ServiceProcess.ServiceController("MSSQL$SQLEXPRESS");
316 try
317 {
318 string name = ctrl.ServiceName;
319 }
320 catch (Exception)
321 {
322 ctrl = null;
323 Log.Info("Main: SQLServer not installed, so we can go on.");
324 }
325 if (ctrl != null)
326 {
327 Log.Info("Main: SQLServer found. Checking status...");
328 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.StartPending)
329 {
330 Log.Info("Main: SQLServer is start pending. Waiting until it starts up...");
331 if (splashScreen != null)
332 splashScreen.SetInformation("Waiting for startup of SQLServer...");
333 try
334 {
335 ctrl.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Running);
336 }
337 catch (Exception) { }
338 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.Running)
339 Log.Info("Main: Ok. SQLServer is started.");
340 else
341 Log.Info("Main: Failed. SQLServer is in status {0}", ctrl.Status.ToString());
342 }
343 Log.Info("Main: SQLServer is in status {0}. So we can go on.", ctrl.Status.ToString());
344 ctrl.Close();
345 }
346 }
These lines need to be added as well
Code:
108 private static bool _waitForTvServer = false;
[I] 109 private static bool _waitForSQLServer = false;[/I]
253 _waitForTvServer = xmlreader.GetValueAsBool("general", "wait for tvserver", false);
[I] 254 _waitForSQLServer = xmlreader.GetValueAsBool("general", "wait for sqlserver", false);[/I]
As well as the configuration form being updated