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