mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Vod chat button fix, default settings in devportal
This commit is contained in:
@@ -1022,15 +1022,35 @@
|
|||||||
return x.value
|
return x.value
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let settingsToUse = __DEV_SETTINGS ?? {};
|
||||||
|
if (true) {
|
||||||
|
for (let setting of this.Plugin?.currentPlugin?.settings) {
|
||||||
|
if (typeof settingsToUse[setting.variable] == "undefined") {
|
||||||
|
switch (setting?.type?.toLowerCase()) {
|
||||||
|
case "boolean":
|
||||||
|
settingsToUse[setting.variable] = setting.default === 'true';
|
||||||
|
break;
|
||||||
|
case "dropdown":
|
||||||
|
let dropDownIndex = parseInt(setting.default);
|
||||||
|
if (dropDownIndex) {
|
||||||
|
settingsToUse[setting.variable] = setting.options[dropDownIndex];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(name == "enable") {
|
if(name == "enable") {
|
||||||
if(parameterVals.length > 0)
|
if(parameterVals.length > 0)
|
||||||
parameterVals[0] = this.Plugin.currentPlugin;
|
parameterVals[0] = this.Plugin.currentPlugin;
|
||||||
else
|
else
|
||||||
parameterVals.push(this.Plugin.currentPlugin);
|
parameterVals.push(this.Plugin.currentPlugin);
|
||||||
if(parameterVals.length > 1)
|
if(parameterVals.length > 1)
|
||||||
parameterVals[1] = __DEV_SETTINGS;
|
parameterVals[1] = settingsToUse;
|
||||||
else
|
else
|
||||||
parameterVals.push(__DEV_SETTINGS);
|
parameterVals.push(settingsToUse);
|
||||||
}
|
}
|
||||||
|
|
||||||
const func = source[name];
|
const func = source[name];
|
||||||
|
|||||||
+1
-2
@@ -1005,8 +1005,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_slideUpOverlay?.hide();
|
_slideUpOverlay?.hide();
|
||||||
} else null,
|
} else if(video is JSVideoDetails && (video as JSVideoDetails).hasVODEvents())
|
||||||
if(video is JSVideoDetails && (video as JSVideoDetails).hasVODEvents())
|
|
||||||
RoundButton(context, R.drawable.ic_chat, context.getString(R.string.vod_chat), TAG_VODCHAT) {
|
RoundButton(context, R.drawable.ic_chat, context.getString(R.string.vod_chat), TAG_VODCHAT) {
|
||||||
video?.let {
|
video?.let {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user