remove Google Play Music button since its discontinued

This commit is contained in:
David Daily 2020-09-18 16:27:45 -05:00
parent 12118c5dd3
commit 6904bf3635

View File

@ -138,7 +138,6 @@ def button(update, context: CallbackContext):
songlink = "https://song.link/{0}".format(sp_link)
gpm = ask_for_credentials()
if not gpm.is_authenticated():
print("\n\nGPM fucked up somewhere\n\n")
@ -170,10 +169,10 @@ def button(update, context: CallbackContext):
search_results = re.findall(r'href=\"\/watch\?v=(.{11})', html_content.read().decode())
yt_link = f"http://www.youtube.com/watch?v={search_results[0]}"
if gpm_link:
reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("Spotify", url = sp_link), InlineKeyboardButton("GPM", url = gpm_link), InlineKeyboardButton("YouTube", url = yt_link), InlineKeyboardButton("More", url = songlink)]])
if not gpm_link:
# if gpm_link:
# reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("Spotify", url = sp_link), InlineKeyboardButton("GPM", url = gpm_link), InlineKeyboardButton("YouTube", url = yt_link), InlineKeyboardButton("More", url = songlink)]])
# Google Play Music is no more, I hope the API still works for a while. I'll have to hunt for one for youtube music
# if not gpm_link:
reply_markup = InlineKeyboardMarkup([[InlineKeyboardButton("Spotify", url = sp_link), InlineKeyboardButton("YouTube", url = yt_link), InlineKeyboardButton("More", url = songlink)]])
query.edit_message_reply_markup(reply_markup=reply_markup)