Conversation
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"
}
```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assumes an API:
GET /api/edit/:trackId- get a list of which source variants existGET /api/edit/:trackId/tags- get a list of the exact tags in the .txt file (tracks.jsondoesn't map 1:1 with the .txt file because some tags are added (eg we dynamically add anaspect_ratiotag based on the source media) and some are removed (eg moderator notes))POST /api/edit/:trackId/tags- takes the same tags dictionary as above as input, writes it to a .txt file, with anupdated:YYYY-MM-DDtag addedGET /api/edit/:trackId/subs/:variant- get subtitle data in JSON-sub formatPOST /api/edit/:trackId/subs/:variant- accepts subtitle data in JSON-sub format and writes .srt to diskPOST /api/edit/:trackId/rename_subs- renames a subtitle variant