Using OPML to invoke parser in plugin without URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Webster
    Senior Member
    • Apr 2005
    • 9634

    Using OPML to invoke parser in plugin without URL

    I want to extend the menu in one of my plugins that already loads its menu via an OPML file ... which contains a static list of stations.

    I want to add some dynamic content which would appear after a user clicks on the new menu item.

    I see (for example from BBCiPlayer plugin) that one of the attributes is "parser" but would that parser be called (it would go off and do its own thing) if the "URL" parameter was empty or missing?

    If not - then I suppose I could put in a dummy URL that fetches something local but is then ignored.

    I can see, from the VirginRadio plugin for example, ways to dynamically generate the entire menu but having already made a 400+ line OPML file I wanted to see if I can avoid having to redo all of that.
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin
  • bpa
    Senior Member
    • Oct 2005
    • 22622

    #2
    You can have a static URL and parser will be called but beware of caching - if LMS see same URL it will use cached result from previous parse so menu result will not be dynamic.

    I think another parameter nocache will disable caching if URL (and result) is unchanging.

    edit:

    An URL which will give a different result everytime - could be a clock.
    Last edited by bpa; 2021-02-22, 17:40.

    Comment

    • Paul Webster
      Senior Member
      • Apr 2005
      • 9634

      #3
      Thanks.
      I'll give it a try.
      Paul Webster
      Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
      and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

      Comment

      • Paul Webster
        Senior Member
        • Apr 2005
        • 9634

        #4
        I worked through it (in my head) but was struggling to see how I would get my extra data without pausing LMS.

        So I think I will switch over to expectingtofly/Stuart's way because that lets me do my own set of async http calls to get my extra data and feed the data back into the menu later via a callback when it is all handled.
        Paul Webster
        Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
        and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

        Comment

        Working...