home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
Tip - Single seat, wait for services to start before running Mediaportal
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Shazell" data-source="post: 239900" data-attributes="member: 51936"><p>Well I have a feeling that I have the same problem.</p><p></p><p>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.</p><p></p><p>I will endeavour to get some logs for this tonight and post a proper report.</p><p></p><p>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</p><p></p><p>TVservice startup delay in /trunk/mediaportal/xbmc/MediaPortal.cs</p><p></p><p>[code]</p><p> 312 if (_waitForTvServer)</p><p> 313 {</p><p> 314 Log.Info("Main: Wait for TvServer requested. Checking if installed...");</p><p> 315 System.ServiceProcess.ServiceController ctrl = new System.ServiceProcess.ServiceController("TVService");</p><p> 316 try</p><p> 317 {</p><p> 318 string name = ctrl.ServiceName;</p><p> 319 }</p><p> 320 catch (Exception)</p><p> 321 {</p><p> 322 ctrl = null;</p><p> 323 Log.Info("Main: TvServer not installed, so we can go on.");</p><p> 324 }</p><p> 325 if (ctrl != null)</p><p> 326 {</p><p> 327 Log.Info("Main: TvServer found. Checking status...");</p><p> 328 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.StartPending)</p><p> 329 {</p><p> 330 Log.Info("Main: TvServer is start pending. Waiting until it starts up...");</p><p> 331 if (splashScreen != null)</p><p> 332 splashScreen.SetInformation("Waiting for startup of TvServer...");</p><p> 333 try</p><p> 334 {</p><p> 335 ctrl.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Running);</p><p> 336 }</p><p> 337 catch (Exception) { }</p><p> 338 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.Running)</p><p> 339 Log.Info("Main: Ok. TvServer is started.");</p><p> 340 else</p><p> 341 Log.Info("Main: Failed. TvServer is in status {0}", ctrl.Status.ToString());</p><p> 342 }</p><p> 343 Log.Info("Main: TvServer is in status {0}. So we can go on.", ctrl.Status.ToString());</p><p> 344 ctrl.Close();</p><p> 345 }</p><p> 346 }</p><p>[/code]</p><p></p><p>Now I am not a dev with access, and only really an amateur at this <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite7" alt=":p" title="Stick Out Tongue :p" loading="lazy" data-shortname=":p" /></p><p></p><p>But adding this afterwards should work for MSSQL server</p><p></p><p>[code]</p><p> 312 if (_waitForSQLServer)</p><p> 313 {</p><p> 314 Log.Info("Main: Wait for SQLServer requested. Checking if installed...");</p><p> 315 System.ServiceProcess.ServiceController ctrl = new System.ServiceProcess.ServiceController("MSSQL$SQLEXPRESS");</p><p> 316 try</p><p> 317 {</p><p> 318 string name = ctrl.ServiceName;</p><p> 319 }</p><p> 320 catch (Exception)</p><p> 321 {</p><p> 322 ctrl = null;</p><p> 323 Log.Info("Main: SQLServer not installed, so we can go on.");</p><p> 324 }</p><p> 325 if (ctrl != null)</p><p> 326 {</p><p> 327 Log.Info("Main: SQLServer found. Checking status...");</p><p> 328 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.StartPending)</p><p> 329 {</p><p> 330 Log.Info("Main: SQLServer is start pending. Waiting until it starts up...");</p><p> 331 if (splashScreen != null)</p><p> 332 splashScreen.SetInformation("Waiting for startup of SQLServer...");</p><p> 333 try</p><p> 334 {</p><p> 335 ctrl.WaitForStatus(System.ServiceProcess.ServiceControllerStatus.Running);</p><p> 336 }</p><p> 337 catch (Exception) { }</p><p> 338 if (ctrl.Status == System.ServiceProcess.ServiceControllerStatus.Running)</p><p> 339 Log.Info("Main: Ok. SQLServer is started.");</p><p> 340 else</p><p> 341 Log.Info("Main: Failed. SQLServer is in status {0}", ctrl.Status.ToString());</p><p> 342 }</p><p> 343 Log.Info("Main: SQLServer is in status {0}. So we can go on.", ctrl.Status.ToString());</p><p> 344 ctrl.Close();</p><p> 345 }</p><p> 346 }</p><p>[/code]</p><p></p><p>These lines need to be added as well</p><p>[code]</p><p> 108 private static bool _waitForTvServer = false;</p><p>[I] 109 private static bool _waitForSQLServer = false;[/I]</p><p></p><p> 253 _waitForTvServer = xmlreader.GetValueAsBool("general", "wait for tvserver", false); </p><p>[I] 254 _waitForSQLServer = xmlreader.GetValueAsBool("general", "wait for sqlserver", false);[/I][/code]</p><p></p><p>As well as the configuration form being updated</p></blockquote><p></p>
[QUOTE="Shazell, post: 239900, member: 51936"] 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 [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 } [/code] Now I am not a dev with access, and only really an amateur at this :P 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 } [/code] 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][/code] As well as the configuration form being updated [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
Tip - Single seat, wait for services to start before running Mediaportal
Contact us
RSS
Top
Bottom