Fixed a bug in sound playback. Fixes #197

This commit is contained in:
Manuel Cortez 2017-12-10 10:22:12 -06:00
parent 5a03cc80ca
commit 4d6b589086
2 changed files with 4 additions and 6 deletions

View File

@ -104,14 +104,13 @@ class URLStream(object):
log.debug("Preparing URL: %s" % (url,)) log.debug("Preparing URL: %s" % (url,))
self.prepared = False self.prepared = False
self.url = url_shortener.unshorten(url) self.url = url_shortener.unshorten(url)
if self.url == None:
self.url = url
log.debug("Expanded URL: %s" % (self.url,)) log.debug("Expanded URL: %s" % (self.url,))
if self.url != None: if self.url != None:
transformer = audio_services.find_url_transformer(self.url) transformer = audio_services.find_url_transformer(self.url)
self.url = transformer(self.url) self.url = transformer(self.url)
log.debug("Transformed URL: %s. Prepared" % (self.url,)) log.debug("Transformed URL: %s. Prepared" % (self.url,))
else:
self.url = url
log.debug("Transformed URL: %s. Prepared" % (self.url,))
self.prepared = True self.prepared = True
def seek(self,step): def seek(self,step):

View File

@ -109,7 +109,6 @@ def compose_quoted_tweet(quoted_tweet, original_tweet, show_screen_names=False):
if quoted_tweet.has_key("retweeted_status"): if quoted_tweet.has_key("retweeted_status"):
if quoted_tweet["retweeted_status"].has_key("full_text"): if quoted_tweet["retweeted_status"].has_key("full_text"):
value = "full_text" value = "full_text"
log.error(quoted_tweet["retweeted_status"]["full_text"])
else: else:
value = "text" value = "text"
text = StripChars(quoted_tweet["retweeted_status"][value]) text = StripChars(quoted_tweet["retweeted_status"][value])