readme.md: update readme for addTrackInfo

This commit is contained in:
Jon 2023-01-08 01:25:11 +00:00
parent 4d4e351106
commit 69488a2ccd

View File

@ -8,8 +8,8 @@ the media that is most similar to what you wish to add.
## Best Practices ## Best Practices
- Use an alpha-numeric id. Don't use dashes or hyphens; Uppercase characters *may* be used when appropriate. - Use an alpha-numeric id. Don't use dashes or hyphens; Uppercase characters *may* be used when appropriate.
- Declare metadata when available. If you do not know the original source, try to find it first. - Declare attribution info (track info) when available. If you do not know the original source, try to find it first.
- Metadata **must** be accurate and not an artists rendition of the actual metadata. - Attribution info **must** be accurate and not an artists rendition.
- Items that aren't primarily music should be tagged with `misc`. - Items that aren't primarily music should be tagged with `misc`.
- Use the `metadata-prefer-id` tag if the actual title would be too long, cubersome, or unrelated. i.e: - Use the `metadata-prefer-id` tag if the actual title would be too long, cubersome, or unrelated. i.e:
- `slamtris`: Slamtris - Quad City DJs vs Hirokazu Tanaka *(cumbersome)* - `slamtris`: Slamtris - Quad City DJs vs Hirokazu Tanaka *(cumbersome)*
@ -42,6 +42,19 @@ the media that is most similar to what you wish to add.
- Avoid using `EDisplayType.LANDSCAPE` when possible. - Avoid using `EDisplayType.LANDSCAPE` when possible.
- `EDisplayType.SQUARE` previews **must** be exactly `1:1`; `EDisplayType.LANDSCAPE` previews *should* be exactly `16:9`, or **must** be a close equivalent - `EDisplayType.SQUARE` previews **must** be exactly `1:1`; `EDisplayType.LANDSCAPE` previews *should* be exactly `16:9`, or **must** be a close equivalent
### `addTrackInfo`
`setMetadata` will be deprecated in favor of `addTrackInfo` to allow additional attribution information to be stored.
`addTrackInfo` is more verbose than `setMetadata`. Check the JSDoc blocks for `RadioMetadata.new`
`RadioMetadata` methods beginning with `b` are auto-generated from `BMetadataType`.
Avoid being *too autistic* with additional info, just note the main stuff. You don't have to add the Randy Marsh saying nigger clip
because it's used a single time in a ytpmv.
Support for raw `href` values will remain, however an appropriate `createURI` function should be used instead.
## Format ## Format
The `songs.json` format **is only intended for use for Glowers Radio**, and is effectively a living standard as a result. **Live data may change drastically without warning** The `songs.json` format **is only intended for use for Glowers Radio**, and is effectively a living standard as a result. **Live data may change drastically without warning**
@ -111,9 +124,8 @@ properties:
title: { type: string } title: { type: string }
artist: { type: string } artist: { type: string }
href: href:
description: 'A URL the original source can be found, if known. Link may be dead' $ref: "#/$defs/GWRadioURI"
type: string description: 'A URI where the original source can be found, if known. Link may be dead'
format: url
_nigid: _nigid:
$seeAlso: '#/properties/songs/items/properties/tags/items/1' $seeAlso: '#/properties/songs/items/properties/tags/items/1'
description: 'The original song id from nigge.rs.' description: 'The original song id from nigge.rs.'
@ -146,3 +158,4 @@ properties:
size: { type: string } size: { type: string }
``` ```