From 84c3b531ad0d03cc9bfc6a4a1f7ee57aa43afbb3 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 22 Apr 2018 11:27:26 +0200 Subject: [PATCH 1/4] Pinned oauthlib2 version to prevent when fetching youtube data --- api/requirements/base.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/api/requirements/base.txt b/api/requirements/base.txt index b66e297a9..ac0586566 100644 --- a/api/requirements/base.txt +++ b/api/requirements/base.txt @@ -33,6 +33,7 @@ musicbrainzngs==0.6 youtube_dl>=2017.12.14 djangorestframework>=3.7,<3.8 djangorestframework-jwt>=1.11,<1.12 +oauth2client<4 google-api-python-client>=1.6,<1.7 arrow>=0.12,<0.13 persisting-theory>=0.2,<0.3 From 3950d0a2c1002d0be5e84e72a3cc1f0e7f5c7f8d Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 22 Apr 2018 11:28:13 +0200 Subject: [PATCH 2/4] Bigger interval when going to next track because of error --- front/src/components/audio/Track.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/front/src/components/audio/Track.vue b/front/src/components/audio/Track.vue index 68dd34459..5b826d2d4 100644 --- a/front/src/components/audio/Track.vue +++ b/front/src/components/audio/Track.vue @@ -73,7 +73,10 @@ export default { }, methods: { errored: function () { - this.$store.dispatch('player/trackErrored') + let self = this + setTimeout( + () => { self.$store.dispatch('player/trackErrored') } + , 1000) }, sourceErrored: function () { this.sourceErrors += 1 From 93c57f08f96f4c9ffcc5e31f9769aaca980c602b Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 22 Apr 2018 12:10:32 +0200 Subject: [PATCH 3/4] Fixed broken youtube-dl import --- api/funkwhale_api/music/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/funkwhale_api/music/tasks.py b/api/funkwhale_api/music/tasks.py index 4b9e15fc9..f2244d785 100644 --- a/api/funkwhale_api/music/tasks.py +++ b/api/funkwhale_api/music/tasks.py @@ -126,7 +126,8 @@ def _do_import(import_job, replace=False, use_acoustid=True): else: # no downloading, we hotlink pass - elif import_job.audio_file: + elif not import_job.audio_file and not import_job.source.startswith('file://'): + # not an implace import, and we have a source, so let's download it track_file.download_file() track_file.save() import_job.status = 'finished' From b602ed38e7dc7f9687e6db260a2d6a87281de684 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 22 Apr 2018 12:10:53 +0200 Subject: [PATCH 4/4] Fix #172: broken login --- changes/changelog.d/172.bugfix | 1 + front/src/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/changelog.d/172.bugfix diff --git a/changes/changelog.d/172.bugfix b/changes/changelog.d/172.bugfix new file mode 100644 index 000000000..1ab68c76d --- /dev/null +++ b/changes/changelog.d/172.bugfix @@ -0,0 +1 @@ +Fixed broken login due to badly configured Axios (#172) diff --git a/front/src/main.js b/front/src/main.js index e7907d536..5481615f2 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -42,7 +42,7 @@ Vue.directive('title', { axios.defaults.baseURL = config.API_URL axios.interceptors.request.use(function (config) { // Do something before request is sent - if (store.state.auth.authenticated) { + if (store.state.auth.token) { config.headers['Authorization'] = store.getters['auth/header'] } return config