Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

error messages

Christian Feidce11a63e51d
diff --git a/lib/llm.js b/lib/llm.js
index 3190fe1..d0baef6 100644
--- a/lib/llm.js
+++ b/lib/llm.js
@@ -28,7 +28,7 @@ export async function fetchCompletionLMSTUDIO (system, prompt, model = "llama-3.
message = message.split('\n').filter((_, i) => i > 0).join('\n')
return message
} catch (error) {
- console.error('Error summarizing text:', error)
+ console.error('Error summarizing text:', error.message)
return ''
}
}
\ No newline at end of file
diff --git a/lib/subtitles-summary.js b/lib/subtitles-summary.js
index 02ec6b9..5fdfbe6 100644
--- a/lib/subtitles-summary.js
+++ b/lib/subtitles-summary.js
@@ -23,7 +23,7 @@ export async function summarizeVideo(id, repo, callback = () => {}) {
console.log('Summary completed')
resolve({summary, transcript: cleanedTranscript})
} catch (error) {
- console.error('Error summarizing video', id)
+ console.error('Error summarizing video', id, error.message)
reject(error)
}
})
diff --git a/lib/youtube.js b/lib/youtube.js
index 6b4a97a..97fb0e4 100644
--- a/lib/youtube.js
+++ b/lib/youtube.js
@@ -27,7 +27,7 @@ export async function downloadVideo(id, repo, callback = () => {}) {
resolve(id)
} catch (error) {
console.error(error)
- console.error('Error downloading video:', error)
+ console.error('Error downloading video:', error.message)
reject(error)
}
})
@@ -50,7 +50,7 @@ export async function getVideoSubtitles (id, callback = () => {}) {
const transcript = fs.readFileSync(transcriptPath, 'utf-8')
resolve(transcript)
} catch (error) {
- console.error('Error downloading video subtitles:', error)
+ console.error('Error downloading video subtitles:', error.message)
reject(error)
}
})
@@ -74,7 +74,7 @@ export async function getVideosFor(channelName) {
.filter(v => v.publishedAt > new Date(Date.now() - 30 * 24 * 60 * 60 * 1000))
.filter((_,i) => i<10)
} catch (error) {
- console.error('Error fetching latest video:', error)
+ console.error('Error fetching latest video:', error.message)
return null
}