Spaces:
Paused
Paused
- lib/spotify.js +2 -1
lib/spotify.js
CHANGED
|
@@ -3,7 +3,7 @@ const yts = require("yt-search");
|
|
| 3 |
const { getAudio } = require("../lib/ytdl");
|
| 4 |
const path = require("path");
|
| 5 |
const fs = require("fs");
|
| 6 |
-
|
| 7 |
|
| 8 |
const dirTmp = path.join(__dirname, "../tmp");
|
| 9 |
const clientId = '8f777f61f80e4051b754d8e50310ad6e';
|
|
@@ -32,6 +32,7 @@ async function getAccessToken() {
|
|
| 32 |
}
|
| 33 |
|
| 34 |
async function spotifyTrack(trackUrl) {
|
|
|
|
| 35 |
try {
|
| 36 |
const match = trackUrl.match(/track\/([a-zA-Z0-9]+)/);
|
| 37 |
if (!match) throw new Error('URL tidak valid');
|
|
|
|
| 3 |
const { getAudio } = require("../lib/ytdl");
|
| 4 |
const path = require("path");
|
| 5 |
const fs = require("fs");
|
| 6 |
+
|
| 7 |
|
| 8 |
const dirTmp = path.join(__dirname, "../tmp");
|
| 9 |
const clientId = '8f777f61f80e4051b754d8e50310ad6e';
|
|
|
|
| 32 |
}
|
| 33 |
|
| 34 |
async function spotifyTrack(trackUrl) {
|
| 35 |
+
const { ID3Writer } = await import('browser-id3-writer');
|
| 36 |
try {
|
| 37 |
const match = trackUrl.match(/track\/([a-zA-Z0-9]+)/);
|
| 38 |
if (!match) throw new Error('URL tidak valid');
|