Can I disable html call to opml.radiotime.com?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AF1
    Senior Member
    • Jul 2010
    • 670

    Can I disable html call to opml.radiotime.com?

    > Thanks. Sorry to be so ignorant, but how do I run that with the patch
    > command (I've only ever run patch a few times in my life)?


    Hehe... I would have to look it up myself... I'm using a graphical tool.
    But it's only two lines anyway. Replace the 1 with a 0, and copy/paste
    the other line to the corresponding file. :-)

    --

    Michael
    Report a problem
  • AF1
    Senior Member
    • Jul 2010
    • 670

    #2
    Can I disable html call to opml.radiotime.com?

    Hi.

    One of my LMS (latest 7.9.1 nightly, macOS 10.12) has no internet connection. To make debugging easier and my log less cluttered, I would very much like to get rid of the error messages that complain (every couple of minutes or so) about timed out connection attempts:

    Code:
    Connect timed out: 
    [17-09-08 17:36:10.0633] Slim::Plugin::InternetRadio::Plugin::_gotRadioError (67) Unable to retrieve radio directory from SN: Connect timed out: 
    [17-09-08 17:37:05.0670] Slim::Formats::XML::gotErrorViaHTTP (310) Error: getting http://opml.radiotime.com/Index.aspx?partnerId=16
    If there is no option in the settings (I didn't find one), I'd gladly settle for a little hack or someting like this.
    Thank you.
    Report a problem

    Comment

    • mherger
      Babelfish's Best Boy
      • Apr 2005
      • 24636

      #3
      Can I disable html call toopml.radiotime.com?

      > One of my LMS (latest 7.9.1 nightly, macOS 10.12) has no internet
      > connection. To make debugging easier and my log less cluttered, I would
      > very much like to get rid of the error messages that complain (every
      > couple of minutes or so) about timed out connection attempts:


      Don't use the Radios menu. Or accept those messages as another potential
      pointer to your issue? If you get an error complaining about connection
      time outs every few minutes, then you've got a networking issue.


      --

      Michael
      Michael

      "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
      (LMS: Settings/Information)

      Comment

      • AF1
        Senior Member
        • Jul 2010
        • 670

        #4
        Originally posted by mherger
        you've got a networking issue.
        Ok, what I meant was "has no internet connection" because it's by design, like a stand-alone setup, only LAN with a local server. I don't use the Radio Menu, was just curious if it's possible to disable what seems to be downloading a radio station list or something. I figured the error messages would go away then. Well, nevermind...
        Report a problem

        Comment

        • bpa
          Senior Member
          • Oct 2005
          • 22876

          #5
          A hack that might work you would be to edit the install.xml file in the plugin/InternetRadio directory. Change MaxVersion from "*" to 7.3, save and restart LMS. This will break loading of the InternetRadio plugin. I don't know whether LMS will work OK without the plugin as it seems to be one that cannot be disabled in the Plugins tab..

          Comment

          • AF1
            Senior Member
            • Jul 2010
            • 670

            #6
            Thank you very much, bpa. Really appreciate your help however stupid my little problem may seem. In the end I just disabled/commented most of the retry subfunction in the plugin.pm file. This way the plugin is not broken and it won't endlessly retry to connect to the internet in vain. Sure, I'll have to edit this file after every update. I'll just update less often then. So thank you very much.
            Report a problem

            Comment

            • PasTim
              Senior Member
              • Nov 2010
              • 3287

              #7
              Originally posted by mherger
              > One of my LMS (latest 7.9.1 nightly, macOS 10.12) has no internet
              > connection. To make debugging easier and my log less cluttered, I would
              > very much like to get rid of the error messages that complain (every
              > couple of minutes or so) about timed out connection attempts:


              Don't use the Radios menu. Or accept those messages as another potential
              pointer to your issue? If you get an error complaining about connection
              time outs every few minutes, then you've got a networking issue.


              --

              Michael
              I quite often deliberately run without any internet connection. However, with a connection (as far as I know) on starting LMS last night I saw a delay of 4 minutes waiting for LMS to start. The log was as below. It's as if LMS then went to sleep and was then 'woken' by my "server power control" plugin. This may be just a one-off. Any views?

              Code:
              [18-01-27 22:59:35.1598] Plugins::SrvrPowerCtrl::Settings::new (242) Server Power Control, version 20141101.163656, is running on LMS version 7.9.1 on unix:Debian, user squeezeboxserver  
              [18-01-27 23:00:19.7854] Slim::Formats::XML::gotErrorViaHTTP (338) Error: getting http://opml.radiotime.com/Index.aspx?partnerId=16
              Timed out waiting for data
              [18-01-27 23:00:19.7863] Slim::Plugin::InternetRadio::Plugin::_gotRadioError (67) Unable to retrieve radio directory from SN: Timed out waiting for data
              [18-01-27 23:04:41.5512] Plugins::SrvrPowerCtrl::Watchdog::OnWakeupWatchdog (651) Wakeup Call!!
              LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
              LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
              Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
              Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
              Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

              Comment

              • Paul Webster
                Senior Member
                • Apr 2005
                • 10336

                #8
                Maybe a new --nointernet switch for LMS would be a good thing to have.
                Then various bit of code that cannot be disabled from Settings could check for 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

                Comment

                • Roland0
                  Senior Member
                  • Aug 2012
                  • 1343

                  #9
                  A simple workaround would be to redirect the request to a local web server.
                  Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ...
                  Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

                  Comment

                  • PasTim
                    Senior Member
                    • Nov 2010
                    • 3287

                    #10
                    Originally posted by Roland0
                    A simple workaround would be to redirect the request to a local web server.
                    It may be simple for those who understand such stuff well, but I wouldn't have a clue where to start :-)
                    LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                    LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                    Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                    Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                    Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                    Comment

                    • Roland0
                      Senior Member
                      • Aug 2012
                      • 1343

                      #11
                      Originally posted by PasTim
                      It may be simple for those who understand such stuff well, but I wouldn't have a clue where to start :-)
                      Assuming the following:
                      - web server will run on the same server as LMS
                      - busybox is installed (it usually is)
                      - files needed go into /home/user/www (can be any dir)
                      Code:
                      mkdir /home/user/www; cd /home/user/www
                      wget -O Index.aspx "http://opml.radiotime.com/Index.aspx?partnerId=16"
                      edit /home/user/www/httpd.conf
                      Code:
                      A:127.0.0.1
                      D:*
                      
                      .aspx:text/xml
                      edit /etc/hosts
                      Code:
                      127.0.0.1 opml.radiotime.com
                      start server:
                      Code:
                      sudo busybox httpd -p 80 -h /home/user/www -c /home/user/www/httpd.conf
                      Test without network:
                      Code:
                      wget "http://opml.radiotime.com/Index.aspx?partnerId=16"
                      Various SW: Web Interface | Text Interface | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Ambient Noise Mixer | DB Optimizer | Image Enhancer | Chiptunes | LMSlib2go | ...
                      Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...

                      Comment

                      • PasTim
                        Senior Member
                        • Nov 2010
                        • 3287

                        #12
                        Originally posted by Roland0
                        Assuming the following:
                        - web server will run on the same server as LMS
                        - busybox is installed (it usually is)
                        - files needed go into /home/user/www (can be any dir)
                        Code:
                        mkdir /home/user/www; cd /home/user/www
                        wget -O Index.aspx "http://opml.radiotime.com/Index.aspx?partnerId=16"
                        edit /home/user/www/httpd.conf
                        Code:
                        A:127.0.0.1
                        D:*
                        
                        .aspx:text/xml
                        edit /etc/hosts
                        Code:
                        127.0.0.1 opml.radiotime.com
                        start server:
                        Code:
                        sudo busybox httpd -p 80 -h /home/user/www -c /home/user/www/httpd.conf
                        Test without network:
                        Code:
                        wget "http://opml.radiotime.com/Index.aspx?partnerId=16"
                        Thanks - much to think about there. I don't have busybox on my server (it's an old vortexbox PC running xubuntu) but I do have a basic apache web server (of which I know little, but just enough so far for a few simple file shares and extra repos for LMS).

                        As I understand it you are suggesting I redirect all requests to opml.radiotime.com to my local host, and that I should pull down the index from opml.radiotime. OK so far.

                        However, you have an httpd.conf file and contents specified. I don't have such a file and don't quite understand the contents. I shall experiment to see whether the web address gets picked up or not without that file.

                        Edit: I just got permission from those who matter to disconnect from the world for a minute or two. This works. Thanks very much. I'll need to do more research into how this new Index.aspx might affect other things I might have to add in the future.
                        Last edited by PasTim; 2018-01-29, 21:18. Reason: More info
                        LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                        LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                        Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                        Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                        Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                        Comment

                        • mherger
                          Babelfish's Best Boy
                          • Apr 2005
                          • 24636

                          #13
                          Can I disable html call toopml.radiotime.com?

                          > Maybe a new --nointernet switch for LMS would be a good thing to have.
                          > Then various bit of code that cannot be disabled from Settings could
                          > check for that.


                          --nointernet would be difficult to enforce, as we have little control
                          over eg. 3rd party plugins. But right now the InternetRadio plugin is
                          enabled by default and can't be disabled. I think the right thing to do
                          would be allowing this plugin to be disabled. After all that's what's
                          causing your problem. In addition with --nomysqueezebox pretty much
                          every default internet activity would be disabled by this.

                          --

                          Michael
                          Michael

                          "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                          (LMS: Settings/Information)

                          Comment

                          • mherger
                            Babelfish's Best Boy
                            • Apr 2005
                            • 24636

                            #14
                            Can I disable html call toopml.radiotime.com?

                            If you want to give this a try, then edit the Slim/Plugin/InternetRadio/install.xml, remove the "enforce" line. Restart LMS. Now you should be able to disable it in the plugin settiongs.

                            Full patch:

                            Code:
                            diff --git a/Slim/Formats/XML.pm b/Slim/Formats/XML.pm
                            index 928373f..59f6d9c 100644
                            --- a/Slim/Formats/XML.pm
                            +++ b/Slim/Formats/XML.pm
                            @@ -143,7 +143,8 @@
                             
                             	if ( $url =~ /(?:radiotime|tunein\.com)/ ) {
                             		# Add the TuneIn username
                            -		if ( $url !~ /username/ && $url =~ /(?:presets|title)/ 
                            +		if ( $url !~ /username/ && $url =~ /(?:presets|title)/
                            +			&& Slim::Utils::PluginManager->isEnabled('Slim::Plugin::InternetRadio::Plugin') 
                             			&& ( my $username = Slim::Plugin::InternetRadio::TuneIn->getUsername($params->{client}) )
                             		) {
                             			$url .= '&username=' . uri_escape_utf8($username);
                            diff --git a/Slim/Plugin/InternetRadio/install.xml b/Slim/Plugin/InternetRadio/install.xml
                            index c33ca47..ec6cdc9 100644
                            --- a/Slim/Plugin/InternetRadio/install.xml
                            +++ b/Slim/Plugin/InternetRadio/install.xml
                            @@ -8,7 +8,7 @@
                             	<description>PLUGIN_INTERNET_RADIO_MODULE_NAME_DESC</description>
                             	<creator>Logitech</creator>
                             	<defaultState>enabled</defaultState>
                            -	<enforce>1</enforce>
                            +	<enforce>0</enforce>
                             	<homepageURL>http://www.mysqueezebox.com/support</homepageURL>
                             	<type>2</type><!-- type=extension -->
                             	<targetApplication>
                            --

                            Michael
                            Last edited by mherger; 2018-01-30, 07:17.
                            Michael

                            "It doesn't work - what shall I do?" - "Please check your server.log and/or scanner.log file!"
                            (LMS: Settings/Information)

                            Comment

                            • PasTim
                              Senior Member
                              • Nov 2010
                              • 3287

                              #15
                              Originally posted by mherger
                              If you want to give this a try, then edit the Slim/Plugin/InternetRadio/install.xml, remove the "enforce" line. Restart LMS. Now you should be able to disable it in the plugin settiongs.

                              Full patch:

                              Code:
                              diff --git a/Slim/Formats/XML.pm b/Slim/Formats/XML.pm
                              index 928373f..59f6d9c 100644
                              --- a/Slim/Formats/XML.pm
                              +++ b/Slim/Formats/XML.pm
                              @@ -143,7 +143,8 @@
                               
                               	if ( $url =~ /(?:radiotime|tunein\.com)/ ) {
                               		# Add the TuneIn username
                              -		if ( $url !~ /username/ && $url =~ /(?:presets|title)/ 
                              +		if ( $url !~ /username/ && $url =~ /(?:presets|title)/
                              +			&& Slim::Utils::PluginManager->isEnabled('Slim::Plugin::InternetRadio::Plugin') 
                               			&& ( my $username = Slim::Plugin::InternetRadio::TuneIn->getUsername($params->{client}) )
                               		) {
                               			$url .= '&username=' . uri_escape_utf8($username);
                              diff --git a/Slim/Plugin/InternetRadio/install.xml b/Slim/Plugin/InternetRadio/install.xml
                              index c33ca47..ec6cdc9 100644
                              --- a/Slim/Plugin/InternetRadio/install.xml
                              +++ b/Slim/Plugin/InternetRadio/install.xml
                              @@ -8,7 +8,7 @@
                               	<description>PLUGIN_INTERNET_RADIO_MODULE_NAME_DESC</description>
                               	<creator>Logitech</creator>
                               	<defaultState>enabled</defaultState>
                              -	<enforce>1</enforce>
                              +	<enforce>0</enforce>
                               	<homepageURL>http://www.mysqueezebox.com/support</homepageURL>
                               	<type>2</type><!-- type=extension -->
                               	<targetApplication>
                              --

                              Michael
                              Thanks. Sorry to be so ignorant, but how do I run that with the patch command (I've only ever run patch a few times in my life)?

                              I've tried unsuccessfully with -i and the name of the patch file (when in the perl5 directory).
                              LMS 8.1 on PC, Xubuntu 20.04, FLACs 16->24 bit, 44.1->192kbps. 2 Touches & EDO.
                              LMS plugin UPnP/DLNA Bridge to MF M1 CLiC (A308CR amp & ESLs) & Marantz CR603 UPnP renderers.
                              Also Minimserver & Upplay to same & to upmpdcli/mpd PC renderers.
                              Squeezelite to Meridian USB Explorer DAC to PC speakers/headphones.
                              Wireless Xubuntu 20.04 laptop firefox/upplay or Android mobile with Squeeze-Ctrl/BubbleUPnP controls LMS/Minimserver.

                              Comment

                              Working...