fix:(front/back): revert last commit change and pass baseImportMetadata to fileuploadwidget
This commit is contained in:
parent
be11eeee7c
commit
989959f5e3
|
@ -768,10 +768,7 @@ class UploadViewSet(
|
|||
# prevent updating an upload that is already processed
|
||||
qs = qs.filter(import_status="draft")
|
||||
if self.action != "retrieve":
|
||||
qs = qs.filter(
|
||||
Q(library__actor=self.request.user.actor)
|
||||
| Q(library__channel__actor=self.request.user.actor)
|
||||
)
|
||||
qs = qs.filter(library__actor=self.request.user.actor)
|
||||
else:
|
||||
actor = utils.get_actor_from_request(self.request)
|
||||
qs = qs.playable_by(actor)
|
||||
|
|
|
@ -291,6 +291,13 @@ const uploadedFilesById = computed(() => uploadedFiles.value.reduce((acc: Record
|
|||
//
|
||||
// Metadata
|
||||
//
|
||||
|
||||
const baseImportMetadata = computed(() => ({
|
||||
channel: values.channel,
|
||||
import_status: 'draft',
|
||||
import_metadata: { license: values.license, album: values.album }
|
||||
}))
|
||||
|
||||
type Metadata = Pick<Track, 'title' | 'position' | 'tags'> & { cover: string | null, description: string }
|
||||
const uploadImportData = reactive({} as Record<string, Metadata>)
|
||||
const audioMetadata = reactive({} as Record<string, Record<string, string>>)
|
||||
|
@ -419,7 +426,6 @@ const publish = async () => {
|
|||
isLoading.value = true
|
||||
|
||||
errors.value = []
|
||||
|
||||
try {
|
||||
// Post list of uuids of uploadedFiles to axios action:publish
|
||||
|
||||
|
@ -647,6 +653,7 @@ defineExpose({
|
|||
v-model="files"
|
||||
:class="['ui', 'button', 'channels']"
|
||||
:channel="selectedChannel.uuid"
|
||||
:data="baseImportMetadata"
|
||||
@input-file="beforeFileUpload"
|
||||
>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue