diff --git a/api/funkwhale_api/music/tasks.py b/api/funkwhale_api/music/tasks.py index 4b9e15fc9e23a5f18bfe4159730f22959514e7cf..f2244d78527c5feff7248b9a40c083ea71498891 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' diff --git a/api/requirements/base.txt b/api/requirements/base.txt index b66e297a9942524b02df71fdcc67c81225e62c1e..ac058656639aa810e334721e75a548c34704e178 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 diff --git a/changes/changelog.d/172.bugfix b/changes/changelog.d/172.bugfix new file mode 100644 index 0000000000000000000000000000000000000000..1ab68c76dc34959e05f319394650670456c8311e --- /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/components/audio/Track.vue b/front/src/components/audio/Track.vue index 68dd34459870f432d7ca5c9e3b35a6d7966b225d..5b826d2d41913236dfd46161b44c91d485d61de0 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 diff --git a/front/src/main.js b/front/src/main.js index e7907d536c96928677af820db547b6c1b2d9b07d..5481615f2006025cea7e009dc9ddd8a49b97623f 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