mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-03-20 03:57:30 +08:00
feat(modules): 增加子级 type 分类。
- 在 `types` 里,针对各个模块的类型进行子级分类。 - 为每个模块统一添加 `get_subtype` 方法,这样一来,能更精准快速地区分与调用子类的每个模块,又能获取 ModuleType 所规定的分类以及对应存在的子模块类型支持列表,从而有效解决当下调用时需繁琐遍历每个 module 以获取 get_name 或 _channel 的问题。 - 解决因消息渠道前端返回所保存的 type 与后端规定值不一致,而需要频繁调用 _channel 私有方法才能获取分类所可能产生的问题。
This commit is contained in:
@@ -178,6 +178,50 @@ class MessageChannel(Enum):
|
||||
WebPush = "WebPush"
|
||||
|
||||
|
||||
# 下载器类型
|
||||
class DownloaderType(Enum):
|
||||
# Qbittorrent
|
||||
Qbittorrent = "Qbittorrent"
|
||||
# Transmission
|
||||
Transmission = "Transmission"
|
||||
# Aria2
|
||||
# Aria2 = "Aria2"
|
||||
|
||||
|
||||
# 媒体服务器类型
|
||||
class MediaServerType(Enum):
|
||||
# Emby
|
||||
Emby = "Emby"
|
||||
# Jellyfin
|
||||
Jellyfin = "Jellyfin"
|
||||
# Plex
|
||||
Plex = "Plex"
|
||||
|
||||
|
||||
# 识别器类型
|
||||
class MediaRecognizeType(Enum):
|
||||
# 豆瓣
|
||||
Douban = "豆瓣"
|
||||
# TMDB
|
||||
TMDB = "TheMovieDb"
|
||||
# TVDB
|
||||
TVDB = "TheTvDb"
|
||||
# bangumi
|
||||
Bangumi = "Bangumi"
|
||||
|
||||
|
||||
# 其他杂项模块类型
|
||||
class OtherModulesType(Enum):
|
||||
# 字幕
|
||||
Subtitle = "站点字幕"
|
||||
# Fanart
|
||||
Fanart = "Fanart"
|
||||
# 文件整理
|
||||
FileManager = "文件整理"
|
||||
# 过滤器
|
||||
Filter = "过滤器"
|
||||
|
||||
|
||||
# 用户配置Key字典
|
||||
class UserConfigKey(Enum):
|
||||
# 监控面板
|
||||
|
||||
Reference in New Issue
Block a user