mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-05-11 18:45:58 +08:00
webui: change v-bind model. add transition effect in mian page.
This commit is contained in:
@@ -89,6 +89,7 @@ class TorrentManager(Database):
|
||||
)
|
||||
|
||||
def enable_rule(self, _id: str | int):
|
||||
# TODO: to fix search_id
|
||||
data = self.bangumi.search(int(_id))
|
||||
if isinstance(data, Bangumi):
|
||||
data.deleted = False
|
||||
|
||||
@@ -79,7 +79,10 @@ def tmdb_parser(title, language) -> TMDBInfo | None:
|
||||
original_title = info_content.get("original_name")
|
||||
official_title = info_content.get("name")
|
||||
year_number = info_content.get("first_air_date").split("-")[0]
|
||||
poster_link = "https://image.tmdb.org/t/p/w300" + poster_path
|
||||
if poster_path:
|
||||
poster_link = "https://image.tmdb.org/t/p/w300" + poster_path
|
||||
else:
|
||||
poster_link = None
|
||||
return TMDBInfo(
|
||||
id,
|
||||
official_title,
|
||||
|
||||
@@ -12,6 +12,7 @@ def search_url(site: str, keywords: list[str]) -> RSSItem:
|
||||
parser = "mikan" if site == "mikan" else "tmdb"
|
||||
rss_item = RSSItem(
|
||||
url=url,
|
||||
aggregate=False,
|
||||
parser=parser,
|
||||
)
|
||||
return rss_item
|
||||
|
||||
@@ -18,6 +18,7 @@ SEARCH_KEY = [
|
||||
|
||||
BangumiJSON: TypeAlias = str
|
||||
|
||||
|
||||
class SearchTorrent(RequestContent, RSSAnalyser):
|
||||
def search_torrents(
|
||||
self, rss_item: RSSItem, limit: int = 5
|
||||
@@ -29,9 +30,11 @@ class SearchTorrent(RequestContent, RSSAnalyser):
|
||||
rss_item = search_url(site, keywords)
|
||||
torrents = self.search_torrents(rss_item)
|
||||
# yield for EventSourceResponse (Server Send)
|
||||
exist_list = []
|
||||
for torrent in torrents:
|
||||
bangumi = self.torrent_to_data(torrent=torrent, rss=rss_item)
|
||||
if bangumi:
|
||||
if bangumi and bangumi not in exist_list:
|
||||
exist_list.append(bangumi)
|
||||
yield json.dumps(bangumi.dict(), separators=(',', ':'))
|
||||
|
||||
def search_season(self, data: Bangumi):
|
||||
|
||||
Reference in New Issue
Block a user