Merge pull request #459 from thsrite/main
This commit is contained in:
commit
2077eede8c
@ -117,14 +117,14 @@ class AutoSignIn(_PluginBase):
|
||||
if self._enabled:
|
||||
if self._cron:
|
||||
try:
|
||||
if self._cron.strip().count(" ") == 4:
|
||||
if str(self._cron).strip().count(" ") == 4:
|
||||
self._scheduler.add_job(func=self.sign_in,
|
||||
trigger=CronTrigger.from_crontab(self._cron),
|
||||
name=f"站点自动{self._action}")
|
||||
logger.info(f"站点自动{self._action}服务启动,执行周期 {self._cron}")
|
||||
else:
|
||||
# 2.3/9-23
|
||||
crons = self._cron.strip().split("/")
|
||||
crons = str(self._cron).strip().split("/")
|
||||
if len(crons) == 2:
|
||||
# 2.3
|
||||
cron = crons[0]
|
||||
@ -138,7 +138,7 @@ class AutoSignIn(_PluginBase):
|
||||
if self._start_time and self._end_time:
|
||||
self._scheduler.add_job(func=self.sign_in,
|
||||
trigger="interval",
|
||||
hours=float(cron.strip()),
|
||||
hours=float(str(cron).strip()),
|
||||
name=f"站点自动{self._action}")
|
||||
logger.info(
|
||||
f"站点自动{self._action}服务启动,执行周期 {self._start_time}点-{self._end_time}点 每{cron}小时执行一次")
|
||||
@ -155,7 +155,7 @@ class AutoSignIn(_PluginBase):
|
||||
self._end_time = 24
|
||||
self._scheduler.add_job(func=self.sign_in,
|
||||
trigger="interval",
|
||||
hours=float(self._cron.strip()),
|
||||
hours=float(str(self._cron).strip()),
|
||||
name=f"站点自动{self._action}")
|
||||
logger.info(
|
||||
f"站点自动{self._action}服务启动,执行周期 {self._start_time}点-{self._end_time}点 每{self._cron}小时执行一次")
|
||||
|
@ -488,15 +488,15 @@ class MediaSyncDel(_PluginBase):
|
||||
return
|
||||
|
||||
# 删除电影
|
||||
if media_type == "Movie":
|
||||
if media_type == "Movie" or media_type == "MOV":
|
||||
msg = f'电影 {media_name} {tmdb_id}'
|
||||
transfer_history: List[TransferHistory] = self._transferhis.get_by(tmdbid=tmdb_id)
|
||||
# 删除电视剧
|
||||
elif media_type == "Series":
|
||||
elif (media_type == "Series" or media_type == "TV") and not season_num and not episode_num:
|
||||
msg = f'剧集 {media_name} {tmdb_id}'
|
||||
transfer_history: List[TransferHistory] = self._transferhis.get_by(tmdbid=tmdb_id)
|
||||
# 删除季 S02
|
||||
elif media_type == "Season":
|
||||
elif (media_type == "Season" or media_type == "TV") and season_num and not episode_num:
|
||||
if not season_num or not str(season_num).isdigit():
|
||||
logger.error(f"{media_name} 季同步删除失败,未获取到具体季")
|
||||
return
|
||||
@ -504,7 +504,7 @@ class MediaSyncDel(_PluginBase):
|
||||
transfer_history: List[TransferHistory] = self._transferhis.get_by(tmdbid=tmdb_id,
|
||||
season=f'S{season_num}')
|
||||
# 删除剧集S02E02
|
||||
elif media_type == "Episode":
|
||||
elif (media_type == "Episode" or media_type == "TV") and season_num and episode_num:
|
||||
if not season_num or not str(season_num).isdigit() or not episode_num or not str(episode_num).isdigit():
|
||||
logger.error(f"{media_name} 集同步删除失败,未获取到具体集")
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user