Giter Site home page Giter Site logo

miraclx / freyr-js Goto Github PK

View Code? Open in Web Editor NEW
1.3K 23.0 81.0 3.46 MB

A tool for downloading songs from music streaming services like Spotify and Apple Music.

Home Page: https://git.io/freyr-js

License: Apache License 2.0

JavaScript 98.78% Dockerfile 0.78% Shell 0.44%
spotify spotify-api spotify-web-api music-streaming music audio download youtube track album

freyr-js's Introduction

Hi there πŸ‘‹

Show Profile Metrics

Nothing here? Click to view

freyr-js's People

Contributors

bastienrobert avatar dependabot[bot] avatar ethanbnntt avatar goooler avatar itranscend avatar jessicah avatar khadeeejah avatar miraclx avatar nettle790 avatar rainerr123 avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freyr-js's Issues

changing default settings?

How do you use the commands to change the default settings for audio bitrate and format? I used the "freyr get --help", but after that, I'm stuck. Your mod is a complete lifesaver by the way!

Awaiting Audiofeeds: Command failed with exit code 1

Output

Awaiting audiofeeds...(failed: [Error: Command failed with exit code 1: /home/d3v/freyr-js/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- rCpXGUA3Hpo
    at makeError (/home/d3v/freyr-js/node_modules/execa/lib/error.js:56:11)
    at handlePromise (/home/d3v/freyr-js/node_modules/execa/index.js:114:26)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)])

Manually calling youtube-dl

$ /home/d3v/freyr-js/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- rCpXGUA3Hpo

ERROR: Unable to download webpage: HTTP Error 429: Too Many Requests (caused by HTTPError()); please report this issue on https://yt-dl.org/bug.
Make sure you are using the latest version; type  youtube-dl -U  to update.
Be sure to call youtube-dl with the --verbose flag and include its complete output.

full error stack generated with the SHOW_DEBUG_STACK=1 environment variable

YouTube Music: Cannot read property 'split' of undefined

Error while collating sources from YouTube Music for spotify:track:2fXKyAyPrEa24c6PJyqznF

Source

duration_ms: item.duration.split(':').reduce((acc, time) => 60 * acc + +time) * 1000,

Output

[03 Common People β€’ Pulp]
  | ➀ Collating sources...      
  |  ➀ [β€’] YouTube Music...(failed: [TypeError: Cannot read property 'split' of undefined
    at /home/d3v/freyr-js/src/services/youtube.js:295:40
    at Array.reduce (<anonymous>)
    at YouTubeMusic.search (/home/d3v/freyr-js/src/services/youtube.js:287:21)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)]

full error stack generated with the SHOW_DEBUG_STACK=1 environment variable

YouTubeSearchError: Failed to extract `INNERTUBE_API_KEY`

Sometime I get this for a given query: YouTubeSearchError: Failed to extract INNERTUBE_API_KEY
I'm wondering if it is important or not as it seems too be,
i'd prefer to have Youtube Music source to work

This is the extract with -e SHOW_DEBUG_STACK=1

freyr get spotify:track:67UOlZLz6tDEDuScefmWDd
    ____                    
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /    
/_/ /_/   \___/\__, /_/     
              /____/ v0.1.0

freyr v0.1.0 - (c) Miraculous Owonubi <[email protected]>
-------------------------------------------------------------
Checking directory permissions...[done] 
[spotify:track:67UOlZLz6tDEDuScefmWDd]
 [β€’] Identifying service...[Spotify]
 [β€’] Checking authentication...[unauthenticated]
 [Spotify Login]
  [β€’] Logging in...[done] 
 Detected [track]
 Obtaining track metadata...[done] 
  ➀ Title: So Weit Wie Noch Nie
  ➀ Album: Kompilation
  ➀ Artist: Jürgen Paape
  ➀ Year: 2011
  ➀ Playtime: 05:48
 [β€’] Collating...
 β€’ [11 So Weit Wie Noch Nie]
    | ➀ Collating sources...
    |  ➀ [β€’] YouTube Music...(failed: [YouTubeSearchError: Failed to extract `INNERTUBE_API_KEY`]) 
    |  ➀ [β€’] YouTube...[success, found 15 sources]
    | ➀ Awaiting audiofeeds...[done] 
    | [βœ“] Got album art 
    | [βœ“] Got raw track file 
    | [β€’] Post Processing...
 [β€’] Download Complete
 [β€’] Embedding Metadata...
  β€’ [βœ“] 11 So Weit Wie Noch Nie
[β€’] Collation Complete
========== Stats ==========
 [β€’] Runtime: [22.8s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [01]
     Β» Skipped: [00]
     βœ“ Passed:  [01]
     βœ• Failed:  [00]
 [β€’] Output directory: [/data]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 7.12 MB
 [β€’] Total Network Usage: 5.95 MB
     β™« Media: 5.90 MB
     ➀ Album Art: 44.27 KB
 [β€’] Output bitrate: 160k
===========================

Can't install AtomicParsley (macOS)

Hi, I have been trying to install AtomicParsley, but it has been impossible: I dragged the file on the directory of the project freyr-js/bins/posix/AtomicParsley but when running the program it says Unable to find an executable AtomicParsley binary. Please install.

Any solutions?

getTrack is not working on Apple Music service if albumInfo.artists is undefined

The error is:

 ...
 [β€’] Collating...
  [β€’] Inquiring tracks...(failed: [TypeError: Cannot read property '0' of undefined
    at AppleMusic.wrapTrackMeta (/usr/local/lib/node_modules/freyr/src/services/apple_music.js:116:38)
    at /usr/local/lib/node_modules/freyr/src/services/apple_music.js:239:14
    at runNextTicks (internal/process/task_queues.js:58:5)
    at processImmediate (internal/timers.js:434:9)]) 
 [i] An error occurred while processing the query (Failed to collect playlist tracks)
========== Stats ==========
 [β€’] Runtime: [5s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [00]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [00]
 [β€’] Output directory: [.]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 320k
===========================

On the following track: https://music.apple.com/fr/album/jazz-carnival/1044984995?i=1044985022

Synchronize Liked Songs

Freyr could implement a feature for synchronizing tracks off a special playlist of liked songs.

Traffic on this issue determines whether or not it gets implemented.

CPU is completely utilized

When I want to download a complete playlist, my server's CPU is completely maxed out. I have 4 cores assigned to my VM and they are almost always all at 100% utilization. So far I have only tested the Spotify playlist download. I also already turned down the parallel downloads in the config and the result was the same

YouTube Music Support

There isn't any stable YouTube Music API for freyr to be based on. The best we can do right now is to extract data off it's web client and that is subject to frequent breaking changes. (As per #3: server response changed from under us).

Support for YouTube Music would have to wait for either an official API from Google or a library that's well maintained and kept up-to-date.

Can't find python binary despite being present

I tried to install freyr by npm, but got ERR constantly, so I uninstalled that one and re-install using Yarn. I tried using one of the example links to try it out, apparently the error is related to python but I can't figure out why is not working.

Command executed by me: freyr https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443

Result:

freyr https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443 
    ____                    
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /    
/_/ /_/   \___/\__, /_/     
              /____/ v0.2.0

freyr v0.2.0 - (c) Miraculous Owonubi <[email protected]>
-------------------------------------------------------------
Checking directory permissions...[done] 
[https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443]
 [β€’] Identifying service...[Apple Music]
 [β€’] Checking authentication...[authenticated]
 Detected [album]
 Obtaining album metadata...[done] 
  ➀ Album Name: I'm Sorry, I'm Not Sorry
  ➀ Artist: Sody
  ➀ Tracks: 4
  ➀ Type: Album
  ➀ Year: 2020
  ➀ Genres: Singer/Songwriter, Music
 [β€’] Collating [I'm Sorry, I'm Not Sorry]...
  [β€’] Inquiring tracks...[done] 
   β€’ [01 What We Had]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 6 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 127: /usr/local/share/.config/yarn/global/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- Xp4tEiHE5ak
/usr/bin/env: β€˜python’: No such file or directory]) 
   β€’ [02 Reason To Stay]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 6 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 127: /usr/local/share/.config/yarn/global/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- pAWjx_UnloI
/usr/bin/env: β€˜python’: No such file or directory]) 
   β€’ [03 Nothing Ever Changes]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 5 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 127: /usr/local/share/.config/yarn/global/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- lHXbWhFiPGo
/usr/bin/env: β€˜python’: No such file or directory]) 
   β€’ [04 Love's a Waste]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 4 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 127: /usr/local/share/.config/yarn/global/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- KUbU2blS0ZY
/usr/bin/env: β€˜python’: No such file or directory]) 
 [β€’] Download Complete
 [β€’] Embedding Metadata...
  β€’ [βœ•] 01 What We Had [apple_music:track:1491795452] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 02 Reason To Stay [apple_music:track:1491795455] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 03 Nothing Ever Changes [apple_music:track:1491795607] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 04 Love's a Waste [apple_music:track:1491795614] (failed: Error while collecting sources feeds)
[β€’] Collation Complete
========== Stats ==========
 [β€’] Runtime: [3.8s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [04]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [04]
 [β€’] Output directory: [.]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 320k
===========================

Error: Spotify URI type [local] is invalid

While trying to get spotify:playlist:12aA2isH1LrFEiXNXIbzar
I have this error

freyr v0.1.0 - (c) Miraculous Owonubi <[email protected]>
-------------------------------------------------------------
Checking directory permissions...[done] 
[spotify:playlist:12aA2isH1LrFEiXNXIbzar]
 [β€’] Identifying service...[Spotify]
 [β€’] Checking authentication...[unauthenticated]
 [Spotify Login]
  [β€’] Logging in...[done] 
 Detected [playlist]
 Obtaining playlist metadata...[done] 
  ➀ Playlist Name: Xavier Dolan got it right!
  ➀ By: jrmgx
  ➀ Type: Public
  ➀ Followers: 9
  ➀ Tracks: 615
 [β€’] Collating...
  [β€’] Inquiring tracks...(failed: [Error: Spotify URI type [local] is invalid.
    at Spotify.validateType (/freyr/src/services/spotify.js:118:46)
    at Spotify.parseURI (/freyr/src/services/spotify.js:127:36)
    at /freyr/src/services/spotify.js:218:30
    at Array.map (<anonymous>)
    at Spotify.processData (/freyr/src/services/spotify.js:217:37)
    at Spotify.getTrack (/freyr/src/services/spotify.js:242:17)
    at Spotify.getPlaylistTracks (/freyr/src/services/spotify.js:283:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)]) 
 [i] An error occurred while processing the query (Failed to collect playlist tracks)
========== Stats ==========
 [β€’] Runtime: [2.4s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [00]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [00]
 [β€’] Output directory: [/data]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 160k
===========================

Using last docker image

I don't understand the error message "local" has no meaning here for me,
the playlist is available here https://open.spotify.com/playlist/12aA2isH1LrFEiXNXIbzar?si=1CZQyaEmTYeFp5cGYf4amw

Let me know if I can help more

install error

I tried installing it with NPM, but I keep getting this error.
C:\Users\annyi>npm install -g miraclx/freyr-js
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://[email protected]/miraclx/freyr-js.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.

Manual Compilation

Sometimes, freyr's internal logic for identifying sources across services fails, and track(s) affected can't be downloaded.

We should provide a means for manual intervention.

Where a user could manually identify the source and provider URIs that freyr can thereafter compile a track from.

We can do this by introducing a new subcommand - make

freyr make <URI> --source youtube:URI

For example:

freyr make spotify:track:54bFM56PmE4YLRnqpW6Tha --source youtube:oDn4eKyhSH4

  • Get track metadata from URI
  • Get audio from the source
  • Process audio with the metadata

failed: Error while collecting sources feeds

freyr v0.1.0 - (c) Miraculous Owonubi <[email protected]>
-------------------------------------------------------------
Checking directory permissions...[done]
[https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443]
 [β€’] Identifying service...[Apple Music]
 [β€’] Checking authentication...[authenticated]
 Detected [album]
 Obtaining album metadata...[done]
  ➀ Album Name: I'm Sorry, I'm Not Sorry
  ➀ Artist: Sody
  ➀ Tracks: 4
  ➀ Type: Album
  ➀ Year: 2020
  ➀ Genres: Singer/Songwriter, Music
 [β€’] Collating [I'm Sorry, I'm Not Sorry]...
  [β€’] Inquiring tracks...[done]
   β€’ [01 What We Had]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 5 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 3: C:\Windows\System32\freyr-js\node_modules\youtube-dl\bin\youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir --encoding utf8 -- Xp4tEiHE5ak
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00009744 (most recent call first):])
   β€’ [02 Reason To Stay]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 6 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 3: C:\Windows\System32\freyr-js\node_modules\youtube-dl\bin\youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir --encoding utf8 -- pAWjx_UnloI
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x000114dc (most recent call first):])
   β€’ [03 Nothing Ever Changes]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 5 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 3: C:\Windows\System32\freyr-js\node_modules\youtube-dl\bin\youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir --encoding utf8 -- lHXbWhFiPGo
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x00010a48 (most recent call first):])
   β€’ [04 Love's a Waste]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 4 sources]
      | ➀ Awaiting audiofeeds...(failed: [Command failed with exit code 3: C:\Windows\System32\freyr-js\node_modules\youtube-dl\bin\youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir --encoding utf8 -- KUbU2blS0ZY
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x000127bc (most recent call first):])
 [β€’] Download Complete
 [β€’] Embedding Metadata...
  β€’ [βœ•] 01 What We Had [apple_music:track:1491795452] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 02 Reason To Stay [apple_music:track:1491795455] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 03 Nothing Ever Changes [apple_music:track:1491795607] (failed: Error while collecting sources feeds)
  β€’ [βœ•] 04 Love's a Waste [apple_music:track:1491795614] (failed: Error while collecting sources feeds)
[β€’] Collation Complete
========== Stats ==========
 [β€’] Runtime: [6.7s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [04]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [04]
 [β€’] Output directory: [.]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 320k
===========================

C:\Windows\System32\freyr-js>

compilation

support for manual compilation of tracks would be really cool, in case there's a slight digression of the original music

npm install error

as requested #39 (comment):

$ npm install -g miraclx/freyr-js
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/Cellar/node/15.8.0/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/bfm/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node ./scripts/download.js
npm ERR! npm ERR! node:internal/modules/cjs/loader:928
npm ERR! npm ERR! throw err;
npm ERR! npm ERR! ^
npm ERR! npm ERR!
npm ERR! npm ERR! Error: Cannot find module 'got'
npm ERR! npm ERR! Require stack:
npm ERR! npm ERR! - /Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76/lib/downloader.js
npm ERR! npm ERR! - /Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76/scripts/download.js
npm ERR! npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
npm ERR! npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:769:27)
npm ERR! npm ERR! at Module.require (node:internal/modules/cjs/loader:997:19)
npm ERR! npm ERR! at require (node:internal/modules/cjs/helpers:92:18)
npm ERR! npm ERR! at Object. (/Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76/lib/downloader.js:5:13)
npm ERR! npm ERR! at Module._compile (node:internal/modules/cjs/loader:1108:14)
npm ERR! npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
npm ERR! npm ERR! at Module.load (node:internal/modules/cjs/loader:973:32)
npm ERR! npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:813:14)
npm ERR! npm ERR! at Module.require (node:internal/modules/cjs/loader:997:19) {
npm ERR! npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! npm ERR! requireStack: [
npm ERR! npm ERR! '/Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76/lib/downloader.js',
npm ERR! npm ERR! '/Users/bfm/.npm/_cacache/tmp/git-clone-5f432a76/scripts/download.js'
npm ERR! npm ERR! ]
npm ERR! npm ERR! }

getPlaylist is not working with Apple Music if description is empty

Description has to be non-null or property short does not exists in it.

 ...
 [β€’] Identifying service...[Apple Music]
 [β€’] Checking authentication...[authenticated]
 Detected [playlist]
 Obtaining playlist metadata...(failed: [Cannot read property 'short' of undefined]) 
 [i] An error occurred while processing the query
========== Stats ==========
 [β€’] Runtime: [744ms]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [00]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [00]
 [β€’] Output directory: [.]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 320k
===========================

Can't find AtomicParsley binary

Good afternoon!

I'm having a problem where freyr can't find the atomicparsley binary.

image

As you can see, atomicparsley is indeed installed. I'm using ArchWSL running in Windows. Don't know if this can be the cause of the problems.

ERROR: No video formats found (youtube-dl)

docker run -e SHOW_DEBUG_STACK=1 -it --rm -v $PWD:/data freyrcli/freyrjs:latest -b 160 spotify:playlist:4z2rRbKg7wSa4CfhliIR39

Using default tag: latest
latest: Pulling from freyrcli/freyrjs
Digest: sha256:58e9e56a5a1bd6b10357ba8a63798e183689e57ba1190eb9e74f17c4df59638b
Status: Image is up to date for freyrcli/freyrjs:latest
docker.io/freyrcli/freyrjs:latest
    ____                    
   / __/_______  __  _______
  / /_/ ___/ _ \/ / / / ___/
 / __/ /  /  __/ /_/ / /    
/_/ /_/   \___/\__, /_/     
              /____/ v0.1.0

freyr v0.1.0 - (c) Miraculous Owonubi <[email protected]>
-------------------------------------------------------------
Checking directory permissions...[done] 
[spotify:playlist:4z2rRbKg7wSa4CfhliIR39]
 [β€’] Identifying service...[Spotify]
 [β€’] Checking authentication...[unauthenticated]
 [Spotify Login]
  [β€’] Logging in...[done] 
 Detected [playlist]
 Obtaining playlist metadata...[done] 
  ➀ Playlist Name: Francophone
  ➀ By: dsas_ychamfaleon
  ➀ Type: Public
  ➀ Tracks: 70
 [β€’] Collating...
  [β€’] Inquiring tracks...[done] 
   β€’ [01 Je me suis fait tout petit β€’ Georges Brassens]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...[success, found 6 sources]
      | ➀ Awaiting audiofeeds...(failed: [Error: Command failed with exit code 1: /freyr/node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-dir -- cZ98wSr3HOU
ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
    at makeError (/freyr/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/freyr/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)]) 
(...)

Most of the tracks β€” if not all β€” errors out like this
Any idea?

I kind of understand that it's probably a youtube-dl problem, but maybe not?
and if so, any idea to bypass it?

Thank you for your time as usual :)

YouTube Music: Cannot use 'in' operator to search for 'runs' in null

Error while collating sources from YouTube Music for spotify:track:4CFzH8jRqwNIYIRBv8Bkwk

Output

[01 Viklau]
    | ➀ Collating sources...
    |  ➀ [β€’] YouTube Music...(failed: [TypeError: Cannot use 'in' operator to search for 'runs' in null
    at /freyr/src/walkr.js:11:15
    at Array.reduce (<anonymous>)
    at walk (/freyr/src/walkr.js:4:22)
    at /freyr/src/services/youtube.js:147:27
    at Array.map (<anonymous>)
    at YouTubeMusic.search (/freyr/src/services/youtube.js:146:13)
    at processTicksAndRejections (node:internal/process/task_queues:93:5)
    at async YouTubeMusic.search (/freyr/src/services/youtube.js:285:21)])

full error stack generated with the SHOW_DEBUG_STACK=1 environment variable

Downloads limited to 100 items?

I tried downloading a playlist with >2,000 tracks, but it appears a maximum of 100 gets processed. Cursory look through the code, I can't figure out what might be causing the issue. I'm guessing there's some sort of paging when querying Spotify that's not being handled?

Obtaining playlist metadata...[done]
➀ Playlist Name: All the liked
➀ By: Jessica Hamilton
➀ Type: Public
➀ Tracks: 2270

========== Stats ==========
[β€’] Runtime: [9.5s]
[β€’] Total queries: [01]
[β€’] Total tracks: [100]
Β» Skipped: [98]
βœ“ Passed: [00]
βœ• Failed: [02]

Add support for Tidal

I have a suggestion that you could add. It would be very nice if your tool would also support the streaming service Tidal, as this is also used by a lot of people

An error occurred while processing the query (4 [Exception]: Quota limit exceeded)

Hey, first of all the tool you've created is very cool and thanks for creating such a tool!

I've tried to download nearly anything from Avicii with the following command:
freyr get https://www.deezer.com/us/artist/293585 -l artist="Avicii"

My problem is that I received after some Collating... infos this error:

[i] An error occurred while processing the query (4 [Exception]: Quota limit exceeded)
========== Stats ==========
 [β€’] Runtime: [4.7s]
 [β€’] Total queries: [01]
 [β€’] Total tracks: [00]
     Β» Skipped: [00]
     βœ“ Passed:  [00]
     βœ• Failed:  [00]
 [β€’] Output directory: [.]
 [β€’] Cover Art: cover.png (640x640)
 [β€’] Total Output size: 0.00 B
 [β€’] Total Network Usage: 0.00 B
     β™« Media: 0.00 B
     ➀ Album Art: 0.00 B
 [β€’] Output bitrate: 320k

What could I do to get any album/song from an artist?

Album fails to export ("No such file or directory")

I'm trying to download my playlist and this one album decides to not work. Windows says the folder doesn't exist (corruption?). Windows doesn't let me delete the folder normally, I had to run rd /s "\\?D:\MusicDownloads\Mori Calliope\Your Mori." to delete it.
Maybe it's a special character after the period, the console had a weird space after it, so it could possibly be an invalid whitespace character?

β€’ [01 The Grim Reaper is a Live-Streamer β€’ Mori Calliope]
     | ➀ Collating sources...
     |  ➀ [β€’] YouTube Music...[success, found 4 sources]
     | ➀ Awaiting audiofeeds...[done]
     | {i} Resuming at 200843
     | [βœ“] Got album art
     | [βœ“] Got raw track file
     | [β€’] Post Processing...
  β€’ [02 Red β€’ Mori Calliope]
     | ➀ Collating sources...
     |  ➀ [β€’] YouTube Music...[success, found 5 sources]
     | ➀ Awaiting audiofeeds...[done]
     | {i} Resuming at 200843
     | [βœ“] Got album art
     | [βœ“] Got raw track file
     | [β€’] Post Processing...
  β€’ [03 guh β€’ Mori Calliope]
     | ➀ Collating sources...
     |  ➀ [β€’] YouTube Music...[success, found 3 sources]
     | ➀ Awaiting audiofeeds...[done]
     | {i} Resuming at 200843
     | [βœ“] Got album art
     | [βœ“] Got raw track file
     | [β€’] Post Processing...
  β€’ [04 γ„γ˜γ‚γ£ε­Bully β€’ Mori Calliope]
     | ➀ Collating sources...
     |  ➀ [β€’] YouTube Music...[success, found 3 sources]
     | ➀ Awaiting audiofeeds...[done]
     | {i} Resuming at 200843
     | [βœ“] Got album art
     | [βœ“] Got raw track file
     | [β€’] Post Processing...

β€’ [βœ•] 01 The Grim Reaper is a Live-Streamer β€’ Mori Calliope [spotify:track:6i3It0rVKEvoaTkzIxGOpg] (failed: Error while encoding audio [ffmpeg exited with code 1: Mori Calliope\Your Mori.\01 The Grim Reaper is a Live-Streamer.m4a: No such file or directory
])
 β€’ [βœ•] 02 Red β€’ Mori Calliope [spotify:track:3h8efEQ3MsDESpfeKX1JI4] (failed: Error while encoding audio [ffmpeg exited with code 1: Mori Calliope\Your Mori.\02 Red.m4a: No such file or directory
])
 β€’ [βœ•] 03 guh β€’ Mori Calliope [spotify:track:1rae8blMgdy6WQgZAHxRXN] (failed: Error while encoding audio [ffmpeg exited with code 1: Mori Calliope\Your Mori.\03 guh.m4a: No such file or directory
])
 β€’ [βœ•] 04 γ„γ˜γ‚γ£ε­Bully β€’ Mori Calliope [spotify:track:1Mt287tRgGUKQtB885KHhF] (failed: Error while encoding audio [ffmpeg exited with code 1: Mori Calliope\Your Mori.\04 γ„γ˜γ‚γ£ε­Bully.m4a: No such file or directory
])

Downloads limited to 100 items for playlist on Apple Music

Hi, first of all thanks for this tool!

I am trying to download songs from this playlist https://music.apple.com/it/playlist/matrimonio/pl.u-DdAN8EeFxk58b, but I am getting a 100 items cap like in #4

I am using freyr version 0.2.0 and AtomicParsley 20210124.204813.0

P.S.: for the above playlist I had to introduce a quick hack here:

.map(([val, size]) => val.toString().padStart(size, '0'))

(val || "") instead of just val, I believe this was because of something missing in one of the songs metadata.

Unable to install AtomicParsley (Windows)

Hi, I am unable to install AtomicParsley.

I am encountering this error:
Unable to find an executable AtomicParsley binary. Please install.

I have downloaded the .exe and placed it in PATH of the system environment variable.

I am also able to run AtomicParsley directly from the directory through cmd.

Sorry if I am repeating the question from the macOS one, but I am a noob in this and am not sure if it is the same as the other issue.

Thank you!

Unnecessary pause while "Inquiring Tracks" for large playlists

As mentioned here (#4 (comment)), freyr eagerly awaits collating metadata on all tracks in a collection before it begins to process and download any of them.
Meaning it halts until every last track has been known before it touches even the first one.

This is incredibly wasteful and better solutions have been used elsewhere around the source, involving asynchronous queueing.

Although this is a minor tolerable inconvenience, it's fixable, just not pressing.
However, If you want this fixed, please let me know or if you can, create a PR that helps.

Install failed on MacOS Big Sur

$ npm install -g git+https://github.com/miraclx/freyr-js.git

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/Cellar/node/15.6.0/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --cache=/Users/.npm/_cacache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/.npm/_cacache/tmp/git-clone-541fc326
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node ./scripts/download.js
npm ERR! npm ERR! node:internal/modules/cjs/loader:928
npm ERR! npm ERR! throw err;
npm ERR! npm ERR! ^
npm ERR! npm ERR!
npm ERR! npm ERR! Error: Cannot find module 'got'
npm ERR! npm ERR! Require stack:
npm ERR! npm ERR! - /Users/hugobarbosa/.npm/_cacache/tmp/git-clone-541fc326/lib/downloader.js
npm ERR! npm ERR! - /Users/hugobarbosa/.npm/_cacache/tmp/git-clone-541fc326/scripts/download.js
npm ERR! npm ERR! at Function.Module._resolveFilename (node:internal/modules/cjs/loader:925:15)
npm ERR! npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:769:27)
npm ERR! npm ERR! at Module.require (node:internal/modules/cjs/loader:997:19)
npm ERR! npm ERR! at require (node:internal/modules/cjs/helpers:92:18)
npm ERR! npm ERR! at Object. (/Users/.npm/_cacache/tmp/git-clone-541fc326/lib/downloader.js:5:13)
npm ERR! npm ERR! at Module._compile (node:internal/modules/cjs/loader:1108:14)
npm ERR! npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
npm ERR! npm ERR! at Module.load (node:internal/modules/cjs/loader:973:32)
npm ERR! npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:813:14)
npm ERR! npm ERR! at Module.require (node:internal/modules/cjs/loader:997:19) {
npm ERR! npm ERR! code: 'MODULE_NOT_FOUND',
npm ERR! npm ERR! requireStack: [
npm ERR! npm ERR! '/Users/.npm/_cacache/tmp/git-clone-541fc326/lib/downloader.js',
npm ERR! npm ERR! '/Users/.npm/_cacache/tmp/git-clone-541fc326/scripts/download.js'
npm ERR! npm ERR! ]
npm ERR! npm ERR! }
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/.npm/_cacache/_logs/2021-01-24T19_07_47_718Z-debug.log

Any ideas?

PFR (Product Feature Request) : Mutagen

Hi,

I think your product with atomic parsley can also use mutagen

Obtaining album metadata...[done]
➀ Album Name: ...
➀ Artist: Various Artists
➀ Tracks: 31
➀ Type: Compilation
➀ Year: 2021

To source metadata of existing files

Erro ao executar

HRA-DL-highresaudio.com freyr-js
$ cd freyr-js
$ ls
Dockerfile cli.js node_modules
LICENSE conf.json package-lock.json
README.md docker package.json
banner.js media src
$ fleyr -help
No command fleyr found, did you mean:
Command flex in package flex
Command clear in package ncurses
$ freyr https://music.apple.com/us/album/im-sorry-im-not-sorry-ep/1491795443
No command freyr found, did you mean:
Command free in package procps

Freyer does not work anymore

Hi everyone

Freyr is not working at all anymore

Awaiting audiofeeds...(failed: [Command failed with exit code 1: /node_modules/youtube-dl/bin/youtube-dl --dump-json -f best --socket-timeout=20 --no-cache-di

ERROR: No video formats found; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.])

whatever source

yarn post install error

Installed via yarn on MacOS without any notable errors
ran initial freyr command and got following errors. I don't enough to know what to do next:

hobbes:~ bfm$ freyr spotify:track:5FNS5Vj69AhRGJWjhrAd01
node:internal/fs/utils:322
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/Users/bfm/.config/yarn/global/node_modules/youtube-dl/bin/details'
    at Object.openSync (node:fs:492:3)
    at readFileSync (node:fs:393:35)
    at module.exports (/Users/bfm/.config/yarn/global/node_modules/youtube-dl/lib/get-binary.js:15:30)
    at Object.<anonymous> (/Users/bfm/.config/yarn/global/node_modules/youtube-dl/lib/youtube-dl.js:18:41)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/bfm/.config/yarn/global/node_modules/freyr/cli.js:23:19)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/Users/bfm/.config/yarn/global/node_modules/youtube-dl/bin/details'
}

Apple Music DL not working

Apple Music currently fails at obtaining album metadata:

Obtaining album metadata...(failed: [Request failed with status code 401])
[i] An error occurred while processing the query

Any chance this could be fixed?

FLAC Audio Quality Support

Thanks for this awesome project. Am trying to find out a way to download FLAC Quality audio with Spotify link. Could you please help me with the syntax?

Thank you!

Unable to find where music gets downloaded

Even though I've managed to figure out how to download songs, I'm having trouble locating them. Whenever I download something the terminal dispays this:
s

What confuses me is the section 'Output directory: [/data]'. I don't know where that is, perhaps Docker automatically sets that up when I run Freyr?

image

I apologise for bothering you if it's something really simple, I just haven't had much experience with such programs.

Unable to install docker image on ARMv7

I t tried installing using docker on my Raspberry Pi 4 using the command in the readme but it seems like armv7 isn't supported.

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v7) and no specific platform was requested standard_init_linux.go:219: exec user process caused: exec format error

It'd be great if you could add support for ARMv7

StripChar.RSspecChar(...).replace is not a function]

I guess it's only a visual problem or similar but I wanted to report it in case it's more important that what I think

   β€’ [32 Peer Gynt – Le matin β€’ Edvard Grieg]
      | ➀ Collating sources...
      |  ➀ [β€’] YouTube Music...(failed: [StripChar.RSspecChar(...).replace is not a function]) 
      |  ➀ [β€’] YouTube...[success, found 18 sources]

Apple Music: Request failed with status code 401

Apple Music has stopped working.

freyr apple_music:album:1539499185

Output

Obtaining album metadata...(failed: [Error: Request failed with status code 401
    at ResourceClient.<anonymous> (/data/data/com.termux/files/home/git/freyr-js/node_modules/@yujinakayama/apple-music/dist/resourceClient.js:53:23)
    at Generator.next (<anonymous>)
    at fulfilled (/data/data/com.termux/files/home/git/freyr-js/node_modules/@yujinakayama/apple-music/dist/resourceClient.js:5:58)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)])

It seems, perhaps, the authorization code is now invalid.

"developerToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNTgyMTQzMTIxLCJleHAiOjE1OTc2OTUxMjF9.j3MAuNa0ZfVVOsBtsGFBmNwT4jPrKu2Alp5PzdhQC3Id--pboI9GqrysOSj2bfg0P-iJboXsg3R_dWr1TQ3pwg"

full error stack generated with the SHOW_DEBUG_STACK=1 environment variable

Zero sources found

I had tried this a couple weeks ago, and was working fine, but I've tried again just now, and I'm getting Zero sources found error for all tracks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.