Skip to content

Commit

Permalink
Display only youtube-dl errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NTag committed Mar 2, 2017
1 parent 47bc3d4 commit ae21aa8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/src/app/alltomp3.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ export class Alltomp3Service {
let r = _.find(this.requests, {id: data.id});
if (type == "Error" || data.data.error) {
let yterror = data.data.message;
yterror = yterror.replace(/^[\s\S]+YouTube said: .+\n(.+)\n$/g, '$1');
r.artistName = yterror;
if (yterror.match(/YouTube said/)) { // youtube-dl error
yterror = yterror.replace(/^[\s\S]+YouTube said: .+\n(.+)\n$/g, '$1');
r.artistName = yterror;
}
}
if (r.playlist == true) {
var mainr = r; // keep a reference to the main request
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "AllToMP3",
"version": "0.1.5",
"version": "0.1.6",
"description": "Download YouTube videos in MP3 with tags and lyrics",
"main": "main.js",
"repository": "git@github.com:AllToMP3/alltomp3-app.git",
Expand Down Expand Up @@ -33,8 +33,8 @@
"icon": "build/dmg.icns",
"contents": [
{
"x": 0,
"y": 90
"x": 0,
"y": 90
},
{
"x": 220,
Expand Down

0 comments on commit ae21aa8

Please sign in to comment.