Skip to content

[wip][br3] edit screen - #451

Draft
shish wants to merge 1 commit into
masterfrom
pr451
Draft

[wip][br3] edit screen#451
shish wants to merge 1 commit into
masterfrom
pr451

Conversation

@shish

@shish shish commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Assumes an API:

  • GET /api/edit/:trackId - get a list of which source variants exist
{
    "subtitles": ["Default"],
	"media": {
		"Vocal": ["mp4"],
		"Instrumental": ["webp", "ogg"]
	},
}
  • GET /api/edit/:trackId/tags - get a list of the exact tags in the .txt file (tracks.json doesn't map 1:1 with the .txt file because some tags are added (eg we dynamically add an aspect_ratio tag based on the source media) and some are removed (eg moderator notes))
{
	"title": ["My Track"],
	"from": ["TV Show"],
	"artist": ["Alice", "Bob"]
}
  • POST /api/edit/:trackId/tags - takes the same tags dictionary as above as input, writes it to a .txt file, with an updated:YYYY-MM-DD tag added
  • GET /api/edit/:trackId/subs/:variant - get subtitle data in JSON-sub format
[
	{
		start: 123.4,
		end: 567.8,
		top: false,
		text: "The first line of the song"
	},
	...
]
  • POST /api/edit/:trackId/subs/:variant - accepts subtitle data in JSON-sub format and writes .srt to disk
  • POST /api/edit/:trackId/rename_subs - renames a subtitle variant
{
	"from": "Default",
	"to": "Romaji"
}

Assumes an API:

* `GET /api/edit/:trackId` - get a list of which source variants exist
```
{
    "subtitles": ["Default"],
	"media": {
		"Vocal": ["mp4"],
		"Instrumental": ["webp", "ogg"]
	},
}
```
* `GET /api/edit/:trackId/tags` - get a list of the exact tags in the .txt file (`tracks.json` doesn't map 1:1 with the .txt file because some tags are added (eg we dynamically add an `aspect_ratio` tag based on the source media) and some are removed (eg moderator notes))
```
{
	"title": ["My Track"],
	"from": ["TV Show"],
	"artist": ["Alice", "Bob"]
}
```
* `POST /api/edit/:trackId/tags` - takes the same tags dictionary as above as input, writes it to a .txt file, with an `updated:YYYY-MM-DD` tag added
* `GET /api/edit/:trackId/subs/:variant` - get subtitle data in JSON-sub format
```
[
	{
		start: 123.4,
		end: 567.8,
		top: false,
		text: "The first line of the song"
	},
	...
]
```
* `POST /api/edit/:trackId/subs/:variant` - accepts subtitle data in JSON-sub format and writes .srt to disk
* `POST /api/edit/:trackId/rename_subs` - renames a subtitle variant
```
{
	"from": "Default",
	"to": "Romaji"
}
```
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.

1 participant