mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 00:46:57 +08:00
fix #2993 格式错误和传参警告
This commit is contained in:
@@ -95,13 +95,13 @@ class MediaServerChain(ChainBase):
|
||||
return self.run_module("mediaserver_latest", count=count, server=server, username=username)
|
||||
|
||||
@cached(cache=TTLCache(maxsize=1, ttl=3600))
|
||||
def get_latest_wallpapers(self, server:str, count=20) -> List[str]:
|
||||
def get_latest_wallpapers(self, server: str = None, count=20) -> List[str]:
|
||||
"""
|
||||
获取最新最新入库条目海报作为壁纸,缓存1小时
|
||||
"""
|
||||
return self.run_module("mediaserver_latest_images", server=server, count=count)
|
||||
|
||||
def get_latest_wallpaper(self, server:str) -> Optional[str]:
|
||||
def get_latest_wallpaper(self, server: str = None) -> Optional[str]:
|
||||
"""
|
||||
获取最新最新入库条目海报作为壁纸,缓存1小时
|
||||
"""
|
||||
|
||||
@@ -642,7 +642,7 @@ class SubscribeChain(ChainBase):
|
||||
f'{torrent_info.site_name} - {torrent_info.title} 因订阅存在自定义识别词,重新识别元数据...')
|
||||
# 重新识别元数据
|
||||
torrent_meta = MetaInfo(title=torrent_info.title, subtitle=torrent_info.description,
|
||||
custom_words=subscribe.custom_word)
|
||||
custom_words=subscribe.custom_words)
|
||||
# 媒体信息需要重新识别
|
||||
torrent_mediainfo = None
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ class EmbyModule(_ModuleBase, _MediaServerBase[Emby]):
|
||||
return server.get_latest(num=count, username=username)
|
||||
|
||||
def mediaserver_latest_images(self,
|
||||
server: str,
|
||||
server: str = None,
|
||||
count: int = 20,
|
||||
username: str = None,
|
||||
host_type: bool = True,
|
||||
@@ -311,4 +311,3 @@ class EmbyModule(_ModuleBase, _MediaServerBase[Emby]):
|
||||
links.append(item.image)
|
||||
|
||||
return links
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ class JellyfinModule(_ModuleBase, _MediaServerBase[Jellyfin]):
|
||||
return server.get_latest(num=count, username=username)
|
||||
|
||||
def mediaserver_latest_images(self,
|
||||
server: str,
|
||||
server: str = None,
|
||||
count: int = 20,
|
||||
username: str = None,
|
||||
host_type: bool = True,
|
||||
@@ -301,7 +301,7 @@ class JellyfinModule(_ModuleBase, _MediaServerBase[Jellyfin]):
|
||||
links = []
|
||||
items: List[schemas.MediaServerPlayItem] = self.mediaserver_latest(num=count, username=username)
|
||||
for item in items:
|
||||
link = server.generate_image_link(item_id=item.id, image_type="Backdrop",host_type=host_type)
|
||||
link = server.generate_image_link(item_id=item.id, image_type="Backdrop", host_type=host_type)
|
||||
if link:
|
||||
links.append(link)
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ class PlexModule(_ModuleBase, _MediaServerBase[Plex]):
|
||||
return server.get_latest(num=count)
|
||||
|
||||
def mediaserver_latest_images(self,
|
||||
server: str,
|
||||
server: str = None,
|
||||
count: int = 20,
|
||||
username: str = None,
|
||||
) -> List[str]:
|
||||
|
||||
Reference in New Issue
Block a user