OnlineVideos JSON parsing (1 Viewer)

howudodat

Portal Pro
February 20, 2007
75
2
United States of America United States of America
Is there a way to tell it "I dont know if there are subcategories, ask me so I can check"? Or if you set each one as always having subcategories, when DiscoverSubCategories is called can you set HasSubCategories to false and then GetVideos get's called?

Or maybe I'll have to traverse the tree manually one more level down so I can set HasSubCategories?
 

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    3,524
    1,724
    Nuenen
    Netherlands Netherlands
    Country flag
    If you already have the info (so no http-requests needed) I would parse one level deeper to determine if there are subcategories.
    If not (needs new http-request) I'd add a dummy subcategory (there is an option to automatically go one level deeper if only one item is available, so you don't notice that) and the videos below that dummy category.
     

    howudodat

    Portal Pro
    February 20, 2007
    75
    2
    United States of America United States of America
    I now have the categories building correctly and the videos playing. So now I have new questions:
    1. VideoInfo.PlaybackOptions - what goes in here ?
    2. My videos are playing with subtitles. Can these be turned off (the videos are mp4)
    3. I'd like to add a "sitewide" option for subtitles (in the UI). I'd also like to add an option for language. What's the best way to do this? Any particular sample I can look at. Since my top level list is only 4 options and probably will never be more than that, I was thinking doing something like:
    <Movies>
    <Music>
    <Music Videos>
    <News>
    <Choose Language>
    <Show Subtitles>
    Where the first 4 would be Categories that are then parsed. Choose Language is a dynamic list built from the site. Show Subitles would be a simple toggle.
    4. The AirDate field is in IS8601 format. It displays on the screen as Date Time. I only want date to be displayed (Update: got this one myself, I convert the date and then set it to AirDate)
     
    Last edited:

    Quarter

    MP Donator
  • Premium Supporter
  • June 21, 2010
    722
    138
    Queenstown
    New Zealand New Zealand
    Country flag
    You can you the context menu entry for settings like language. Then that can be accessed anywhere in your site


    Sent from my iPhone using Tapatalk
     

    howudodat

    Portal Pro
    February 20, 2007
    75
    2
    United States of America United States of America
    ok, I see how to do simple text fields, bools. How can I present a list of languages for the user to chose from?
    Also is there a way to add a "jump to home" option so that it jumps all the way back to the first call DiscoverDynamicCategories, from either Discovering sub categories or discovering the videos?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    3,524
    1,724
    Nuenen
    Netherlands Netherlands
    Country flag
    I think it's better to have settings like that (language/subs etc) in the onlinevideos configuration, but that's my humble opinion...
    Jump to home: no, that's not available.
    video.playbackoptions can be used if the video is present in multiple qualities.
     

    howudodat

    Portal Pro
    February 20, 2007
    75
    2
    United States of America United States of America
    I think it's better to have settings like that (language/subs etc) in the onlinevideos configuration
    So I have simple parameters working (bool and string). How can I present a list of a hundred different languages?
     

    howudodat

    Portal Pro
    February 20, 2007
    75
    2
    United States of America United States of America
    ok, here is what I have decided to do for now for the languages, since currently there are over 100 languages available.
    Configuration Option bool "Show All Languages"
    Configuration Option string "Language Filters"
    DiscoverDynamicCategories lists the languages. Either all if Show all is enabled, or all matching the filter. If only one matches then it auto skips the language list and goes straight to the categories.[DOUBLEPOST=1465315326][/DOUBLEPOST]Now on to my next sequence of questions:
    1. I need to clear the plugin's cache of categories and videos when the user goes back and changes the language (DiscoverDynamicCategories). How can I do that?
    2. One category is audio only, no video. How can I get OnlineVideos to play an audio only file? I get an error about no video to render.
    3. In the configuration options..a bool ends up with a sub menu of TRUE/FALSE. That's kind of lame. How can that just be a simple toggle?
    4. How can a mp4 with embedded subtitles (not burnt in) be told to not play the subtitles?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    3,524
    1,724
    Nuenen
    Netherlands Netherlands
    Country flag
    Wow, that are hard questions, I don't have an answer to them, perhaps @offbyone can answer those?
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,981
    3,703
    Stuttgart
    Germany Germany
    Country flag
    1. I need to clear the plugin's cache of categories and videos when the user goes back and changes the language (DiscoverDynamicCategories). How can I do that?
    2. One category is audio only, no video. How can I get OnlineVideos to play an audio only file? I get an error about no video to render.
    3. In the configuration options..a bool ends up with a sub menu of TRUE/FALSE. That's kind of lame. How can that just be a simple toggle?
    4. How can a mp4 with embedded subtitles (not burnt in) be told to not play the subtitles?
    1. No need to manually clear the categories. When the user opens the site config dialog and changes anything the site is completely recreated (new instance).
    2. OnlineVideos currently only supports videos. (Hence the name ;) ) So you'll have to filter out hese links.
    3. Not sure why it is that way, maybe in MP1 I didn't find any other way back when I implemented it.
    4. I guess the embedded subtitle track is marked as forced. The subtitle rendering is done by the MP player. Can you at least disable it while playing same as when playing a local file with subs?
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    Top Bottom