Fix remote search
This commit is contained in:
parent
37278348fb
commit
778d2fcbd4
|
@ -350,7 +350,7 @@ def fetch(fetch_obj):
|
||||||
return error(
|
return error(
|
||||||
"http",
|
"http",
|
||||||
status_code=e.response.status_code if e.response else None,
|
status_code=e.response.status_code if e.response else None,
|
||||||
message=response.text,
|
message=e.response.text,
|
||||||
)
|
)
|
||||||
except requests.exceptions.Timeout:
|
except requests.exceptions.Timeout:
|
||||||
return error("timeout")
|
return error("timeout")
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Fix remote search (#1857)
|
|
@ -1,11 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { BackendError } from '~/types'
|
import type { BackendError } from '~/types'
|
||||||
|
|
||||||
import axios from 'axios'
|
|
||||||
import { useStore } from '~/store'
|
|
||||||
import { ref, computed, watch, watchEffect } from 'vue'
|
import { ref, computed, watch, watchEffect } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
|
||||||
import { useGettext } from 'vue3-gettext'
|
import { useGettext } from 'vue3-gettext'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
import { useStore } from '~/store'
|
||||||
|
|
||||||
|
import axios from 'axios'
|
||||||
|
|
||||||
|
import updateQueryString from '~/composables/updateQueryString'
|
||||||
|
|
||||||
type Type = 'rss' | 'artists' | 'both'
|
type Type = 'rss' | 'artists' | 'both'
|
||||||
|
|
||||||
|
@ -99,10 +102,10 @@ const submit = () => {
|
||||||
|
|
||||||
const isLoading = ref(false)
|
const isLoading = ref(false)
|
||||||
const createFetch = async () => {
|
const createFetch = async () => {
|
||||||
|
console.log(id.value, props.standalone)
|
||||||
if (!id.value) return
|
if (!id.value) return
|
||||||
if (props.standalone) {
|
if (props.standalone) {
|
||||||
// TODO (wvffle): Check if this needs to be handled
|
history.replaceState(history.state, '', updateQueryString(location.href, 'id', id.value))
|
||||||
return router.replace({ name: 'search', query: { id: id.value } })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.value = undefined
|
obj.value = undefined
|
||||||
|
@ -128,8 +131,7 @@ const store = useStore()
|
||||||
const rssSubscribe = async () => {
|
const rssSubscribe = async () => {
|
||||||
if (!id.value) return
|
if (!id.value) return
|
||||||
if (props.standalone) {
|
if (props.standalone) {
|
||||||
// TODO (wvffle): Check if this needs to be handled
|
history.replaceState(history.state, '', updateQueryString(location.href, 'id', id.value))
|
||||||
return router.replace({ name: 'search', query: { id: id.value, type: 'rss' } })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.value = undefined
|
obj.value = undefined
|
||||||
|
|
Loading…
Reference in New Issue