Skip to content

Commit

Permalink
refactor(fetchTrack): try using audio-only results
Browse files Browse the repository at this point in the history
  • Loading branch information
Dwigoric committed Dec 19, 2020
1 parent 16e1ead commit c1ca644
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/SpotifyParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ export class SpotifyParser {
if (!Array.isArray(track.artists)) throw new TypeError(`The track artists must be an array, received type ${typeof track.artists}`);
if (typeof track.name !== "string") throw new TypeError(`The track name must be a string, received type ${typeof track.name}`);

const title = `${track.artists[0].name} - ${track.name}`;
const title = `${track.name} ${track.artists[0].name} description:("Auto-generated by YouTube.")`;

const params = new URLSearchParams();
params.append("identifier", `ytsearch: ${title}`);
Expand Down

0 comments on commit c1ca644

Please sign in to comment.