Tip - Single seat, wait for services to start before running Mediaportal (1 Viewer)

maXe72

Portal Member
May 20, 2006
10
1
DE
Thanks a lot, that script solved my Startup-Problems as well :)
 

Smickel

Portal Member
June 4, 2007
8
0
Home Country
Had the same issue thanks for the code :)
Why does TVServer take so long to start ? MS SQL server starts quick then 8-9 sec wait for TVServer to start ?

Cheers
Smickel
 

rtv

Retired Team Member
  • Premium Supporter
  • April 7, 2005
    3,622
    301
    Osnabruck
    Home Country
    Germany Germany
    There was a bug which caused that tvservice didn't get the db dependency added for MSSQL users (who suffer mostly). This is fixed in svn - please try again with the next publicbuild.
     

    jensnasholm

    MP Donator
  • Premium Supporter
  • December 21, 2005
    70
    1
    Stockholm
    Home Country
    Sweden Sweden
    great news about that svn fix rtv... I also managed to resolve this issue with the latest version of the MST software for MCE that now suppports MP natively to stop MP on suspend and start MP on wake-up.
     

    jedney

    Portal Member
    October 30, 2006
    25
    1
    Home Country
    New Zealand New Zealand
    Just upgraded from stable v2.2 to:
    TV Server: tvengine3-06-15-2007--01-22h--Rev14896
    SQL Server 2005 Express
    MediaPortal 0.2.3.0 RC1

    Had the same problem; this fixed it, thanks.
     

    Smickel

    Portal Member
    June 4, 2007
    8
    0
    Home Country
    Hi RTV
    Still got the same problem :confused:
    Using TVServer & Mediaport SVN 14981 @ MSsql

    Hope this helps :)

    Cheers
     

    Junoman

    Portal Member
    February 1, 2007
    15
    0
    Ottawa
    Home Country
    Canada Canada
    Hello rtv,

    Seems to be back in the new SVN's?

    I am using:
    MediaPortal SVN-Snapshot: 07-16-2007 21-00h - Revision:15217
    (...just havent had time to update recently)

    TVServer and MP are matched for SVN's
    Using MSSql Express.

    I wasn't sure what the exact problem was until I found this thread.
    Basically, the EPG data would never show up in MP until I manually updated/restarted the tvserver and then mediaportal.

    After reading this thread I UNCHECKED the start MediaPortal with windows and used a batch file that waits 20 seconds before launching MP at startup.

    Now, the EPG data is always there!
    (especially happy because I defrag/reboot my pc each night and was tired of no EPG data the next day / until manual fix)

    Just wanted to let you know.

    Do you know if the tv client is supposed to keep retrying connection until success?
    (I'm not a programmer, so pardon if the question is not the method used)
     

    riadmelb

    Portal Pro
    July 9, 2006
    218
    7
    Melbourne
    Home Country
    Thank you

    Using a single seat setup i had problems with Mediaportal autostarting too fast, resulting in it could not find the TV server when entering My TV.
    I had to restart Mediaportal for it to work again, causing some irritation :)

    I made the script below to wait for the SQL and TV services to start before running Mediaportal. Maybe someone else has some use for it also.

    First run Mediaportal setup and uncheck the "Autostart MediaPortal when windows starts" option in "General".

    Use notepad and paste the code below in to it and save as a .cmd file, for instance "startmp.cmd" .
    Copy the script to your Startup folder on the Start menu.

    Important: You have to edit the path between the quotes on the last line to match your Mediaportal installation directory path (Check propertys on your Mediaportal start icon and copy the path from there).


    Code:
    @echo off
    rem script to wait for SQL Server and TV Service to start before running MediaPortal.
    echo Waiting for SQL Server to start...
    :NOSQL
    sc query MSSQL$SQLEXPRESS | FIND "RUNNING"
    if errorlevel 1 goto NOSQL
    echo.
    echo Waiting for TV Service to start...
    :NOTVSERICE
    sc query TVService | FIND "RUNNING"
    if errorlevel 1 goto NOTVSERICE
    echo.
    echo Starting MediaPortal!
    start /D"X:\THE PATH TO YOUR MEDIAPORTAL DIRECTORY" mediaportal.exe

    Thank you, your script worked well with my setup.

    riadmelb
     

    infinite.loop

    Retired Team Member
  • Premium Supporter
  • December 26, 2004
    16,163
    4,133
    127.0.0.1
    Home Country
    Austria Austria
    Startupdelay Feature

    Startup delay feature

    we have something new for you who suffer from this problem :)

    please grab and apply the latest mediaportal svn build.

    in configuration you will find 2 new options
    startup-delay.jpg

    singleseat users should use option1 to wait for the tvservice to be started befor mediaportal starts

    option 2 is for users who want that mediaportal start is delayed for other reasons.
    i.e. if you use a chsutom resolution with powerstrip, then you can enuse that MP is started after the resolution has been changed.


    please test and report back :)
     

    Users who are viewing this thread

    Top Bottom