Borim7 / radio-tray

RadioTray a simple music streaming player
Other
5 stars 0 forks source link

Test redirects with MMS streams #2

Open Borim7 opened 3 years ago

Borim7 commented 3 years ago

From StreamDecoder.getMediaStreamInfo() some redirect code was removed:

        except urllib.error.URLError as e:
            self.log.info('No radio stream found for %s', url)
            if str(e.reason).startswith('MMS REDIRECT'):
                newurl = e.reason.split("MMS REDIRECT:",1)[1]
                self.log.info('Found mms redirect for: %s', newurl)
                return UrlInfo(newurl, False, None)
            else:
                return None

Also DummyMMSHandler.py was removed. Redirects should be handled by requests module.

TODO test it