mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
extension(aniplay): Added preferred audio type
This commit is contained in:
@@ -6,7 +6,7 @@ const mangayomiSources = [{
|
|||||||
"iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/",
|
"iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://aniplaynow.live/",
|
||||||
"typeSource": "single",
|
"typeSource": "single",
|
||||||
"itemType": 1,
|
"itemType": 1,
|
||||||
"version": "0.0.3",
|
"version": "0.0.5",
|
||||||
"dateFormat": "",
|
"dateFormat": "",
|
||||||
"dateFormatLocale": "",
|
"dateFormatLocale": "",
|
||||||
"pkgPath": "anime/src/en/aniplay.js"
|
"pkgPath": "anime/src/en/aniplay.js"
|
||||||
@@ -403,7 +403,8 @@ class DefaultExtension extends MProvider {
|
|||||||
var epData = JSON.parse(urlSplits[1])
|
var epData = JSON.parse(urlSplits[1])
|
||||||
var providerId = urlSplits[2]
|
var providerId = urlSplits[2]
|
||||||
|
|
||||||
var subOrDub = "sub"
|
var user_audio_type = this.getPreference("aniplay_pref_audio_type");
|
||||||
|
var subOrDub = epData.hasDub && user_audio_type === "dub" ? "dub" : "sub"
|
||||||
|
|
||||||
var slug = `watch/${anilistId}`
|
var slug = `watch/${anilistId}`
|
||||||
var body = [
|
var body = [
|
||||||
@@ -457,6 +458,15 @@ class DefaultExtension extends MProvider {
|
|||||||
"entries": ["Anya", "Yuki"],
|
"entries": ["Anya", "Yuki"],
|
||||||
"entryValues": ["anya", "yuki"],
|
"entryValues": ["anya", "yuki"],
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"key": "aniplay_pref_audio_type",
|
||||||
|
"listPreference": {
|
||||||
|
"title": "Preferred audio type",
|
||||||
|
"summary": "Sub/Dub",
|
||||||
|
"valueIndex": 0,
|
||||||
|
"entries": ["Sub", "Dub"],
|
||||||
|
"entryValues": ["sub", "dub"],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user