mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
refactor(config): replace hard-coded strings with SystemConfigKey
This commit is contained in:
@@ -1118,9 +1118,9 @@ class SubscribeChain(ChainBase):
|
|||||||
"""
|
"""
|
||||||
default_subscribe_key = None
|
default_subscribe_key = None
|
||||||
if mtype == MediaType.TV:
|
if mtype == MediaType.TV:
|
||||||
default_subscribe_key = "DefaultTvSubscribeConfig"
|
default_subscribe_key = SystemConfigKey.DefaultTvSubscribeConfig.value
|
||||||
if mtype == MediaType.MOVIE:
|
if mtype == MediaType.MOVIE:
|
||||||
default_subscribe_key = "DefaultMovieSubscribeConfig"
|
default_subscribe_key = SystemConfigKey.DefaultMovieSubscribeConfig.value
|
||||||
|
|
||||||
# 默认订阅规则
|
# 默认订阅规则
|
||||||
if hasattr(settings, default_subscribe_key):
|
if hasattr(settings, default_subscribe_key):
|
||||||
|
|||||||
@@ -113,6 +113,10 @@ class SystemConfigKey(Enum):
|
|||||||
UserInstalledPlugins = "UserInstalledPlugins"
|
UserInstalledPlugins = "UserInstalledPlugins"
|
||||||
# 插件安装统计
|
# 插件安装统计
|
||||||
PluginInstallReport = "PluginInstallReport"
|
PluginInstallReport = "PluginInstallReport"
|
||||||
|
# 默认电影订阅规则
|
||||||
|
DefaultMovieSubscribeConfig = "DefaultMovieSubscribeConfig"
|
||||||
|
# 默认电视剧订阅规则
|
||||||
|
DefaultTvSubscribeConfig = "DefaultTvSubscribeConfig"
|
||||||
|
|
||||||
|
|
||||||
# 处理进度Key字典
|
# 处理进度Key字典
|
||||||
|
|||||||
Reference in New Issue
Block a user