Home of the Squeezebox™ & Transporter® network music players.
Page 6 of 6 FirstFirst ... 456
Results 51 to 59 of 59
  1. #51
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,904

    scanUrl not being called

    I have no issue with the myplugin:// URLs being shown.
    It is what they hide that I wanted to be hidden.

    They are "relatively" stable and I could make them even more stable.
    A change in the underlying stream URL would (broadly at least) be hidden from the user and would allow Favourites to be set and used (which I have done).

    Edit: My intention is to use URL-encoded station name for the PH name but that can come later. It does not make a difference to getting the thing to play.
    Last edited by Paul Webster; 2021-05-28 at 11:55.
    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, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Dandelion Radio, Europa Radio Jazz, Frequence3, FSK, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Radio Swiss, RTE Ireland, Somehow Jazz, Supla Finland

  2. #52
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,853
    Quote Originally Posted by Paul Webster View Post
    I have no issue with the myplugin:// URLs being shown.
    It is what they hide that I wanted to be hidden.

    They are "relatively" stable and I could make them even more stable.
    A change in the underlying stream URL would (broadly at least) be hidden from the user and would allow Favourites to be set and used (which I have done).

    Edit: My intention is to use URL-encoded station name for the PH name but that can come later. It does not make a difference to getting the thing to play.
    Looking at the problem - the subclassing of https by plugin means your plugin is given the m3u8 https back after it has asked LMS to play it and PlayHLS has scanned it (via callbacks).
    If your plugin does not subclass https - then LMS can't seem to find the PlayHLS handler - so there is some underlying issue in the way the HLS URL is being asked to play that is different form say Tune-in.

    The solution may require a LMS change but I'll continue to look to find the problem.

    As a backup, I thought there could be a different LMS way to hide the info under control of plugin.

    As a proof of concept - I change the xmlbrowser_details.html file (I couldn't remember template syntax fully so it is crude) - I added a test for '#HIDEME' at end of URL.
    so any URL with '#HIDEME' at end will not be displayed. The "#" at end of an URL is an anchor and ignored in URL processing.

    The plugin can add '#HIDEME' to any URL it wants to suppress.

    Code:
    		[% IF streaminfo.item.url %]
    			[% IF !streaminfo.item.url.search('#HIDEME$') %]
    				[% item = BLOCK %]<a href="[% streaminfo.item.url | html %]" target="_blank">[% streaminfo.item.url | html %]</a>[% END %]
    				[% PROCESS songInfoItem title = "URL" %]
    			[% END %]
    		[% END %]
    Material would need a change.

  3. #53
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,904
    Thanks for the extra idea.
    I'll try it out.
    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, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Dandelion Radio, Europa Radio Jazz, Frequence3, FSK, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Radio Swiss, RTE Ireland, Somehow Jazz, Supla Finland

  4. #54
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,853
    Besides HLS, What other stream types is the pr:// protocol handler used for ?

    The PH "new" using the URL wants to create a HTTP/HTTPS connection to an URL - so it will never invoke the PlayHLS .

    If your PH only ever calls PlayHLS - then the PH might able to just call PlayHLS "new" directly instead of SUPER (which is for a HTTPS stream)
    Code:
     my $self = Plugins::PlayHLS::HLSPLAY->new($args);
    IN test, this gets further in that PlayHLS start doing processing but then stops. More work needed.


    edit:

    The HLSPLAY new expects the hlsplay:// URL - the result of the PlayHLS scanURL. So this PlanetRadio scanURL is calling PlayHLS scanUrl (actually scanStream) but it seems the results are being lost.

    So it comes back to scanUrl.
    Last edited by bpa; 2021-05-28 at 15:10.

  5. #55
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,904
    I did try switching the url from https to hlsplay (see the PM from yesterday).

    In the particular case that I am working on, there are a mixture of HLS and Icecast/Shoutcast streams and it is only the HLS ones that are causing me problems. I can (currently in my case) identify them from strings in the URL although that is not foolproof.

    However, in the ideal world my plugin should not need to know anything about the type of protocol (etc) needed to play the stream. Knowing that the raw URLs work when no special PH is used means that at some level LMS can do it all itself (with assistance from genuine protocol helpers like PlayHLS).

    Maybe when HLS is natively supported in LMS this problem would disappear.

    Anyway - I'll continue with the experimentation.
    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, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Dandelion Radio, Europa Radio Jazz, Frequence3, FSK, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Radio Swiss, RTE Ireland, Somehow Jazz, Supla Finland

  6. #56
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,853
    I'll continue on this later today and I think I may have an answer.

    Quote Originally Posted by Paul Webster View Post
    I did try switching the url from https to hlsplay (see the PM from yesterday).

    In the particular case that I am working on, there are a mixture of HLS and Icecast/Shoutcast streams and it is only the HLS ones that are causing me problems. I can (currently in my case) identify them from strings in the URL although that is not foolproof.

    However, in the ideal world my plugin should not need to know anything about the type of protocol (etc) needed to play the stream. Knowing that the raw URLs work when no special PH is used means that at some level LMS can do it all itself (with assistance from genuine protocol helpers like PlayHLS).
    The problem arises is because your PH is subclassing HTTP and so has forced all URLS are to be played as HTTP/AAC or HTTP/mp3 because the "new" creates that HTTP PH object.

    You have not allowed for any non HTTP/AAC HTTP/MP3 stream to be be processed and nor have asked LMS to determine what PH is required.

    Maybe when HLS is natively supported in LMS this problem would disappear.
    It does now for the non PH case but for a PH needing to calli a different class of PH - I think issue may still arise. I think your PH will need to use a different Base this and not force HTTP PH handling on all URLs.

    I believe this is sort of a new LMS application as all playable URLs up to now have HTTP streams (ie.. one GET) so these are new unseen problems and will feed back into changes in the PlayHLS implementation (also a DASH one as well) and maybe some LMS ones.

    Anyway - I'll continue with the experimentation.
    Leave it with me for awhile.

  7. #57
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,904
    I think I'll take another look at hideURL to see if I can change LMS to make it more pervasive - after all it offers to do exactly what I want (at least in its name) and then I can use Triode's trick for other parts. This then means no need to have a PH at all which I always thought was a complicated solution aimed to solve a different problem.
    If I do manage to make hideURL work then I would have to make my plugin rely on that version of LMS (at least for this capability) which would be a shame though.

    Of course, if you find a neat way to get it work with PH then I'd be happy as well.
    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, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Dandelion Radio, Europa Radio Jazz, Frequence3, FSK, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Radio Swiss, RTE Ireland, Somehow Jazz, Supla Finland

  8. #58
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,853
    Quote Originally Posted by Paul Webster View Post
    I think I'll take another look at hideURL to see if I can change LMS to make it more pervasive - after all it offers to do exactly what I want (at least in its name) and then I can use Triode's trick for other parts. This then means no need to have a PH at all which I always thought was a complicated solution aimed to solve a different problem.
    If I do manage to make hideURL work then I would have to make my plugin rely on that version of LMS (at least for this capability) which would be a shame though.
    While hiding the URL will provide a solution - there is still the issues of Favorites. If a playing URL is saved as favorites - it will be clearly visible.
    The PH approach avoid this by having a custom URL.

    However, at the centre of this issues, is there a general issue - are there some URLs that should not be exposed ? The counterargument is that given LMS is open - it is not hard to discover the "hidden" URLs.

    I believe a facility should be there for plugin to hide URLs - it is not 100% secure but enough to stop casual abuse.

    Of course, if you find a neat way to get it work with PH then I'd be happy as well.
    Because of the starting point, it can't be neat - first make a solution that works and then maybe make solution not so kludgy.

  9. #59
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,904
    Showing some and hiding others behind a PH is fine - that is already in the code.
    In my case I don't need to use a PH for many of the URLs ... but I can.

    I am currently putting in the code that I mentioned before to support %-encoded station names in the PH which makes it a bit more future-proof - since it feels like there is a solution coming.
    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, AllZIC Radio, Caroline Flashback, Cesky rozhlas, Dandelion Radio, Europa Radio Jazz, Frequence3, FSK, JukeRadio, KlassikRadio.de, Linn Radio, Mother Earth, Naim Radio, Nova.fr, RadioBlues Flac, Radio Espace, Radio Swiss, RTE Ireland, Somehow Jazz, Supla Finland

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •