diff --git a/music.py b/music.py index ecacdf4..3c69897 100755 --- a/music.py +++ b/music.py @@ -137,8 +137,7 @@ def button(update, context: CallbackContext): sp_art = dpath.util.get(sp_info, f"/tracks/items/[{result_chosen}]/album/images/[2]/url") 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)