diff --git a/api/funkwhale_api/music/utils.py b/api/funkwhale_api/music/utils.py index 5031e69ba..571bc4ddd 100644 --- a/api/funkwhale_api/music/utils.py +++ b/api/funkwhale_api/music/utils.py @@ -12,7 +12,7 @@ def guess_mimetype(f): t = magic.from_buffer(f.read(b), mime=True) if not t.startswith("audio/"): # failure, we try guessing by extension - mt, _ = mimetypes.guess_type(f.path) + mt, _ = mimetypes.guess_type(f.name) if mt: t = mt return t diff --git a/api/tests/music/test_utils.py b/api/tests/music/test_utils.py index 87eaddc43..982422c34 100644 --- a/api/tests/music/test_utils.py +++ b/api/tests/music/test_utils.py @@ -36,3 +36,12 @@ def test_get_audio_file_data(name, expected): result = utils.get_audio_file_data(f) assert result == expected + + +def test_guess_mimetype_dont_crash_with_s3(factories, mocker, settings): + """See #857""" + settings.DEFAULT_FILE_STORAGE = "funkwhale_api.common.storage.ASCIIS3Boto3Storage" + mocker.patch("magic.from_buffer", return_value="none") + f = factories["music.Upload"].build(audio_file__filename="test.mp3") + + assert utils.guess_mimetype(f.audio_file) == "audio/mpeg" diff --git a/changes/changelog.d/814.enhancement b/changes/changelog.d/814.enhancement new file mode 100644 index 000000000..c93b1983c --- /dev/null +++ b/changes/changelog.d/814.enhancement @@ -0,0 +1 @@ +Added copy-to-clipboard button with Subsonic password input (#814) diff --git a/changes/changelog.d/833.bugfix b/changes/changelog.d/833.bugfix new file mode 100644 index 000000000..06ce086f5 --- /dev/null +++ b/changes/changelog.d/833.bugfix @@ -0,0 +1 @@ +Fixed broken translation on home and track detail page (#833) diff --git a/changes/changelog.d/855.bugfix b/changes/changelog.d/855.bugfix new file mode 100644 index 000000000..171865ed7 --- /dev/null +++ b/changes/changelog.d/855.bugfix @@ -0,0 +1 @@ +Fixed secondary menus truncated on narrow screens (#855) diff --git a/changes/changelog.d/857.bugfix b/changes/changelog.d/857.bugfix new file mode 100644 index 000000000..5d525e3d9 --- /dev/null +++ b/changes/changelog.d/857.bugfix @@ -0,0 +1 @@ +Fix broken upload for specific files when using S3 storage (#857) diff --git a/front/src/components/Home.vue b/front/src/components/Home.vue index b88369d95..9393d9b78 100644 --- a/front/src/components/Home.vue +++ b/front/src/components/Home.vue @@ -68,12 +68,7 @@
-
- Get quality metadata about your music thanks to MusicBrainz -
+
@@ -147,6 +142,10 @@ export default { return { title: this.$pgettext('Head/Home/Title', "Welcome") } + }, + musicbrainzItem () { + let msg = this.$pgettext('Content/Home/List item/Verb', 'Get quality metadata about your music thanks to MusicBrainz') + return this.$gettextInterpolate(msg, {url: this.musicbrainzUrl}) } } } diff --git a/front/src/components/auth/SubsonicTokenForm.vue b/front/src/components/auth/SubsonicTokenForm.vue index 0184074e2..fdd9f5e10 100644 --- a/front/src/components/auth/SubsonicTokenForm.vue +++ b/front/src/components/auth/SubsonicTokenForm.vue @@ -24,7 +24,12 @@
diff --git a/front/src/components/library/TrackBase.vue b/front/src/components/library/TrackBase.vue index a968f8b0c..4edd00c5d 100644 --- a/front/src/components/library/TrackBase.vue +++ b/front/src/components/library/TrackBase.vue @@ -14,11 +14,7 @@
{{ track.title }} -
-
From album %{ album } by %{ artist }
-
+
@@ -230,6 +226,10 @@ export default { ")" ) }, + subtitle () { + let msg = this.$pgettext('Content/Track/Paragraph', 'From album %{ album } by %{ artist }') + return this.$gettextInterpolate(msg, {album: this.track.album.title, artist: this.track.artist.name, albumUrl: this.albumUrl, artistUrl: this.artistUrl}) + } }, watch: { id() { diff --git a/front/src/style/_main.scss b/front/src/style/_main.scss index bc527415c..4c6c6d61e 100644 --- a/front/src/style/_main.scss +++ b/front/src/style/_main.scss @@ -131,6 +131,7 @@ body { margin-left: 0; margin-right: 0; border: none; + overflow-y: auto; .ui.item { border: none; border-bottom-style: none;