Skip to content
This repository was archived by the owner on Oct 25, 2022. It is now read-only.

Commit cfcd0e4

Browse files
committed
v1.0.1
Aktualizacja naprawią błąd z niepobieraniem ffmpeg podczas instalacji
1 parent e207160 commit cfcd0e4

File tree

6 files changed

+32
-9
lines changed

6 files changed

+32
-9
lines changed

package.json

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "xayoo-vods",
2+
"name": "cyou.4uss.app",
33
"productName": "XayooIndustriesVod",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"description": "Pobieraj dostepne zapisy VOD z XayooIndustries.us",
66
"main": "src/index.js",
77
"scripts": {
@@ -13,13 +13,18 @@
1313
"build-installer": "electron-builder"
1414
},
1515
"build": {
16-
"appId": "xayoo-vods",
16+
"appId": "cyou.4uss.app",
1717
"win": {
1818
"target": [
1919
"nsis"
2020
],
2121
"icon": "src/assets/img/ico.ico"
2222
},
23+
"asarUnpack": [
24+
"node_modules/@ffmpeg-installer/win32-x64/ffmpeg.exe",
25+
"node_modules/@ffmpeg-installer/ffmpeg/*",
26+
"node_modules/@ffmpeg-installer/ffmpeg/lib/*"
27+
],
2328
"nsis": {
2429
"installerIcon": "src/assets/img/ico.ico",
2530
"uninstallerIcon": "src/assets/img/ico.ico",
@@ -32,14 +37,18 @@
3237
"keywords": [],
3338
"author": "3xanax",
3439
"license": "MIT",
40+
"bugs": {
41+
"url": "https://github.com/anKordii/XayooIndustriesVod/issues"
42+
},
43+
"homepage": "https://github.com/anKordii/XayooIndustriesVod#readme",
3544
"config": {
3645
"forge": {
3746
"packagerConfig": {},
3847
"makers": [
3948
{
4049
"name": "@electron-forge/maker-squirrel",
4150
"config": {
42-
"name": "xayoo_vods"
51+
"name": "cyou.4uss.app"
4352
}
4453
},
4554
{
@@ -60,6 +69,7 @@
6069
}
6170
},
6271
"dependencies": {
72+
"@ffmpeg-installer/ffmpeg": "^1.0.20",
6373
"discord-rich-presence": "0.0.8",
6474
"electron-squirrel-startup": "^1.0.0",
6575
"fluent-ffmpeg": "^2.1.2"

src/assets/css/styles.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/assets/img/bg.gif

16.7 MB
Loading

src/assets/img/bg.png

-73.4 KB
Loading

src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<div class="row">
4444
<div class="col-md-12 text-center mt-5">
4545
<h1 class="status-xdd">Status</h1>
46-
<p id="vod-status" class="dsadsadas-xd">Nie zrobione jeszcze niczego</p>
46+
<p id="vod-status" class="dsadsadas-xd">Siema&nbsp;👋</p>
4747
</div>
4848
</div>
4949
</div>

src/index.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
const { app, BrowserWindow, dialog, ipcMain } = require('electron');
22
const path = require('path');
3+
const ffmpegPath = require('@ffmpeg-installer/ffmpeg').path.replace(
4+
'app.asar',
5+
'app.asar.unpacked'
6+
);
37
const ffmpeg = require("fluent-ffmpeg");
8+
ffmpeg.setFfmpegPath(ffmpegPath);
49
const discord = require('discord-rich-presence')('778898616597086210');
510

611
const data = Date.now();
@@ -42,8 +47,8 @@ const createWindow = () => {
4247

4348
ffmpeg(arg)
4449
.on('progress', function (progress) {
45-
var statusD = progress.percent;
46-
statuslog(`Pobrano: ${statusD.toFixed(2)}% \n${progress.frames} Klatek`);
50+
//var statusD = progress.percent;
51+
statuslog(`<strong class="dl-time">Długość: </strong>${progress.timemark} <strong class="dl-kb">Szybkość Pobierania: </strong>${formatSizeUnits(progress.currentKbps*1024)} <strong class="dl-size">Rozmiar: </strong>${formatSizeUnits(progress.targetSize*1000)} <strong class="dl-klatki">Klatek: </strong>${progress.frames} `)
4752
})
4853
.outputOptions("-bsf:a aac_adtstoasc")
4954
.outputOptions("-vcodec copy")
@@ -92,7 +97,15 @@ app.on('activate', () => {
9297
createWindow();
9398
}
9499
});
95-
100+
function formatSizeUnits(bytes){
101+
if (bytes>=1073741824) {bytes=(bytes/1073741824).toFixed(2)+' GB';}
102+
else if (bytes>=1048576) {bytes=(bytes/1048576).toFixed(2)+' MB';}
103+
else if (bytes>=1024) {bytes=(bytes/1024).toFixed(2)+' KB';}
104+
else if (bytes>1) {bytes=bytes+' bytes';}
105+
else if (bytes==1) {bytes=bytes+' byte';}
106+
else {bytes='0 byte';}
107+
return bytes;
108+
}
96109
discord.updatePresence({
97110
state: 'Pobieranie zapisu stream',
98111
details: 'Główne menu',

0 commit comments

Comments
 (0)