Plugin: MP2Extended (3 Viewers)

FreakyJ

Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Another thing:
    I would add a new function to the streaming service rather than add it to the GetArtwork function:
    GetOnlineVideosArtwork /...Resized
    Would that work for you, too?
    I would like to keep the original MPExt api untouched and the GetArtwork function is already a bit ugly from a code point of view :eek:
    Also I wouldn't use the fanart service to get the Artwork. So these are the reasons why I would like to separate this. I would still use the exactly same caching ;)
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    About resize image from OnlieVideos. Thats sounds ok, doesn't matter to me.

    About configuration of sites. Are you sure that the external configuration application can't be used for this? I would actually prefer if the setting of sites are not handled by clients like MPiV and instead in a configurator for MP2Extended. MPExtended has a configuration tool, could we have something similar for MP2Extended?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Are you sure that the external configuration application can't be used for this?
    pretty sure, because it is not an external configuration tool. It comes up if you go to the MP1 configuration tool -> Plugins -> select OnlineVideos -> Config
    The MP2 plugin doesn't seem to have a big config yet and the standalone app comes also with its own config. Also not that advanced like the MP1 one.

    I would actually prefer if the setting of sites are not handled by clients like MPiV and instead in a configurator for MP2Extended.
    Really? I would think it is nice to make some changes to my site collection directly from my Tablet.

    MPExtended has a configuration tool, could we have something similar for MP2Extended?
    If somebody writes one :whistle:
    I had more like an online config in mind. Similar to the API Page, just using AJAX with jquary and call the MP2Ext functions in the background. But I don't know how big my motivation is for this to be honest.
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    Ok, so if doing it from the tablet. Do one change the selected sites for the MP2Extended server plugin for Online Videos? So I don't need to do the configuration for each iPad in the house....I guess it could be nice if one do it once but not if it is a client settings and one need to configure the sites for every client.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Ok, so if doing it from the tablet. Do one change the selected sites for the MP2Extended server plugin for Online Videos? So I don't need to do the configuration for each iPad in the house....I guess it could be nice if one do it once but not if it is a client settings and one need to configure the sites for every client.
    If Tablet A changes the config this applies to Tablet B ... Z. So it affects the whole MP2Ext Server, but *not* the MP1 and MP2 clients (except someone would write an MP2Ext plugin). Does that make sense?
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    This make sense. Will the configuration be a simple list if sites or is it a tree structure?
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Will the configuration be a simple list if sites or is it a tree structure?
    More a simple List. You can request a global List (all sites available on the OnlineVideos server).
    It has the following information:
    public string Id { get; set; }
    public string Title { get; set; }
    public string Description { get; set; }
    public string Creator { get; set; }
    public string Language { get; set; }
    public bool IsAdult { get; set; }
    public WebOnlineVideosSiteState State { get; set; }
    public uint ReportCount { get; set; }
    public DateTime LastUpdated { get; set; }
    public bool Added { get; set; }
    you can send a command to MP2Ext: RemoveOnineVideosLocalSite(string siteName) or AddOnineVideosLocalSite(string siteName).
    Added tells you if the Site is already added locally or not.
    This is not yet implemented: so again the question:
    Do you preferr two ApiCalls like in the exampel above do you want to have it in one (AddRemoveOnlineVideosLocalSite(string siteName, action=Add or Remove)) or do you want to pass a list to one of the two options? :D

    It is basically like in the stand alone version:
    OnlineVideosGlobalList.PNG

    For the site settings:
    You call GetOnlineVideosSiteSettings(string siteName) and get a list of the available settings:
    Login: ; []
    Password: ; []
    Amazon Adult Pin: ; []
    Amazon Video Quality: Medium; [Low, Medium, High, HD, FullHD]
    Amazon Player Type: Browser; [Internal, Browser]
    Skip single Category: True; [true, false]

    Json looks more like:
    [{"Id":null,"Name":"Login","Description":"Website user name","Value":"","PossibleValues":[],"IsBool":false},{"Id":null,"Name":"Password","Description":"Website password","Value":"","PossibleValues":[],"IsBool":false},{"Id":null,"Name":"Amazon Adult Pin","Description":"Amazon Adult Pin","Value":"","PossibleValues":[],"IsBool":false},{"Id":null,"Name":"Amazon Video Quality","Description":"Defines the maximum quality for the video to be played.","Value":"Medium","PossibleValues":["Low","Medium","High","HD","FullHD"],"IsBool":false},{"Id":null,"Name":"Amazon Player Type","Description":"Amazon Player Type, Browser(Silverlight) or Internal Player(Rtmp/Flash)","Value":"Browser","PossibleValues":["Internal","Browser"],"IsBool":false},{"Id":null,"Name":"Skip single Category","Description":"Enables skipping over category lists that only contain a single category.","Value":"True","PossibleValues":[],"IsBool":true}]

    So teh question from above is still valid:
    @johanj
    I am working on the settings part right now. The api gives you a list of all available settings per site.
    The function is called: GetOnlineVideosSiteSettings(string siteName).
    and returns List<WebOnlineVideosSiteSetting>
    WebOnlineVideosSiteSettings contains:
    public string Id { get; set; }
    public string Name { get; set; }
    public string Description { get; set; }
    public string Value { get; set; }
    public string[] PossibleValues { get; set; }
    public bool IsBool { get; set; }
    The description says the following:
    /// Usage:
    /// If PossibleValues.Length == 0 && IsBool == false ? Value is a simple string
    /// If PossibleValues.Length != 0 ? The value must be one of these options
    /// If IsBool == true ? the value must be true or false

    Now I want to implement the change of a site setting. How would you like it to be?
    Something like:
    SetOnlineVideosSiteSetting(string siteName, string settingName, string settingValue)
    or more like:
    SetOnlineVideosSiteSettings(string siteName, List<WebOnlineVideosSiteSettings>)
    and this function only takes the parameters value and name?

    Or do you prefer a completely different way? :)
     
    Last edited:

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    ah maybe I should also mention that I don't actually request the siteName in the Api calls. As you can see everything has an id. OnlineVideos doesn't have that, so I generate my own id's to keep track of everything.
    Basically it is an base64 encoded string which has all the information I need to process further tasks :)
    http://192.168.178.26:26405/MPExten...ineVideosSiteSettings?id=QW1hem9uIFByaW1lIERl
    If you decode it from this URL you get: "Amazon Prime De". for categories I use like"siteName::CategroyName....".
    VideoIds are a bit longer:
    M3NhdDo6QWIgMTghOjpodHRwOi8vd3d3LjNzYXQuZGUvbWVkaWF0aGVrLz9tb2RlPXBsYXkmb2JqPTUzODA0
    and look like this decrypted:
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    I don't have any strong opinions about details of the api calls. I think two calls for selecting/deselecting a site is fine. SetOnlineVideosSiteSettings, hmm, not sure. But one can't send complex structures as parameters so why not just use your first suggestion SetOnlineVideosSiteSetting(string siteName, string settingName, string settingValue)
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @MrTechno
    I tried to figure out what is wrong with the merged branch, but the changes are so huge and I don't know how it should work that I am a bit lost there :/
    It would be nice if you find some time to figure this out. I am very carefully to not touch anything MIA related while continue my work on MP2Ext.
    Basically all my changes are extra class files not using the MediaLibrary and an extra line in the MAS/WSS handler.
     

    Users who are viewing this thread

    Top Bottom