aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--apps/Player/components/Video.js10
-rw-r--r--configs/dbConnect.js3
-rw-r--r--configs/translations.js4
4 files changed, 16 insertions, 2 deletions
diff --git a/README.md b/README.md
index 23898cd..beddde4 100644
--- a/README.md
+++ b/README.md
@@ -89,4 +89,3 @@ In the app menu user has following options (from the left):
Screenshot:
![Game of life](screenshot.jpg)
-
diff --git a/apps/Player/components/Video.js b/apps/Player/components/Video.js
index 2167ee0..161191a 100644
--- a/apps/Player/components/Video.js
+++ b/apps/Player/components/Video.js
@@ -16,6 +16,15 @@ const Video = ({ playlist, current, setCurrent, audioOnly = false, setDetails })
setCurrent(current === playlist.length - 1 ? null : current + 1)
}
+ const handleError = () => {
+ setPopup({
+ content: t('player_youtube_no_stream_error') + playlist[current].title,
+ time: 2000,
+ error: true
+ })
+ handleEnd()
+ }
+
useEffect(() => {
setLoading(true)
if (current === null) {
@@ -85,6 +94,7 @@ const Video = ({ playlist, current, setCurrent, audioOnly = false, setDetails })
<>
<video
onEnded={handleEnd}
+ onError={handleError}
ref={videoEl}
key={data.id}
controls
diff --git a/configs/dbConnect.js b/configs/dbConnect.js
index 8dd7e0b..b6a87a2 100644
--- a/configs/dbConnect.js
+++ b/configs/dbConnect.js
@@ -31,7 +31,8 @@ async function dbConnect () {
bufferCommands: false,
bufferMaxEntries: 0,
useFindAndModify: false,
- useCreateIndex: true
+ useCreateIndex: true,
+ dbName: 'apps',
}
cached.promise = mongoose.connect(MONGODB_URI, opts).then((mongoose) => {
diff --git a/configs/translations.js b/configs/translations.js
index 617ce16..f2a3f9b 100644
--- a/configs/translations.js
+++ b/configs/translations.js
@@ -84,6 +84,7 @@ const translations = {
player_item_playing: 'Playing in Player',
player_item_enqueued: 'Enqueued in Player',
player_youtube_fetching_error: 'Could not get item from Youtube',
+ player_youtube_no_stream_error: 'Could not load stream for ',
change_password_current: 'Current password',
change_password_new: 'New password',
change_password_confirm: 'Confirm new password',
@@ -188,6 +189,7 @@ const translations = {
player_item_playing: 'Odtwarzanie w Odtwarzaczu',
player_item_enqueued: 'Dodano do kolejki odtwarzania',
player_youtube_fetching_error: 'Błąd pobierania z Youtube',
+ player_youtube_no_stream_error: 'Nie udało się załadować streamu dla ',
change_password_current: 'Obecne hasło',
change_password_new: 'Nowe hasło',
change_password_confirm: 'Powtórz nowe hasło',
@@ -292,6 +294,7 @@ const translations = {
player_item_playing: 'Jugar con el Jugador',
player_item_enqueued: 'Añadido a la cola de reproducción',
player_youtube_fetching_error: 'Error de descarga de YouTube',
+ player_youtube_no_stream_error: 'No se pudo cargar la transmisión para ',
change_password_current: 'Contraseña actual',
change_password_new: 'Contraseña nueva',
change_password_confirm: 'Repetir contraseña nueva',
@@ -396,6 +399,7 @@ const translations = {
player_item_playing: 'Spiele auf dem Spieler',
player_item_enqueued: 'Zur Play Queue hinzugefügt',
player_youtube_fetching_error: 'Fehler beim Herunterladen von YouTube',
+ player_youtube_no_stream_error: 'Konnte Stream nicht laden für ',
change_password_current: 'Aktuelles Passwort',
change_password_new: 'Neues Passwort',
change_password_confirm: 'Wiederhole neues Passwort',