OnlineVideos JSON parsing | Page 4

Discussion in 'OnlineVideos' started by howudodat, December 6, 2015.

  1. howudodat

    howudodat Portal Pro

    Joined:
    February 20, 2007
    Messages:
    75
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    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?


     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,755
    Likes Received:
    710
    Location:
    Nuenen
    Ratings:
    +1,058 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.
     
  4. howudodat

    howudodat Portal Pro

    Joined:
    February 20, 2007
    Messages:
    75
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    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: June 6, 2016
  5. Quarter
    • Super User

    Quarter Super User

    Joined:
    June 21, 2010
    Messages:
    722
    Likes Received:
    109
    Gender:
    Male
    Location:
    Queenstown
    Ratings:
    +139 / 2
    Home Country:
    New Zealand New Zealand
    Show System Specs
    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
     
  6. howudodat

    howudodat Portal Pro

    Joined:
    February 20, 2007
    Messages:
    75
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    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?
     
  7. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,755
    Likes Received:
    710
    Location:
    Nuenen
    Ratings:
    +1,058 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    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.
     
  8. howudodat

    howudodat Portal Pro

    Joined:
    February 20, 2007
    Messages:
    75
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    United States of America United States of America
    So I have simple parameters working (bool and string). How can I present a list of a hundred different languages?
     
  9. howudodat

    howudodat Portal Pro

    Joined:
    February 20, 2007
    Messages:
    75
    Likes Received:
    2
    Ratings:
    +2 / 0
    Home Country:
    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?
     
    • Like Like x 1
  10. doskabouter
    • Premium Supporter

    doskabouter Community Plugin Dev

    Joined:
    September 27, 2009
    Messages:
    2,755
    Likes Received:
    710
    Location:
    Nuenen
    Ratings:
    +1,058 / 1
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Wow, that are hard questions, I don't have an answer to them, perhaps @offbyone can answer those?
     
  11. offbyone
    • Team MediaPortal

    offbyone Development Group

    Joined:
    April 26, 2008
    Messages:
    3,981
    Likes Received:
    2,704
    Gender:
    Male
    Location:
    Stuttgart
    Ratings:
    +3,303 / 3
    Home Country:
    Germany Germany
    Show System Specs
    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?
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!