add radio

feature-unify_handlers
Tomáš Mládek 2019-04-03 11:01:09 +02:00 committed by Tomáš Mládek
parent 881550f1e9
commit 4ff94b2af6
1 changed files with 4 additions and 3 deletions

View File

@ -156,13 +156,14 @@ def handle(urls, message, download, tumblr=False, filename=None):
reply += ' to "' + hashtag + '"'
reply += '...'
if hashtag == 'AUDIO' and download != download_raw:
extract = False
if hashtag in ('AUDIO', 'RADIO') and download != download_raw:
extract = True
reply += ' (And also guessing you want to extract the audio)'
message.reply_text(reply)
filenames = download(urls,
hashtag or '.', message.date,
extract=(hashtag == 'AUDIO'),
filename=filename)
extract=extract, filename=filename)
if hashtag == 'TUMBLR':
message.reply_text('(btw, queueing to tumblr)')
for filename in filenames: