Plugin: MP2Extended (5 Viewers)

hkjensen

MP Donator
  • Premium Supporter
  • June 11, 2007
    165
    65
    Copenhagen
    Home Country
    Denmark Denmark
    Do we have already some web UI? If yes, do we have support to watch live tv and recordings over that web UI?
    MP2Ext has a very basic WebUI. Currently it shows you the API documentation and the Settings.

    I haven't tested it yet, but WebMediaportal should work with MP2Ext, too ;) And this offers all the requested features above. If you try it and there should be some problems, let me know ;)

    WebMediaportal dos not work, it is requesting /MPExtended/MediaAccessService witch returns "Bad Request"
    From server.log:
    [2015-12-18 17:20:11,269] [1180033] [121 ] [INFO ] - MainRequestHandler: Received request http://192.168.10.136:4322/MPExtended/MediaAccessService
    [2015-12-18 17:20:11,270] [1180034] [121 ] [INFO ] - MainRequestHandler: AbsolutePath: /MPExtended/MediaAccessService, uriParts.Length: 3
    [2015-12-18 17:20:11,271] [1180035] [121 ] [INFO ] - MAS: AbsolutePath: /MPExtended/MediaAccessService, uriParts.Length: 3, Lastpart: MediaAccessService
    [2015-12-18 17:20:11,284] [1180048] [121 ] [WARN ] - MAS: Micromodule not found: MediaAccessService
    [2015-12-18 17:20:11,286] [1180051] [121 ] [ERROR] - MainRequestHandler: Exception:
    HttpServer.Exceptions.BadRequestException: BadRequest: MAS: Micromodule not found: MediaAccessService
    at MediaPortal.Plugins.MP2Extended.ResourceAccess.MediaAccessServiceHandler.Process(IHttpRequest request, IHttpResponse response, IHttpSession session) in m:\Programmieren\C#\MediaPortal 2\MediaPortal\Incubator\MP2Extended\ResourceAccess\MediaAccessServiceHandler.cs:line 135
    at MediaPortal.Plugins.MP2Extended.ResourceAccess.MainRequestHandler.Process(IHttpRequest request, IHttpResponse response, IHttpSession session) in m:\Programmieren\C#\MediaPortal 2\MediaPortal\Incubator\MP2Extended\ResourceAccess\MainRequestHandler.cs:line 141

    From webportal.log:
    2015-12-18 17:02:36.47970 [ (54)] DEBUG: TAS: Connected to version 0.6.0-beta
    2015-12-18 17:03:32.41081 [ (49)] DEBUG: Reloading configuration file 'Authentication.xml' due to changes.
    2015-12-18 17:03:32.41282 [ (49)] DEBUG: Reloading configuration file 'StreamingPlatforms.xml' due to changes.
    2015-12-18 17:03:32.41282 [ (45)] DEBUG: Reloading configuration file 'StreamingPlatforms.xml' due to changes.
    2015-12-18 17:03:32.41394 [ (49)] DEBUG: Reloading configuration file 'WebMediaPortal.xml' due to changes.
    2015-12-18 17:03:32.41394 [ (48)] DEBUG: Reloading configuration file 'WebMediaPortal.xml' due to changes.
    2015-12-18 17:03:32.41694 [ (54)] INFO: WebMediaPortal version 0.6.0-beta (commit 7326b77) now connected with MAS 192.168.10.136:4322 and TAS 192.168.10.100:4322
    2015-12-18 17:03:32.51644 [ (54)] DEBUG: MAS: connection failed
    System.ServiceModel.ProtocolException: The content type text/html; charset=UTF-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '
    <!DOCTYPE html>
    <html lang=en>
    <meta charset=utf-8>
    <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
    <title>Error 400 (Bad Request)!!</title>
    <style>
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}
    html{background:#fff;color:#222;padding:15px}
    body{margin:7% auto 0;max-width:600px;min-height:180px;padding:30px 0 15px}* > body{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKoAAACqCAYAAAA9dtSCAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4'.
    ---> System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
    at System.Net.HttpWebRequest.GetResponse()
    at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
    --- End of inner exception stack trace ---
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Thanks for testing (y)
    It calls http://192.168.10.136:4322/MPExtended/MediaAccessService and I don't know why.... I just checked the src and can't see why it should do that. If I call this in MPExtended it also gives me an error :/

    It looks like you compiled WebMP yourself.
    On Application startup it calls: Log.Debug("MAS: Connected to version {0}", Current.MAS.GetServiceDescription().ServiceVersion);

    So the error must occure here:
    Code:
    public WebMediaServiceDescription GetServiceDescription()
            {
                LoadProviders();
                return new WebMediaServiceDescription()
                {
                    ApiVersion = API_VERSION,
                    ServiceVersion = VersionUtil.GetVersionName(),
    
                    AvailableFileSystemLibraries = FileSystemLibraries.GetAllAsBackendProvider(),
                    AvailableMovieLibraries = MovieLibraries.GetAllAsBackendProvider(),
                    AvailableMusicLibraries = MusicLibraries.GetAllAsBackendProvider(),
                    AvailablePictureLibraries = PictureLibraries.GetAllAsBackendProvider(),
                    AvailableTvShowLibraries = TVShowLibraries.GetAllAsBackendProvider(),
    
                    DefaultFileSystemLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Filesystem),
                    DefaultMovieLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Movie),
                    DefaultMusicLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Music),
                    DefaultPictureLibrary = ProviderHandler.GetDefaultProvider(ProviderType.Picture),
                    DefaultTvShowLibrary = ProviderHandler.GetDefaultProvider(ProviderType.TVShow),
                };
            }

    very strange :/
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    I have been super buzzy at work the last couple of weeks so I have made no progress. :(
    No problem ;)
    I've just pushed all the latest changes and try to fix the nuget issues, once again >_>

    Have nice holidays!
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany

    pünktchen

    Portal Pro
    October 26, 2010
    537
    201
    Home Country
    Germany Germany
    @pünktchen

    I've just implemented the uncancel function :)
    But what is the purpose of this change: https://github.com/puenktchen/MPExtended/commit/c8ff72e89c1c1e1608bab0cba331334126f8e6af ??
    I am not sure if I can make this change, because this is a change to the MPExt interface and no addition. I could probably make it optional, but before I do that I would like to know why? :)
    I try to explain it. I need it to change the audio track or the streaming bitrate in Emby and for fast channel changing.
    Why:
    When using the url given by "RetreiveStream" Emby starts a ffmpeg process with it. No problem so far. But when i change the streaming bitrate in Emby the ffmpeg process is killed and a new process is started with the same url.
    This doesn't work a second time! (You can test it with vlc) Probably by closing the first ffmpeg process, MPExtended thinks the player has disconnected? But it always works with "DoStream". You don't even need to initialize and start a stream for this! It's all done by "DoStream".
    Now the problem with the original code:
    Without an "identifier" as start parameter for "DoStream" there's no way to finish or cancel the MPExtended stream.
    You would always have to wait for the stream timeout. Really bad for zapping!
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Fixed. Extra references to NuGet program removed from projects (see commit history)
    Thank you!
    I figured this out, too. I deleted these lines using Notepad++, but the problem was that once I started VS it adds these lines again to the project files >_>

    I need to confirm it again, I just won't have time today.

    But again, thank you very much!
     

    MrTechno

    Retired Team Member
  • Premium Supporter
  • February 27, 2011
    1,256
    511
    London
    Home Country
    United Kingdom United Kingdom
    Check your NuGet settings in Visual Studio. I think "Allow NuGet to download missing packages" causes those extra reference to be added
     

    Users who are viewing this thread

    Top Bottom