@@ -83,8 +85,8 @@
Control
- (Plays in)
- (Plays At)
+ (Plays In)
+ (Plays At)
|
@@ -99,7 +101,7 @@
${ song.song.artist }$
- Requested by:
+ Requested By:
Marietje
@@ -224,7 +226,7 @@
${ song.artist }$
|
-
+
|
@@ -238,7 +240,7 @@
${ song.duration.secondsToMMSS() }$
|
- |
@@ -365,7 +367,9 @@
const current_song = this.queue[i];
if (i === 0) {
const current_song_remaining_seconds = current_song.song.duration - this.queue[1].time_until_song_seconds;
- infoBar['length_personal_queue'] -= current_song_remaining_seconds;
+ if (current_song.user !== null && current_song.user.id === this.user_data.id) {
+ infoBar['length_personal_queue'] -= current_song_remaining_seconds;
+ }
infoBar['length_total_queue'] -= current_song_remaining_seconds;
}
infoBar['length_total_queue'] += current_song.song.duration;
@@ -373,7 +377,7 @@
infoBar['length_personal_queue'] += current_song.song.duration;
infoBar['end_personal_queue'] = infoBar['length_total_queue'];
if (infoBar['start_personal_queue'] === null) {
- infoBar['start_personal_queue'] = infoBar['length_total_queue'] - current_song.song.duration - this.queue[1].time_until_song_seconds;
+ infoBar['start_personal_queue'] = infoBar['length_total_queue'] - current_song.song.duration;
}
}
}
diff --git a/marietje/songs/templates/songs/upload.html b/marietje/songs/templates/songs/upload.html
index b28f8e7..c2d734e 100644
--- a/marietje/songs/templates/songs/upload.html
+++ b/marietje/songs/templates/songs/upload.html
@@ -179,13 +179,14 @@
}).catch(e => {
console.log(e);
if (e instanceof Response) {
- try {
- e.json().then(data => {
- this.fileObjects[i].error_message = data.errorMessage;
- this.fileObjects[i].success = false;
- });
- } catch {
- this.fileObjects[i].error_message = "An exception occurred while uploading this file, please try again.";
+ // Intercept an HTTP 413 error (entity too large), as this might
+ // be thrown by a (reverse) proxy server and its payload is not
+ // nicely formatted as the code below expects.
+ if (e.status === 413) {
+ this.fileObjects[i].error_message = "The song you tried to upload is too large in size. (HTTP 413 error)";
+ this.fileObjects[i].success = false;
+ } else {
+ this.fileObjects[i].error_message = `${e.statusText} (${e.status})`;
this.fileObjects[i].success = false;
}
} else {