settings migration
This commit is contained in:
parent
276a51b8c3
commit
18cdec51d9
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ultrawidify",
|
||||
"version": "6.0.2",
|
||||
"version": "6.1.10",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ultrawidify",
|
||||
"version": "6.0.2",
|
||||
"version": "6.1.10",
|
||||
"description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.",
|
||||
"author": "Tamius Han <tamius.han@gmail.com>",
|
||||
"scripts": {
|
||||
|
@ -11,14 +11,15 @@ import AspectRatioType from '../../common/enums/AspectRatioType.enum';
|
||||
|
||||
const ExtensionConfPatch = [
|
||||
{
|
||||
forVersion: '6.0.1-1',
|
||||
forVersion: '6.1.1',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
// add new commands
|
||||
userOptions.commands = defaultOptions.commands;
|
||||
userOptions.actions = defaultOptions.actions;
|
||||
}
|
||||
}, {
|
||||
// NOTE - when releasing shit, ensure ALL alpha migrations are combined together in one function
|
||||
forVersion: '6.0.1-2',
|
||||
forVersion: '6.1.2',
|
||||
updateFn: (userOptions, defaultOptions) => {
|
||||
userOptions.commands = defaultOptions.commands;
|
||||
|
||||
@ -89,7 +90,7 @@ const ExtensionConfPatch = [
|
||||
}
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.0.1-3',
|
||||
forVersion: '6.0.3',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
delete (userOptions as any).sites['@global'].persistOption;
|
||||
delete (userOptions as any).sites['@empty'].persistOption;
|
||||
@ -98,7 +99,7 @@ const ExtensionConfPatch = [
|
||||
userOptions.sites['@empty'].persistCSA = CropModePersistence.Disabled;
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.0.1-4',
|
||||
forVersion: '6.0.4',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
|
||||
// deprecated much?
|
||||
@ -110,36 +111,36 @@ const ExtensionConfPatch = [
|
||||
arg: AspectRatioType.Cycle
|
||||
}]
|
||||
});
|
||||
userOptions.commands.crop.push({
|
||||
action: 'set-ar',
|
||||
label: 'Cycle',
|
||||
comment: 'Cycle through crop options',
|
||||
arguments: {
|
||||
type: AspectRatioType.Cycle
|
||||
},
|
||||
shortcut: {
|
||||
key: 'c',
|
||||
code: 'KeyC',
|
||||
ctrlKey: false,
|
||||
metaKey: false,
|
||||
altKey: false,
|
||||
shiftKey: false,
|
||||
onKeyUp: true,
|
||||
onKeyDown: false,
|
||||
}
|
||||
});
|
||||
userOptions.commands.crop.push({
|
||||
action: 'set-ar',
|
||||
label: '32:9',
|
||||
comment: 'Crop for 32:9 aspect ratio',
|
||||
arguments: {
|
||||
type: AspectRatioType.Fixed,
|
||||
ratio: 3.56
|
||||
},
|
||||
})
|
||||
// userOptions.commands.crop.push({
|
||||
// action: 'set-ar',
|
||||
// label: 'Cycle',
|
||||
// comment: 'Cycle through crop options',
|
||||
// arguments: {
|
||||
// type: AspectRatioType.Cycle
|
||||
// },
|
||||
// shortcut: {
|
||||
// key: 'c',
|
||||
// code: 'KeyC',
|
||||
// ctrlKey: false,
|
||||
// metaKey: false,
|
||||
// altKey: false,
|
||||
// shiftKey: false,
|
||||
// onKeyUp: true,
|
||||
// onKeyDown: false,
|
||||
// }
|
||||
// });
|
||||
// userOptions.commands.crop.push({
|
||||
// action: 'set-ar',
|
||||
// label: '32:9',
|
||||
// comment: 'Crop for 32:9 aspect ratio',
|
||||
// arguments: {
|
||||
// type: AspectRatioType.Fixed,
|
||||
// ratio: 3.56
|
||||
// },
|
||||
// })
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.0.1-5',
|
||||
forVersion: '6.1.5',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
if (!userOptions.sites['@global'].defaults.alignment || !userOptions.sites['@global'].defaults.alignment.x || !userOptions.sites['@global'].defaults.alignment.y) {
|
||||
userOptions.sites['@global'].defaults.alignment = {
|
||||
@ -150,7 +151,7 @@ const ExtensionConfPatch = [
|
||||
userOptions.sites['@empty'].defaults.alignment = {x: VideoAlignmentType.Default, y: VideoAlignmentType.Default};
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.0.1-6',
|
||||
forVersion: '6.1.1-6',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
for (const site in userOptions.sites) {
|
||||
userOptions.sites[site].defaultType = userOptions.sites[site].type as any;
|
||||
@ -159,7 +160,7 @@ const ExtensionConfPatch = [
|
||||
userOptions.sites['@empty'].defaultType = 'modified';
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.0.2-0',
|
||||
forVersion: '6.1.2-0',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
// remove custom CSS, as it is no longer needed
|
||||
for (const site in userOptions.sites) {
|
||||
@ -185,6 +186,13 @@ const ExtensionConfPatch = [
|
||||
},
|
||||
userOptions.newFeatureTracker['uw6.ui-popup'] = {show: 10};
|
||||
}
|
||||
}, {
|
||||
forVersion: '6.1.9',
|
||||
updateFn: (userOptions: SettingsInterface, defaultOptions) => {
|
||||
userOptions.ui = defaultOptions.ui;
|
||||
userOptions.arDetect = defaultOptions.arDetect;
|
||||
userOptions.newFeatureTracker = defaultOptions.newFeatureTracker;
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
@ -110,7 +110,6 @@ export default class EventBus {
|
||||
* @param config
|
||||
*/
|
||||
sendToTunnel(command: string, config: any) {
|
||||
console.log('sending to tunnel from eventBus ....', this)
|
||||
if (!this.disableTunnel) {
|
||||
window.parent.postMessage(
|
||||
{
|
||||
|
@ -1801,7 +1801,6 @@ export class Aard {
|
||||
}
|
||||
|
||||
this.testResults.aspectRatioUncertain = false;
|
||||
console.log('Updating letterboxWidth - as normal')
|
||||
|
||||
this.testResults.letterboxWidth = candidateAvg;
|
||||
this.testResults.letterboxOffset = diff;
|
||||
|
@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "Ultrawidify",
|
||||
"description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.",
|
||||
"version": "6.0.2",
|
||||
"version": "6.1.10",
|
||||
"icons": {
|
||||
"32":"res/icons/uw-32.png",
|
||||
"64":"res/icons/uw-64.png"
|
||||
|
Loading…
Reference in New Issue
Block a user