Skip to content

Audio Backend#6824

Draft
bob12224 wants to merge 3 commits intostashapp:developfrom
bob12224:audio
Draft

Audio Backend#6824
bob12224 wants to merge 3 commits intostashapp:developfrom
bob12224:audio

Conversation

@bob12224
Copy link
Copy Markdown
Contributor

@bob12224 bob12224 commented Apr 13, 2026

This is a copy-paste setup for the backend to support AUDIO, similar to how Scene's and Images are handled.

The files allow for easy reference for discussion to agree on acceptable MVP.

Please see the docs/dev/AUDIO.md for the SCOPE and as a place for general discussion.

Relates to: #1258

Comment thread docs/dev/AUDIO.md

The `Audio` datatype is similar to `Scene` but stores audio-only media (i.e. Audiobooks, music, ASMR, etc).

## Scope
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Gykes / @WithoutPants : You can see a limited scope here. The database design pkg/sqlite/migrations/86_audio.up.sql shows the extent of the change.

If I get a thumbs up, then I will start work. If you want to increase/reduce scope, or to wait for any other PRs, let me know here

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should nail down where this is planning on going. XXX vs non XXX

I prefer the former as that's what this app is kind of aimed at. If we do XXX then I believe that having Performer and Artist in the audio metadata would be confusing and would conflict. I say we just roll with what we currently have and not add Artists.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am okay will all suggested changes.

Still waiting for some confirmation that the scope will be accepted before investing time into this.

Copy link
Copy Markdown
Collaborator

@Gykes Gykes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to preface this by saying I'm not the main dev and, quite frankly, have limited experience with design implementation so take what I say with a grain of salt. If something sounds dumb or wrong it probably is and feel free to call me on it.

Comment thread docs/dev/AUDIO.md

The `Audio` datatype is similar to `Scene` but stores audio-only media (i.e. Audiobooks, music, ASMR, etc).

## Scope
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should nail down where this is planning on going. XXX vs non XXX

I prefer the former as that's what this app is kind of aimed at. If we do XXX then I believe that having Performer and Artist in the audio metadata would be confusing and would conflict. I say we just roll with what we currently have and not add Artists.

Comment thread docs/dev/AUDIO.md
- duration
- audio codec
- OPTIONAL (can be added now or later)
- channels (mono, stereo, 5.1, 7.1)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would tthis really be needed? Currently scenes have audio and we don't track this at all.

`created_at` datetime not null,
`updated_at` datetime not null,
`code` text,
`artists` text,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we decide to go with performers this would need to be changed.

`updated_at` datetime not null,
`code` text,
`artists` text,
`album` text,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Studio was in the Audio Metadata but album is used here. How and where would we store albums? In the case of audio, studios seem like the best fit.

`title` varchar(255),
`details` text,
`date` date,
`rating` tinyint,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probs better to use rating100 similar to scenes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the migrations for scenes uses rating (ref: pkg/sqlite/migrations/1_initial.up.sql). I can only find rating100 in the graphql, which I do provide in graphql/schema/types/audio.graphql (line 51)

foreign key(`audio_id`) references `audios`(`id`) on delete cascade,
PRIMARY KEY("group_id", `audio_id`)
);
CREATE INDEX `index_movies_audios_on_movie_id` on "groups_audios" ("group_id");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misnamed

@rezreal
Copy link
Copy Markdown

rezreal commented Apr 16, 2026

tbh there is no reason why audios should not just be scenes and why there would be a dedicated section for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants