Skip to content

Commit

Permalink
Merge branch 'master' into renovate/file-type-18.x-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
miraclx committed Dec 27, 2023
2 parents 0f797ac + e1194f1 commit 7ecbc1c
Show file tree
Hide file tree
Showing 6 changed files with 192 additions and 162 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ An invalid `refreshToken`, when specified, would fallback to requesting account
2. Click `CREATE A CLIENT ID` and create an app
3. Now click `Edit Settings`
4. Add `http://localhost:36346/callback` to the Redirect URIs
5. Include the `clientId` and the `clientSecret` from the dashboard in the `spotify` object that is a property of the `services` object of the `conf.json` file. [See [Confiuration](#configuration)]
5. Include the `clientId` and the `clientSecret` from the dashboard in the `spotify` object that is a property of the `services` object of the `conf.json` file. [See [Configuration](#configuration)]
6. You are now ready to authenticate with Spotify!

</details>
Expand All @@ -793,7 +793,7 @@ The `storefront` option defines the default storefront to be used in the absence
[See [Apple Music API: Getting Keys and Creating Tokens
](https://developer.apple.com/documentation/applemusicapi/getting_keys_and_creating_tokens)]

After successfully acquiring the developer token, include the `developerToken` to the `apple_music` object that's a property of the `services` object in the `conf.json` file. [See [Confiuration](#configuration)]
After successfully acquiring the developer token, include the `developerToken` to the `apple_music` object that's a property of the `services` object in the `conf.json` file. [See [Configuration](#configuration)]
</details>

<details>
Expand Down
6 changes: 6 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -1333,6 +1333,12 @@ async function init(packageJson, queries, options) {

const [feedMeta] = audioFeeds.formats.filter(meta => meta.abr && !meta.vbr).sort((meta1, meta2) => meta2.abr - meta1.abr);

if (!feedMeta) {
let err = new Error('No suitable audio format found');
trackLogger.log(`| [\u2715] ${err.message}`);
return {meta, err, [symbols.errorCode]: 2};
}

meta.fingerprint = crypto.createHash('md5').update(`${audioSource.source.videoId} ${feedMeta.format_id}`).digest('hex');
const files = await downloadQueue.push({track, meta, feedMeta, trackLogger}).catch(errObject =>
Promise.reject({
Expand Down
2 changes: 1 addition & 1 deletion conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"apple_music": {
"storefront": "us",
"developerToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNjk1ODI5ODYzLCJleHAiOjE3MDMwODc0NjMsInJvb3RfaHR0cHNfb3JpZ2luIjpbImFwcGxlLmNvbSJdfQ.S7HblWkZPN38aj7FvqAA_Q4qjvg5GSRsD0f3jkV-N7Po2Xq-1Kzd3MsFfu6Fmllqb5h2bobX7kndHAJL6_Th9w"
"developerToken": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IldlYlBsYXlLaWQifQ.eyJpc3MiOiJBTVBXZWJQbGF5IiwiaWF0IjoxNzAyNTAyMjM0LCJleHAiOjE3MDk3NTk4MzQsInJvb3RfaHR0cHNfb3JpZ2luIjpbImFwcGxlLmNvbSJdfQ.zzeMLmez71PLinP9GozYSQnF7NYyCiXHB9tKL3-cyu3LzyeRnYz0ejLj4CrNJs0dlNkFg9_mwKmMLueUAR-KRg"
},
"deezer": {
"retries": 2
Expand Down
Loading

0 comments on commit 7ecbc1c

Please sign in to comment.