Added Reinstall Widevine
This commit is contained in:
parent
d05d52fba1
commit
ddd3cc986a
2 changed files with 28 additions and 1 deletions
|
@ -4,7 +4,7 @@ import * as windowStateKeeper from "electron-window-state";
|
||||||
import * as express from "express";
|
import * as express from "express";
|
||||||
import * as getPort from "get-port";
|
import * as getPort from "get-port";
|
||||||
import {search} from "youtube-search-without-api-key";
|
import {search} from "youtube-search-without-api-key";
|
||||||
import {existsSync, mkdirSync, readdirSync, readFileSync, writeFileSync, statSync} from "fs";
|
import {existsSync, rmSync, mkdirSync, readdirSync, readFileSync, writeFileSync, statSync} from "fs";
|
||||||
import {Stream} from "stream";
|
import {Stream} from "stream";
|
||||||
import {networkInterfaces} from "os";
|
import {networkInterfaces} from "os";
|
||||||
import * as mm from 'music-metadata';
|
import * as mm from 'music-metadata';
|
||||||
|
@ -600,6 +600,17 @@ export class BrowserWindow {
|
||||||
event.returnValue = process.platform;
|
event.returnValue = process.platform;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ipcMain.handle("reinstall-widevine-cdm", ()=>{
|
||||||
|
// remove WidevineCDM from appdata folder
|
||||||
|
const widevineCdmPath = join(app.getPath("userData"), "./WidevineCdm");
|
||||||
|
if(existsSync(widevineCdmPath)) {
|
||||||
|
rmSync(widevineCdmPath, { recursive: true, force: true })
|
||||||
|
}
|
||||||
|
// reinstall WidevineCDM
|
||||||
|
app.relaunch()
|
||||||
|
app.exit()
|
||||||
|
})
|
||||||
|
|
||||||
ipcMain.handle("get-github-plugin", async (event, url) => {
|
ipcMain.handle("get-github-plugin", async (event, url) => {
|
||||||
const returnVal = {
|
const returnVal = {
|
||||||
success: true,
|
success: true,
|
||||||
|
|
|
@ -671,6 +671,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="md-option-line">
|
||||||
|
<div class="md-option-segment">
|
||||||
|
Reinstall WidevineCDM
|
||||||
|
</div>
|
||||||
|
<div class="md-option-segment md-option-segment_auto">
|
||||||
|
<button class="md-btn" @click="reinstallWidevineCDM">Reinstall WidevineCDM</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
<div class="md-option-segment">
|
<div class="md-option-segment">
|
||||||
{{$root.getLz('settings.option.experimental.unknownPlugin')}}
|
{{$root.getLz('settings.option.experimental.unknownPlugin')}}
|
||||||
|
@ -852,6 +861,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
reinstallWidevineCDM () {
|
||||||
|
bootbox.confirm("Are you sure you want to reinstall Widevine?", (ok)=>{
|
||||||
|
if(ok) {
|
||||||
|
ipcRenderer.invoke("reinstall-widevine-cdm");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
gitHubExplore() {
|
gitHubExplore() {
|
||||||
app.appRoute("themes-github")
|
app.appRoute("themes-github")
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue