Jense5 / mp3-downloader

Command line tool to download mp3 files with metadata
MIT License
9 stars 2 forks source link

When youtube-dl is not latest version, unhandled and unlogged errors may occur #31

Closed haveneersrobin closed 7 years ago

haveneersrobin commented 7 years ago

EDIT: Lol, was using an older version. Will reopen if bug reappears 😊 😊😊

@Jense5 Bug of not downloading is back with this query node dist/cli.js Banaan feat. Jayh, Skinto Stepherd Bigger Better Anthem -o ~/Desktop/Music/Music\ fix --country NL 😒

(Also when not using --country)

EDIT: Bug persists for all following songs. Some sort of block (youtube-dl, or youtube api?)

EDIT 2: Isolated the issue, related to: youtube-dl This is another issue but no the cause, still not downloading ERROR: Signature extraction failed: Traceback (most recent call last) This is also an issue, but not the cause for this particular bug, possible fix for this: run youtube-dl -U before script. BUT, needs sudo permissions. Might be overkill to check everytime. Perhaps check once a day? (if possible).

Still looking for the actual cause of this bug.

This is the debug output


Debug output:

node dist/cli.js Banaan feat. Jayh, Skinto Stepherd Bigger Better Anthem --debug -o ~/Desktop/Music/Music\ fix  
Fetched iTunes data...
Received a total of 1 results.
1 of them are songs.
Will take this track to proceed:
{
    "wrapperType": "track",
    "kind": "song",
    "artistId": 440767158,
    "collectionId": 1015244543,
    "trackId": 1015244694,
    "artistName": "Jebroer",
    "collectionName": "Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem] - Single",
    "trackName": "Banaan (feat. Jayh, Skinto & Stepherd)",
    "collectionCensoredName": "Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem] - Single",
    "trackCensoredName": "Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem]",
    "artistViewUrl": "https://itunes.apple.com/us/artist/jebroer/id440767158?uo=4",
    "collectionViewUrl": "https://itunes.apple.com/us/album/banaan-feat-jayh-skinto-stepherd-bigger-better-anthem/id1015244543?i=1015244694&uo=4",
    "trackViewUrl": "https://itunes.apple.com/us/album/banaan-feat-jayh-skinto-stepherd-bigger-better-anthem/id1015244543?i=1015244694&uo=4",
    "previewUrl": "http://a471.phobos.apple.com/us/r30/Music1/v4/ec/b8/a6/ecb8a60c-5494-7865-a45a-cd82ba16264e/mzaf_5838735554688091794.plus.aac.p.m4a",
    "artworkUrl30": "http://is2.mzstatic.com/image/thumb/Music7/v4/e0/56/7e/e0567ed7-43f4-c61a-7cc9-1c541cca055d/source/30x30bb.jpg",
    "artworkUrl60": "http://is2.mzstatic.com/image/thumb/Music7/v4/e0/56/7e/e0567ed7-43f4-c61a-7cc9-1c541cca055d/source/60x60bb.jpg",
    "artworkUrl100": "http://is2.mzstatic.com/image/thumb/Music7/v4/e0/56/7e/e0567ed7-43f4-c61a-7cc9-1c541cca055d/source/100x100bb.jpg",
    "collectionPrice": 0.99,
    "trackPrice": 0.99,
    "releaseDate": "2015-06-30T07:00:00Z",
    "collectionExplicitness": "explicit",
    "trackExplicitness": "explicit",
    "discCount": 1,
    "discNumber": 1,
    "trackCount": 1,
    "trackNumber": 1,
    "trackTimeMillis": 229350,
    "country": "USA",
    "currency": "USD",
    "primaryGenreName": "Hip-Hop/Rap",
    "contentAdvisoryRating": "Explicit",
    "isStreamable": true,
    "artworkUrl512": "http://is2.mzstatic.com/image/thumb/Music7/v4/e0/56/7e/e0567ed7-43f4-c61a-7cc9-1c541cca055d/source/512x512bb.jpg",
    "filename": "Jebroer - Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem]",
    "path": {
        "file": "/Users/Robin/Desktop/Music/Music fix/Jebroer - Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem].mp3",
        "image": "/Users/Robin/Desktop/Music/Music fix/Jebroer - Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem].jpg"
    }
}
Finding a Youtube match...
Using "AIzaSyB2B5d-HAkFEdEOoX2KWweTiHhE6uoVF5E" as token for Youtube.
Using Youtube query: Jebroer - Banaan (feat. Jayh, Skinto & Stepherd) [Bigger Better Anthem]
Found a total of 50 tracks on Youtube.
Found a total of 32 valid videos on Youtube.
Will use this Youtube result:
{
    "kind": "youtube#video",
    "etag": "\"m2yskBQFythfE4irbTIeOgYYfBU/F9egrNG-MoRIOHBAxE9n0MQl7pg\"",
    "id": "Li3KLrXb-FI",
    "snippet": {
        "publishedAt": "2014-12-27T18:35:35.000Z",
        "channelId": "UCDakV-Za_nqzWEahiAnlBuQ",
        "title": "#56 Jebroer ft. Stepherd, Skinto & Jayh - Banaan (Bigger Better Anthem) (bass boosted)",
        "description": "",
        "thumbnails": {
            "default": {
                "url": "https://i.ytimg.com/vi/Li3KLrXb-FI/default.jpg",
                "width": 120,
                "height": 90
            },
            "medium": {
                "url": "https://i.ytimg.com/vi/Li3KLrXb-FI/mqdefault.jpg",
                "width": 320,
                "height": 180
            },
            "high": {
                "url": "https://i.ytimg.com/vi/Li3KLrXb-FI/hqdefault.jpg",
                "width": 480,
                "height": 360
            },
            "standard": {
                "url": "https://i.ytimg.com/vi/Li3KLrXb-FI/sddefault.jpg",
                "width": 640,
                "height": 480
            }
        },
        "channelTitle": "Rob Telkamp",
        "categoryId": "22",
        "liveBroadcastContent": "none",
        "localized": {
            "title": "#56 Jebroer ft. Stepherd, Skinto & Jayh - Banaan (Bigger Better Anthem) (bass boosted)",
            "description": ""
        }
    },
    "contentDetails": {
        "duration": "PT3M49S",
        "dimension": "2d",
        "definition": "hd",
        "caption": "false",
        "licensedContent": false,
        "projection": "rectangular"
    },
    "status": {
        "uploadStatus": "processed",
        "privacyStatus": "public",
        "license": "youtube",
        "embeddable": true,
        "publicStatsViewable": true
    },
    "statistics": {
        "viewCount": "40723",
        "likeCount": "184",
        "dislikeCount": "12",
        "favoriteCount": "0",
        "commentCount": "11"
    },
    "link": "https://www.youtube.com/watch?v=Li3KLrXb-FI",
    "durationMillis": 229000,
    "timeDifference": 350
}
Starting download...
Writing metadata...
Fetching artwork...
Received artwork.
Writing tags...
Completed in 3.23s.
Finished writing metadata!```
Jense5 commented 7 years ago

This issue is still open, do you want me to close it or is this still a bug in the newest version?

haveneersrobin commented 7 years ago

Seems to be fixed in the latest version (although nothing specific was done to fix this). Will re-open/create new issue if happens again.