Merge pull request #44 from strNophix/lastfm-scrobbler

Plugins + lastfm scrobbler
This commit is contained in:
2021-12-08 19:39:01 +01:00
committed by GitHub
16 changed files with 498 additions and 36 deletions
+3 -1
View File
@@ -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 *
+18
View File
@@ -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)