Skip to content

Commit

Permalink
feat(modules): Akamaized
Browse files Browse the repository at this point in the history
Create DualSubs.AddOn.Akamaized.plugin
Create DualSubs.AddOn.Akamaized.snippet
Create DualSubs.AddOn.Akamaized.srmodule
Create DualSubs.AddOn.Akamaized.stoverride
Update DualSubs.AddOn.Akamaized.sgmodule
  • Loading branch information
VirgilClyne committed Oct 31, 2024
1 parent 3afa720 commit f596640
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 17 deletions.
17 changes: 0 additions & 17 deletions modules/Akamaized.sgmodule

This file was deleted.

25 changes: 25 additions & 0 deletions modules/DualSubs.AddOn.Akamaized.plugin
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!name=🍿️ DualSubs: ➕ AddOn (Akamaized)
#!desc=DualSubs 额外插件\nAkamaized 流媒体平台增强及双语字幕
#!openUrl=http://boxjs.com/#/app/DualSubs.Universal
#!author=VirgilClyne[https://github.com/VirgilClyne]
#!homepage = https://DualSubs.github.io/guide/addon
#!icon=https://www.akamai.com/site/favicon/favicon-194x194.png
#!category=🍿️ DualSubs
#!system = iOS,iPadOS,macOS,tvOS
#!system_version = 15

[Argument]
Types = input,"Official,Translate",tag=[字幕] 启用类型,desc=请选择要添加的字幕选项,如果为标准播放器,则会在字幕选项中新增勾选字幕选项。
Languages[0] = select,"AUTO","ZH","ZH-HANS","ZH-HK","ZH-HANT","EN","ES","JA","KO","DE","FR","TR","KM",tag=[字幕] 主语言(源语言),desc=当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。
Languages[1] = select,"ZH","ZH-HANS","ZH-HK","ZH-HANT","EN","EN-US","ES","ES-ES","ES-419","JA","KO","DE","FR","TR","KM",tag=[字幕] 副语言(目标语言),desc=当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。
Vendor = select,"Google","Microsoft",tag=[翻译器] 服务商API,desc=请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。
ShowOnly = switch,false,tag=[翻译器] 只显示翻译后字幕,desc=开启后仅显示翻译字幕,不做字幕合并操作。

[Script]
http-response ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index.m3u8 requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js, tag=🍿️ DualSubs.Akamaized.M3U8.Master.response, argument=[{Types},{Languages[0]},{Languages[1]},{Vendor},{ShowOnly}]
http-response ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).m3u8\?(.*)subtype= requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js, tag=🍿️ DualSubs.Akamaized.M3U8.Subtitles.response, argument=[{Types},{Languages[0]},{Languages[1]},{Vendor},{ShowOnly}]
http-response ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=(Official|External) requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, tag=🍿️ DualSubs.Akamaized.Composite.Subtitles.response, argument=[{Types},{Languages[0]},{Languages[1]},{Vendor},{ShowOnly}]
http-response ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=Translate requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, tag=🍿️ DualSubs.Akamaized.Translate.Subtitles.response, argument=[{Types},{Languages[0]},{Languages[1]},{Vendor},{ShowOnly}]

[MITM]
hostname = abc-iview-mediapackagestreams-*.akamaized.net, mbc*-prod-dub-ak.akamaized.net, shls-mbcdramaksa-ak.akamaized.net, ssc-*-on-prem-ak.akamaized.net, ssc-*-ak.akamaized.net, delta45tatasky.akamaized.net, mwmpos*.akamaized.net
19 changes: 19 additions & 0 deletions modules/DualSubs.AddOn.Akamaized.sgmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!name=🍿️ DualSubs: ➕ AddOn (Akamaized)
#!desc=DualSubs 额外插件\nAkamaized 流媒体平台增强及双语字幕
#!openUrl=http://boxjs.com/#/app/DualSubs.Universal
#!author=VirgilClyne[https://github.com/VirgilClyne]
#!homepage = https://DualSubs.github.io/guide/addon
#!icon=https://www.akamai.com/site/favicon/favicon-194x194.png
#!category=🍿️ DualSubs
#!arguments = Types:"Official,Translate",Languages[0]:"AUTO",Languages[1]:"ZH",Vendor:"Google",ShowOnly:false
#!arguments-desc = Types: [字幕] 启用类型\n ├ Official: 官方字幕(合成器)\n └ Translate: 翻译字幕(翻译器)\n请选择要添加的字幕选项,如果为标准播放器,则会在字幕选项中新增勾选字幕选项。\n\nLanguages[0]: [字幕] 主语言(源语言)\n ├ AUTO: 自动 - Automatic\n ├ ZH: 中文(自动)\n ├ ZH-HANS: 中文(简体)\n ├ ZH-HK: 中文(香港)\n ├ ZH-HANT: 中文(繁体)\n ├ EN: English - 英语(自动)\n ├ ES: Español - 西班牙语(自动)\n ├ JA: 日本語 - 日语\n ├ KO: 한국어 - 韩语\n ├ DE: Deutsch - 德语\n ├ FR: Français - 法语\n ├ TR: Türkçe - 土耳其语\n └ KM: ភាសាខ្មែរ - 高棉语\n当“主语言”字幕存在时,将生成“主语言/副语言(翻译)”与“主语言(外挂)”的字幕或字幕选项。\n\nLanguages[1]: [字幕] 副语言(目标语言)\n ├ ZH: 中文(自动)\n ├ ZH-HANS: 中文(简体)\n ├ ZH-HK: 中文(香港)\n ├ ZH-HANT: 中文(繁体)\n ├ EN: English - 英语(自动)\n ├ EN-US: 英语(美国)\n ├ ES: Español - 西班牙语(自动)\n ├ ES-ES: Español - 西班牙语\n ├ ES-419: 西班牙语(拉丁美洲)\n ├ JA: 日本語 - 日语\n ├ KO: 한국어 - 韩语\n ├ DE: Deutsch - 德语\n ├ FR: Français - 法语\n ├ TR: Türkçe - 土耳其语\n └ KM: ភាសាខ្មែរ - 高棉语\n当“副语言”字幕存在时,将生成“副语言/主语言(官方)”的字幕或字幕选项。\n\nVendor: [翻译器] 服务商API\n ├ Google: Google Translate\n └ Microsoft: Microsoft Translator(需填写API)\n请选择翻译器所使用的服务商API,更多翻译选项请使用BoxJs。\n\nShowOnly: [翻译器] 只显示翻译后字幕\n开启后仅显示翻译字幕,不做字幕合并操作。\n

[Script]
DualSubs.Akamaized.M3U8.Master.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index.m3u8, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js, argument=Types="{{{Types}}}"&Languages[0]="{{{Languages[0]}}}"&Languages[1]="{{{Languages[1]}}}"&Vendor="{{{Vendor}}}"&ShowOnly="{{{ShowOnly}}}"
DualSubs.Akamaized.M3U8.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).m3u8\?(.*)subtype=, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js, argument=Types="{{{Types}}}"&Languages[0]="{{{Languages[0]}}}"&Languages[1]="{{{Languages[1]}}}"&Vendor="{{{Vendor}}}"&ShowOnly="{{{ShowOnly}}}"
DualSubs.Akamaized.Composite.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=(Official|External), requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js, argument=Types="{{{Types}}}"&Languages[0]="{{{Languages[0]}}}"&Languages[1]="{{{Languages[1]}}}"&Vendor="{{{Vendor}}}"&ShowOnly="{{{ShowOnly}}}"
DualSubs.Akamaized.Translate.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js, argument=Types="{{{Types}}}"&Languages[0]="{{{Languages[0]}}}"&Languages[1]="{{{Languages[1]}}}"&Vendor="{{{Vendor}}}"&ShowOnly="{{{ShowOnly}}}"

[MITM]
hostname = %APPEND% abc-iview-mediapackagestreams-*.akamaized.net, mbc*-prod-dub-ak.akamaized.net, shls-mbcdramaksa-ak.akamaized.net, ssc-*-on-prem-ak.akamaized.net, ssc-*-ak.akamaized.net, delta45tatasky.akamaized.net, mwmpos*.akamaized.net
tcp-connection = true
20 changes: 20 additions & 0 deletions modules/DualSubs.AddOn.Akamaized.snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!name=🍿️ DualSubs: ➕ AddOn (Akamaized)
#!desc=DualSubs 额外插件\nAkamaized 流媒体平台增强及双语字幕
#!openUrl=http://boxjs.com/#/app/DualSubs.Universal
#!author=VirgilClyne[https://github.com/VirgilClyne]
#!homepage = https://DualSubs.github.io/guide/addon
#!icon=https://www.akamai.com/site/favicon/favicon-194x194.png
#!category=🍿️ DualSubs

#[rewrite_local]
# 🍿️ DualSubs.Akamaized.M3U8.Master.response
^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index.m3u8 url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
# 🍿️ DualSubs.Akamaized.M3U8.Subtitles.response
^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).m3u8\?(.*)subtype= url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
# 🍿️ DualSubs.Akamaized.Composite.Subtitles.response
^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=(Official|External) url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
# 🍿️ DualSubs.Akamaized.Translate.Subtitles.response
^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=Translate url script-response-body https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

#[mitm]
hostname = abc-iview-mediapackagestreams-*.akamaized.net, mbc*-prod-dub-ak.akamaized.net, shls-mbcdramaksa-ak.akamaized.net, ssc-*-on-prem-ak.akamaized.net, ssc-*-ak.akamaized.net, delta45tatasky.akamaized.net, mwmpos*.akamaized.net
16 changes: 16 additions & 0 deletions modules/DualSubs.AddOn.Akamaized.srmodule
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!name=🍿️ DualSubs: ➕ AddOn (Akamaized)
#!desc=DualSubs 额外插件\nAkamaized 流媒体平台增强及双语字幕
#!openUrl=http://boxjs.com/#/app/DualSubs.Universal
#!author=VirgilClyne[https://github.com/VirgilClyne]
#!homepage = https://DualSubs.github.io/guide/addon
#!icon=https://www.akamai.com/site/favicon/favicon-194x194.png
#!category=🍿️ DualSubs

[Script]
🍿️ DualSubs.Akamaized.M3U8.Master.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index.m3u8, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
🍿️ DualSubs.Akamaized.M3U8.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).m3u8\?(.*)subtype=, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
🍿️ DualSubs.Akamaized.Composite.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=(Official|External), requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
🍿️ DualSubs.Akamaized.Translate.Subtitles.response = type=http-response, pattern=^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=Translate, requires-body=1, script-path=https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js

[MITM]
hostname = %APPEND% abc-iview-mediapackagestreams-*.akamaized.net, mbc*-prod-dub-ak.akamaized.net, shls-mbcdramaksa-ak.akamaized.net, ssc-*-on-prem-ak.akamaized.net, ssc-*-ak.akamaized.net, delta45tatasky.akamaized.net, mwmpos*.akamaized.net
51 changes: 51 additions & 0 deletions modules/DualSubs.AddOn.Akamaized.stoverride
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "🍿️ DualSubs: ➕ AddOn (Akamaized)"
desc: |-
DualSubs 额外插件
Akamaized 流媒体平台增强及双语字幕
openUrl: "http://boxjs.com/#/app/DualSubs.Universal"
author: |-
VirgilClyne[https://github.com/VirgilClyne]
homepage: "https://DualSubs.github.io/guide/addon"
icon: "https://www.akamai.com/site/favicon/favicon-194x194.png"
category: "🍿️ DualSubs"

http:
mitm:
- "abc-iview-mediapackagestreams-*.akamaized.net"
- "mbc*-prod-dub-ak.akamaized.net"
- "shls-mbcdramaksa-ak.akamaized.net"
- "ssc-*-on-prem-ak.akamaized.net"
- "ssc-*-ak.akamaized.net"
- "delta45tatasky.akamaized.net"
- "mwmpos*.akamaized.net"
script:
- match: ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index.m3u8
name: 🍿️ DualSubs.Akamaized.M3U8.Master.response
type: response
require-body: true
- match: ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).m3u8\?(.*)subtype=
name: 🍿️ DualSubs.Akamaized.M3U8.Subtitles.response
type: response
require-body: true
- match: ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=(Official|External)
name: 🍿️ DualSubs.Akamaized.Composite.Subtitles.response
type: response
require-body: true
- match: ^https?:\/\/(.+)\.akamaized\.net\/out\/v\d\/\w+\/index_(.+).vtt\?(.*)subtype=Translate
name: 🍿️ DualSubs.Akamaized.Translate.response
type: response
require-body: true

script-providers:
🍿️ DualSubs.Akamaized.M3U8.Master.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
interval: 86400
🍿️ DualSubs.Akamaized.M3U8.Subtitles.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Manifest.response.bundle.js
interval: 86400
🍿️ DualSubs.Akamaized.Composite.Subtitles.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Composite.Subtitles.response.bundle.js
interval: 86400
🍿️ DualSubs.Akamaized.Translate.response:
url: https://github.com/DualSubs/Universal/releases/latest/download/Translate.response.bundle.js
interval: 86400

0 comments on commit f596640

Please sign in to comment.