def artist(bot, update, groups, lang): if groups[1] == 'ps': return voca_db.songs('', lang, artist_id=groups[2]), None elif groups[1] == 'ls': return voca_db.songs('', lang, artist_id=groups[2], sort='AdditionDate'), None elif groups[1] == 'pa': return voca_db.albums('', lang, artist_id=groups[2], sort='RatingAverage'), None elif groups[1] == 'la': return voca_db.albums('', lang, artist_id=groups[2], sort='ReleaseDate'), None
def song_search(bot, update, groups, lang): switch_pm = (_('Searching only songs'), 'help_inline') originals_only = get_setting('originals', bot, update) return voca_db.songs(groups[0], lang, max_results=MAX_INLINE_RESULTS, originals_only=originals_only), switch_pm
def search(bot, update, args, lang, songs=False, artists=False, albums=False, state=None): query = args if type(args) == str else ' '.join(args) if songs and artists and albums: entries = voca_db.entries(query, lang) elif songs: originals_only = get_setting('originals', bot, update) entries = voca_db.songs(query, lang, originals_only=originals_only) elif artists: entries = voca_db.artists(query, lang) elif albums: entries = voca_db.albums(query, lang) else: return None, None return entries, state
def top(bot, update, lang): return voca_db.songs('', lang, max_results=MAX_INLINE_RESULTS), None
def new(bot, update, lang): return voca_db.songs('', lang, sort='AdditionDate'), None
def top(bot, update, lang): return voca_db.songs('', lang), None