This commit is contained in:
Bob 2026-05-07 19:58:21 -07:00
parent 01fc6f0687
commit 9d0648b7df
5 changed files with 2 additions and 32 deletions

View file

@ -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

View file

@ -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

View file

@ -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 {

View file

@ -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 {

View file

@ -1,5 +1,3 @@
// TODO(audio): should this file be deleted since there are no transcodes?
package audio
import (