Fix passing cookies
This commit is contained in:
parent
4ccc75d38b
commit
25fa65e171
|
@ -109,7 +109,7 @@ module.exports = {
|
|||
} else {
|
||||
tempFilePath = path.join(__dirname, '../utils/tmp', `${uuidv4()}.mp3`);
|
||||
|
||||
exec(`yt-dlp --print title ${searchQuery}`, (error, stdout, stderr) => {
|
||||
exec(`yt-dlp --cookies ${path.join(__dirname, '../cookies.txt')} --print title ${searchQuery}`, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Error getting title: ${error}`);
|
||||
message.reply('Failed to retrieve video title.');
|
||||
|
@ -141,7 +141,7 @@ module.exports = {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
exec(`yt-dlp --dump-single-json "ytsearch:${searchQuery}"`, (error, stdout, stderr) => {
|
||||
exec(`yt-dlp --cookies ${path.join(__dirname, '../cookies.txt')} --dump-single-json "ytsearch:${searchQuery}"`, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`Error searching: ${error}`);
|
||||
message.reply('Failed to search for video.');
|
||||
|
|
Loading…
Reference in New Issue