[New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and MP (1 Viewer)

Status
Not open for further replies.

VASkO

Portal Member
September 18, 2008
48
2
Home Country
Slovenia Slovenia
Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

shh26_83
read my post about a bug of using a wrong type for totalPhysicalMem above your post. Open the TvServerStatus.aspx.cs and at line 73 change from int totalPhysicalMem to Int64 totalPhysicalMem and at line 82 from totalPhysicalMem = Convert.ToInt32(mo["totalphysicalmemory"]); to totalPhysicalMem = Convert.ToInt64(mo["totalphysicalmemory"]);

totalphysicalmemory system variable has a int64 datatype as mentioned in the .NET documentation and gemx wrongly used the int32 type which causes an value overflow

edit:
gemx
my previous reported bugs were no bugs at all from your code. Somehow I had a groupmap of 2 non existing channels left over in my channelgroupmap table and when trying to read and show any page with "All channels" TV group, the page crashed. No need to investigate further. But some exception handling code would be nice anyway.
 

shh26_83

MP Donator
  • Premium Supporter
  • November 19, 2009
    40
    1
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    i have find some errors:

    1. the Stop timeshift - Button dont work, i klick, notthing are going
    2. the TVServer-Satus-Script dont read the following Systemparameters:
    - manufacturer
    - model

    The Error about the Point 2 ist that the Information are write in two places of Windows:
    - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation, this can be set and the set will be there after a reboot
    and
    - HKEY_LOCAL_MASHINE\SYSTEM\ControlSet001\Control\SystemInformation, this Information will be set on Windows-Standard after a reboot, thats the Problem!!
    The .Net function read this regpath!

    the totalPhysicalMem error with the Int32, i have make good with the tip from you.
    :D
     

    perfectbatz

    Portal Member
    December 30, 2009
    11
    1
    Home Country
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    Gday Gemx - Great Plugin mate - well done -

    I have the service up and running and able to hook in from within my network. Unfortunately unable to log in from internet.

    I have set up dyndns to have a internet address directed to my IP. I have opened the required ports and have assigned them in MPTV server plugin options.

    path is coprrect - green light for port but for some reason can't get access from outside my network.

    Any ideas?

    Cheers
     

    joz

    Portal Pro
    March 17, 2008
    1,353
    306
    Home Country
    Netherlands Netherlands
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    Just testing out the latest version (RC3). Seems to work great only found one bug so far. This error's thrown when trying to access tv server status (I have 4GB, 3,25GB accessible, 32 bits)
    [collapse]
    Value was either too large or too small for an Int32.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.OverflowException: Value was either too large or too small for an Int32.

    Source Error:

    Line 80: manufacturer = mo["manufacturer"].ToString();
    Line 81: computername = mo["name"].ToString();
    Line 82: totalPhysicalMem = Convert.ToInt32(mo["totalphysicalmemory"]);
    Line 83: totalPhysicalMem = (totalPhysicalMem / 1024) / 1024;
    Line 84: }


    Source File: c:\Program Files\MediaPortal\TV Server\Plugins\MPWebServices\htdocs\TvServerStatus.aspx.cs Line: 82

    Stack Trace:

    [OverflowException: Value was either too large or too small for an Int32.]
    System.Convert.ToInt32(UInt64 value) +2881665
    System.UInt64.System.IConvertible.ToInt32(IFormatProvider provider) +9
    System.Convert.ToInt32(Object value) +28
    TvServerStatus.RefreshServerInfo(List`1 recPaths) in c:\Program Files\MediaPortal\TV Server\Plugins\MPWebServices\htdocs\TvServerStatus.aspx.cs:82
    TvServerStatus.Page_Load(Object sender, EventArgs e) in c:\Program Files\MediaPortal\TV Server\Plugins\MPWebServices\htdocs\TvServerStatus.aspx.cs:65
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
    System.Web.UI.Control.OnLoad(EventArgs e) +73
    System.Web.UI.Control.LoadRecursive() +52
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2184
    [/collapse]
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    Code:
    Line 82:         totalPhysicalMem = Convert.ToInt32(mo["totalphysicalmemory"]);

    This line is probably what causes issues, since your memory is ~4 billion bytes, and a 32 bit signed integer cannot represent numbers larger than ~2 billion. Should be an easy fix (i.e. use 64 bit integer).
     

    nicx

    Portal Pro
    February 1, 2006
    387
    12
    Stuttgart
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    hi gemx,

    unfortunately i cannot open any stream link on my iphone anymore with the new rc2 and rc3. its just doing nothing... no timeshift starts. maybe its an authentication problem? becaue i do not authenticate against the webpage on my phone, i just start the direct link to the stream... if this is the reason, could you integrate a toggle for disabling/enabling the login precess completly?

    nicx...
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    hi gemx,

    unfortunately i cannot open any stream link on my iphone anymore with the new rc2 and rc3. its just doing nothing... no timeshift starts. maybe its an authentication problem? becaue i do not authenticate against the webpage on my phone, i just start the direct link to the stream... if this is the reason, could you integrate a toggle for disabling/enabling the login precess completly?

    nicx...

    Did you use your old links?
    If so, they don't work anymore.
    You have to make a new link list based on the links RC 3 gives you ;)
    Also please post your logfile from "...\plugins\MPWebServices\htdocs\logs" if any

    The authentication is just a crypted querystring "&sectoken=...".
    The sectoken is <current time><username><password> then Rijndael encrypted and converted to hex.

    The current time is only added to have a different sectoken each time you generate the link. => harder to hack :D
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    i have find some errors:

    1. the Stop timeshift - Button dont work, i klick, notthing are going
    2. the TVServer-Satus-Script dont read the following Systemparameters:
    - manufacturer
    - model

    The Error about the Point 2 ist that the Information are write in two places of Windows:
    - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\OEMInformation, this can be set and the set will be there after a reboot
    and
    - HKEY_LOCAL_MASHINE\SYSTEM\ControlSet001\Control\SystemInformation, this Information will be set on Windows-Standard after a reboot, thats the Problem!!
    The .Net function read this regpath!

    the totalPhysicalMem error with the Int32, i have make good with the tip from you.
    :D

    The status page doesn't look into the registry but uses WMI to readout these values but i will not spend time on this problem as this information has no real use, it's just some additional info which looks nice but nothing else
     

    nicx

    Portal Pro
    February 1, 2006
    387
    12
    Stuttgart
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    hi gemx,

    unfortunately i cannot open any stream link on my iphone anymore with the new rc2 and rc3. its just doing nothing... no timeshift starts. maybe its an authentication problem? becaue i do not authenticate against the webpage on my phone, i just start the direct link to the stream... if this is the reason, could you integrate a toggle for disabling/enabling the login precess completly?

    nicx...

    Did you use your old links?
    If so, they don't work anymore.
    You have to make a new link list based on the links RC 3 gives you ;)
    Also please post your logfile from "...\plugins\MPWebServices\htdocs\logs" if any

    The authentication is just a crypted querystring "&sectoken=...".
    The sectoken is <current time><username><password> then Rijndael encrypted and converted to hex.

    The current time is only added to have a different sectoken each time you generate the link. => harder to hack :D

    hm i am using the new links without the sectoken stuff because i open the link directly in my streamer software locally on the iphone... there i dont have any sectoken, this is only generated on my normal pc if i click onto a link in the streamer webpage. so how can i do streaming withou the sectoken on my phone with the actual version? or do i have to generate the sectoken manually and append it to the link each time? that would be bad because i use fixed bookmarks for each channel ;)

    nicx...
     

    gemx

    Retired Team Member
  • Premium Supporter
  • October 31, 2006
    1,972
    539
    Home Country
    Germany Germany
    Re: [New Plugin] WebServices + Transcoded streaming + Web Interface for TvServer and

    That's not a problem.
    Just use the links from your pc in your iphone.
    The sectoken is needed.
    Although the sectoken is different every time you click on streaming you can use anyone that was generated given the fact you haven't changed your username or password since then ;)
     
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom