#!name=Trakt 增强 #!desc=Trakt App 各页面从英文改为简体中文,支持中文标题、简介和海报;历史页面剧集类别的已观看记录按电视剧合并;Trakt 和 SofaTime 的影片详情页添加 EplayerX、Forward、Infuse 跳转按钮;部分兼容其它使用了 Trakt API 的应用。 #!icon=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/images/trakt.webp #!homepage=https://github.com/DemoJameson/Proxy.Modules #!author=DemoJameson #!arguments=posterImageMode:"原片语言", historyEpisodesMergedByShow:"true", googleTranslationEnabled:"true", characterTranslationEnabled:"true", eplayerxEnabled:"true", forwardEnabled:"true", infuseEnabled:"true", backendBaseUrl:"https://proxy-modules.demojameson.de5.net", debugEnabled:"false" #!arguments-desc=posterImageMode: 原片语言使用 TMDb 影片原始语言图片;中文使用 TMDb 中文图片;原图保留 Trakt 原图\nhistoryEpisodesMergedByShow: 启用后会将历史页面电视剧类别的观看记录按电视剧合并\ngoogleTranslationEnabled: 启用后会翻译评论、社区情绪、冷知识、演员、片单等 DeepLX 翻译场景\ncharacterTranslationEnabled: 启用后会用豆瓣翻译角色名\neplayerxEnabled: 启用后在 Trakt 和 SofaTime 中添加 EplayerX 跳转按钮\nforwardEnabled: 启用后在 Trakt 和 SofaTime 中添加 Forward 跳转按钮\ninfuseEnabled: 启用后在 Trakt 和 SofaTime 中添加 Infuse 跳转按钮\nbackendBaseUrl: 用于批量获取 Trakt 的中文翻译,一般留空即可\ndebugEnabled: 启用后每次都会刷新 translation-overrides 覆盖数据 [Script] # 处理播放器 DeepLink 跳转 Direct Redirect = type=http-request, pattern=^https:\/\/loon-plugins\.demojameson\.de5\.net\/api\/redirect\?.*$, timeout=10, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{eplayerxEnabled}}},{{{forwardEnabled}}},{{{infuseEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # SofaTime 中自定义播放器 Logo TMDB Logo Redirect = type=http-request, pattern=^https:\/\/image\.tmdb\.org\/t\/p\/w342\/[a-z0-9_-]+_logo\.webp(?:\?.*)?$, timeout=10, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{eplayerxEnabled}}},{{{forwardEnabled}}},{{{infuseEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 仅拦截 SofaTime 的 streaming-availability shows 请求,移除 country 参数 SofaTime Streaming Availability Request = type=http-request, pattern=^https:\/\/streaming-availability\.p\.rapidapi\.com\/shows\/tt\d+(\?.*)?$, timeout=10, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 拦截 sync/history/episodes 请求,放大 limit Trakt Sync History Episodes Request = type=http-request, pattern=^https:\/\/apiz?\.trakt\.tv\/sync\/history\/episodes\/?(\?.*)?$, timeout=10, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 拦截 history/episodes 请求,放大 limit Trakt History Episodes Request = type=http-request, pattern=^https:\/\/apiz?\.trakt\.tv\/users\/[^\/]+?\/history\/episodes\/?(\?.*)?$, timeout=10, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 拦截带季号的请求,记录当前浏览季 Trakt Current Season Request = type=http-request, pattern=^https:\/\/apiz?\.trakt\.tv\/shows\/[^\/]+\/seasons\/\d+(?:\/.*|\?.*)?$, timeout=10, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 统一拦截 Trakt 响应,由脚本内部分流处理 Trakt Response Router = type=http-response, pattern=^https:\/\/apiz?\.trakt\.tv\/.*$, requires-body=true, max-size=0, timeout=60, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{eplayerxEnabled}}},{{{forwardEnabled}}},{{{infuseEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 仅拦截 SofaTime 的 TMDB provider 列表,注入播放器 TMDB Provider Catalog = type=http-response, pattern=^https:\/\/api\.themoviedb\.org\/3\/watch\/providers\/(?:movie|tv)(\?.*)?$, requires-body=true, max-size=0, timeout=60, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 仅拦截 SofaTime 的 streaming-availability shows 详情,注入播放器 SofaTime Streaming Availability = type=http-response, pattern=^https:\/\/streaming-availability\.p\.rapidapi\.com\/shows\/tt\d+(\?.*)?$, requires-body=true, max-size=0, timeout=60, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}},{{{eplayerxEnabled}}},{{{forwardEnabled}}},{{{infuseEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js # 仅拦截 SofaTime 的 streaming-availability 国家服务列表,注入播放器 SofaTime Country Services = type=http-response, pattern=^https:\/\/streaming-availability\.p\.rapidapi\.com\/countries\/[a-z]{2}(\?.*)?$, requires-body=true, max-size=0, timeout=60, argument={{{posterImageMode}}},{{{historyEpisodesMergedByShow}}},{{{googleTranslationEnabled}}},{{{characterTranslationEnabled}}},{{{backendBaseUrl}}},{{{debugEnabled}}}, script-path=https://raw.githubusercontent.com/DemoJameson/Proxy.Modules/main/trakt_simplified_chinese/trakt_simplified_chinese.js [MITM] hostname = %APPEND% apiz.trakt.tv, api.trakt.tv, api.themoviedb.org, image.tmdb.org, streaming-availability.p.rapidapi.com, loon-plugins.demojameson.de5.net