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