mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
PR fixes
This commit is contained in:
parent
01fc6f0687
commit
9d0648b7df
5 changed files with 2 additions and 32 deletions
|
|
@ -57,7 +57,7 @@ The `Audio` datatype is similar to `Scene` but stores audio-only media (i.e. Aud
|
|||
- [x] FFProbe for Audio Files
|
||||
- [x] Graphql to return Audios (queries)
|
||||
- [x] Graphql to update Audios (mutations)
|
||||
- [ ] Update test files
|
||||
- [x] Update test files
|
||||
|
||||
|
||||
## Notes
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ type Audio {
|
|||
title: String
|
||||
code: String
|
||||
details: String
|
||||
url: String @deprecated(reason: "Use urls")
|
||||
urls: [String!]!
|
||||
date: String
|
||||
# rating expressed as 1-100
|
||||
|
|
@ -67,7 +66,6 @@ input AudioCreateInput {
|
|||
title: String
|
||||
code: String
|
||||
details: String
|
||||
url: String @deprecated(reason: "Use urls")
|
||||
urls: [String!]
|
||||
date: String
|
||||
# rating expressed as 1-100
|
||||
|
|
@ -94,13 +92,10 @@ input AudioUpdateInput {
|
|||
title: String
|
||||
code: String
|
||||
details: String
|
||||
url: String @deprecated(reason: "Use urls")
|
||||
urls: [String!]
|
||||
date: String
|
||||
# rating expressed as 1-100
|
||||
rating100: Int
|
||||
o_counter: Int
|
||||
@deprecated(reason: "Unsupported - Use audioIncrementO/audioDecrementO")
|
||||
organized: Boolean
|
||||
studio_id: ID
|
||||
performer_ids: [ID!]
|
||||
|
|
@ -111,11 +106,6 @@ input AudioUpdateInput {
|
|||
resume_time: Float
|
||||
"The total time a audio has spent playing"
|
||||
play_duration: Float
|
||||
"The number ot times a audio has been played"
|
||||
play_count: Int
|
||||
@deprecated(
|
||||
reason: "Unsupported - Use audioIncrementPlayCount/audioDecrementPlayCount"
|
||||
)
|
||||
|
||||
primary_file_id: ID
|
||||
|
||||
|
|
@ -128,7 +118,6 @@ input BulkAudioUpdateInput {
|
|||
title: String
|
||||
code: String
|
||||
details: String
|
||||
url: String @deprecated(reason: "Use urls")
|
||||
urls: BulkUpdateStrings
|
||||
date: String
|
||||
# rating expressed as 1-100
|
||||
|
|
|
|||
|
|
@ -219,23 +219,6 @@ func (r *audioResolver) AudioStreams(ctx context.Context, obj *models.Audio) ([]
|
|||
return manager.GetAudioStreamPaths(obj, builder.GetStreamURL(apiKey), config.GetMaxStreamingTranscodeSize())
|
||||
}
|
||||
|
||||
func (r *audioResolver) URL(ctx context.Context, obj *models.Audio) (*string, error) {
|
||||
if !obj.URLs.Loaded() {
|
||||
if err := r.withReadTxn(ctx, func(ctx context.Context) error {
|
||||
return obj.LoadURLs(ctx, r.repository.Audio)
|
||||
}); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
urls := obj.URLs.List()
|
||||
if len(urls) == 0 {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
return &urls[0], nil
|
||||
}
|
||||
|
||||
func (r *audioResolver) Urls(ctx context.Context, obj *models.Audio) ([]string, error) {
|
||||
if !obj.URLs.Loaded() {
|
||||
if err := r.withReadTxn(ctx, func(ctx context.Context) error {
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ func (r *mutationResolver) BulkAudioUpdate(ctx context.Context, input BulkAudioU
|
|||
return nil, fmt.Errorf("converting studio id: %w", err)
|
||||
}
|
||||
|
||||
updatedAudio.URLs = translator.optionalURLsBulk(input.Urls, input.URL)
|
||||
updatedAudio.URLs = translator.optionalURLsBulk(input.Urls, nil)
|
||||
|
||||
updatedAudio.PerformerIDs, err = translator.updateIdsBulk(input.PerformerIds, "performer_ids")
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
// TODO(audio): should this file be deleted since there are no transcodes?
|
||||
|
||||
package audio
|
||||
|
||||
import (
|
||||
|
|
|
|||
Loading…
Reference in a new issue