Plugin: MP2Extended (2 Viewers)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,568
    3,948
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Is it a server or client plugin in MP2?
    At least this question I can answer. OV for MP2 is a client only plugin. It is integrated into the "Major Releases" like the Summer 15 release, but it's no part of the "Weekly Builds"...
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    But one still has the Online Videos separate configurator? Or are all settings made inside MP2 client?
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,568
    3,948
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I never used OV in MP1 so I don't know anything about how OV is working in MP1. But in MP2 there only is the client plugin and all settings are done inside the client GUI. Did not use OV that often as my internet is not fast enough to really have fun with online video sources. Maximum I can get is 720p and even this often gets interrupted...
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Usually it's a long process before we get to a final design where we know what features of the API we actually need.
    I will just implement an API and you can decide if you are happy with it or not :)
    What I have for now:
    GetOnlineVideosSites
    This returns all available sites with their Description and an Id

    GetOnlineVideosSiteCategories
    This gives you a list with all available categories and the infomration if these categories have SubCategories + LastUpdate time + Description

    GetOnlineVideosSubCategories
    This gives you the subCategories of a category

    GetOnlineVideosCategoryVideos
    This will return the Videos in a selected Category

    Is it a server or client plugin in MP2?(I have only used it in MP1)
    Normally it is a ClientPlugin but I foreced it into an Serverplugin. How OnlineVideos Work:
    There is a library called OnlineVideos.dll which provides all the functionallity of OnlineVideos.
    The ClientPlugins reference this dll and just make the needed Api calls to get the information to present it in the GUI (+ a bit more).
    I now took this dll and make the same api calls, but from the server side and cache all the sites on the server side instead of the client side. Does that make sense? There are just a few problems:
    I needed to create my own version of the dll to make it work and there is no Nuget Package yet.

    in the MP2Ext api or do one get the full list and need to do the selection at client side?
    Right now you get all available sites. But we can think about a functions like "SetFavorites" and "GetFavorites". The other api calls mentioned above will stay the same :) So this is up to your needs.

    Should it be selection of quality(if multiple are available) or should it auto select based on client settings? Should skipping of empty folder levels be done at client side or at the api, this based on Online Videos settings?
    I have no idea right now^^ I will probably just return a URL to the Video and the Client has to do the playback.

    This feature would actaully be the first real reason for me at some point move from MP1 to MP2
    (y)
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    The api calls you added seems good. How you use the Online Videos dll makes sense to me but it sounds a bit scary to use own version of the dll. Can't you ask the maker of Online Videos to include the needed changes so we don't have separate versions that might diverge over time?

    But is not MP2 Online videos using the configurator seen in the screen shots under Configuration?
    https://github.com/offbyoneBB/mp-onlinevideos2/wiki

    I mean some sites has configuration, e.g. user and password. It would be a bit confusing for the user to enter all this both at MP2 gui and in each MPiV client.

    Some videos can have multiple streams with different quality. One way is that you include all available video urls in the details of a media item and let MPiV decide the one to play.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    How you use the Online Videos dll makes sense to me but it sounds a bit scary to use own version of the dll. Can't you ask the maker of Online Videos to include the needed changes so we don't have separate versions that might diverge over time?
    Yes I want to do that :) Just wanted to get it work yesterday and see how far I get and what I need ;)

    But is not MP2 Online videos using the configurator seen in the screen shots under Configuration?
    I have to look into this, but I think the configs can come from MP2Ext. I guess this is preferred, right?

    Some videos can have multiple streams with different quality. One way is that you include all available video urls in the details of a media item and let MPiV decide the one to play.
    I did exactly this:
    [{"Id":null,"Title":"Franck Ribéry auf dem Weg zurück zur Mannschaft","Description":"","AirDate":"","Length":"1 Min.","StartTime":"","SubtitleText":null,"SubtitleUrl":null,"VideoUrl":"http://www.br.de/mediathek/video/se...ribery-rueckkehr-mannschaftstraining-100.html","VideoUrls":["http://cdn-storage.br.de/MUJIuUOVBw...Ny/8b0089d9-033f-44bd-b8af-4b732c78cdf9_B.mp4"]}, ... MORE VIDEOS

    But this might change. Maybe I will create an extra api call to retrieve the Video urls, because it takes some time until OnlineVideos got the URLS, so if there are a ton of videos it might take ages. The problem is that onlineVideos doesn't work with IDs, but stores the whole objects in the GUI. But I can't serialize a whole Object and throw it at you just that you can return it back to me. So I try to work around that problem. So expect some bugs in the first versions :ROFLMAO:
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    Configuration of sites inside MP2Ext is probably the second best if one can't use the Online Videos configuration directly.

    Separate call for the urls is fine, mostly they are not needed, only at playback. You can also have basic/details of the api calls where more information is included in the details version. E.g. most often one only want title/thumb when creating the list of videos. When selecting a specific video and one can ask for more information.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    Separate call for the urls is fine, mostly they are not needed, only at playback.
    I've implemented it like this ;)

    If you need a snapshot for testing let me know. Probably I need to hack a rough app together to test this myself, until now I just called functions in the browser :whistle:
     

    johanj

    MP Donator
  • Premium Supporter
  • January 31, 2009
    781
    398
    46
    Home Country
    Sweden Sweden
    Thanks for the offer but I'm swaped at work right now and will be for at least 1-2 more weeks. I have time to reply here but not much more.
     

    FreakyJ

    Retired Team Member
  • Premium Supporter
  • July 25, 2010
    4,024
    1,420
    Home Country
    Germany Germany
    @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? :)
     

    Users who are viewing this thread

    Top Bottom