Skip to content

Commit

Permalink
resolve #7 Fix ffmpeg screen problems
Browse files Browse the repository at this point in the history
  • Loading branch information
moshfeu committed Dec 14, 2018
1 parent 09792f9 commit 3db96a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "y2mp3",
"appname": "y2mp3",
"productName": "y2mp3",
"version": "1.0.3",
"version": "1.0.4",
"main": "main.js",
"author": {
"name": "MosheF",
Expand Down
2 changes: 1 addition & 1 deletion src/components/install-ffmpeg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class InstallFFMpeg extends React.Component<IInstallFFMpegProps, IInstall

updateDownloadProgress = (data) => {
this.setState({
downloadProgress: data.progress
downloadProgress: Math.floor(data.progress * 100)
}, () => {
if (this.state.downloadProgress === 100) {
setTimeout(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/services/ffmpeg-installer.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import * as ffbinaries from 'ffbinaries';
import { existsSync } from 'fs';
import {ffmpegPath, APPDATA_FOLDER} from './path';
import { ffmpegPath, APPDATA_FOLDER } from './path';

export function installFfmpeg(tickerFn: (data) => void): Promise<void> {
return new Promise((resolve) => {
ffbinaries.downloadBinaries(['ffmpeg'], {destination: APPDATA_FOLDER, tickerFn}, function () {
tickerFn({progress: 100});
tickerFn({progress: 1});
resolve();
});
});
Expand Down

0 comments on commit 3db96a7

Please sign in to comment.