mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 23:37:47 +00:00
Merge pull request #44 from strNophix/lastfm-scrobbler
Plugins + lastfm scrobbler
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
from tunebot.redis.entity import * # noreorder
|
||||
# noreorder
|
||||
from tunebot.redis.entity import *
|
||||
from tunebot.redis.utils import *
|
||||
from tunebot.redis.autojoin import *
|
||||
from tunebot.redis.playlist import *
|
||||
from tunebot.redis.playlist_source import *
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
from typing import Any
|
||||
|
||||
from tunebot.redis import RedisBotEntity
|
||||
|
||||
|
||||
class GlobalRedisUtils(RedisBotEntity):
|
||||
async def raw_table_lookup(self, table_name: str, keys: list[Any]) -> list[Any]:
|
||||
if len(keys) == 0:
|
||||
return []
|
||||
|
||||
result: list[Any] = await self.redis.hmget(table_name, keys)
|
||||
return result
|
||||
|
||||
async def raw_table_del_entry(self, table_name: str, keys: list[Any]):
|
||||
if len(keys) == 0:
|
||||
return
|
||||
|
||||
await self.redis.hdel(table_name, *keys)
|
||||
Reference in New Issue
Block a user