Fixed issue with url shorteners. Should help to fix #159

This commit is contained in:
Manuel Cortez 2017-09-17 23:28:31 -05:00
parent d333b5f5c3
commit da06c568c5
3 changed files with 3 additions and 9 deletions

View File

@ -5,7 +5,7 @@
* When authorising an account, you will see a dialogue with a cancel button, in case you want to abort the process. Also, NVDA will not be blocked when the process starts. ([#101](https://github.com/manuelcortez/TWBlue/issues/101)) * When authorising an account, you will see a dialogue with a cancel button, in case you want to abort the process. Also, NVDA will not be blocked when the process starts. ([#101](https://github.com/manuelcortez/TWBlue/issues/101))
* In the translator module, the list of available languages is fetched automatically from the provider. That means all of these languages will work and there will not be inconsistencies. Also we've removed the first combo box, because the language is detected automatically by Yandex'S API. ([#153](https://github.com/manuelcortez/TWBlue/issues/153)) * In the translator module, the list of available languages is fetched automatically from the provider. That means all of these languages will work and there will not be inconsistencies. Also we've removed the first combo box, because the language is detected automatically by Yandex'S API. ([#153](https://github.com/manuelcortez/TWBlue/issues/153))
* Trending topics, searches and conversation buffers will use mute settings set for the session in wich they were opened. ([#157](https://github.com/manuelcortez/TWBlue/issues/157)) * Trending topics, searches and conversation buffers will use mute settings set for the session in wich they were opened. ([#157](https://github.com/manuelcortez/TWBlue/issues/157))
* And more. ([#156,](https://github.com/manuelcortez/TWBlue/issues/156) [#163,](https://github.com/manuelcortez/TWBlue/issues/163)) * And more. ([#156,](https://github.com/manuelcortez/TWBlue/issues/156) [#163,](https://github.com/manuelcortez/TWBlue/issues/163) [#159,](https://github.com/manuelcortez/TWBlue/issues/159))
## changes in version 0.91 and 0.92 ## changes in version 0.91 and 0.92

View File

@ -115,7 +115,6 @@ class URLStream(object):
log.debug("Transformed URL: %s. Prepared" % (self.url,)) log.debug("Transformed URL: %s. Prepared" % (self.url,))
self.prepared = True self.prepared = True
def seek(self,step): def seek(self,step):
pos=self.stream.get_position() pos=self.stream.get_position()
pos=self.stream.bytes_to_seconds(pos) pos=self.stream.bytes_to_seconds(pos)
@ -145,7 +144,6 @@ class URLStream(object):
self.stream.volume = float(volume) self.stream.volume = float(volume)
self.stream.play() self.stream.play()
log.debug("played") log.debug("played")
# call_threaded(self.delete_when_done)
def stop_audio(self,delete=False): def stop_audio(self,delete=False):
if hasattr(self, "stream"): if hasattr(self, "stream"):

View File

@ -20,8 +20,4 @@ class URLShortener (object):
raise NotImplementedError raise NotImplementedError
def unshorten(self, url): def unshorten(self, url):
try: return url
r=requests.get(url)
return r.url
except:
return url #we cannot expand