readme.md: simplify

This commit is contained in:
Jon 2023-02-05 14:14:14 +00:00
parent 67eea5900c
commit 674e763168

193
readme.md
View File

@ -1,161 +1,50 @@
# glowers-radio
This repo contains backing information for Glowers Radio.
## Contributing
If you have a song in mind that would fit on Glowers Radio, you are free to create a PR or send in a diff for `generate.js`.
The living schema is documented [below](#format) and mostly maps 1:1 to `MediaItem`, you should also check the `MediaItem` for the
the media that is most similar to what you wish to add.
## Best Practices
- Use an alpha-numeric id. Don't use dashes or hyphens; Uppercase characters *may* be used when appropriate.
- Declare attribution info (track info) when available. If you do not know the original source, try to find it first.
- Attribution info **must** be accurate and not an artists rendition.
- 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:
- `slamtris`: Slamtris - Quad City DJs vs Hirokazu Tanaka *(cumbersome)*
- `dngyamom`: Dynamite by BTS but it's Doin' Your Mom *(cumbersome)*
- `thisistheinfowar`: In the House, In a Heartbeat *(unrelated)*
- `alexjones`: Alex Jones Remix: Renai Circulation *(cumbersome)*
- `ywnbaw`: Professor proves SICKS are the best weapons *(unrelated)*
- `whenblackissus`: Among Us theme song but it's in the style of Metallica's Black Album *(long and cumbersome)*
- `niggatorial`: I'm The 2007 YouTube Tutorial *(cumbersome)*
- `honorary`: Erika *(unrelated)*
- Use an alpha-numeric id. Don't use dashes or hyphens
- Add proper song metadata when appropriate. Attribution data should be added when possible
- Keep all media assets under 10MB, a single item's assets should not be over 15MB.
- Add codec information for your sources.
- Mimic other items if you're unsure about something.
<br/>
## Examples
- Use `image/png`, `image/jpg`, `image/gif`, `audio/mp3`, and `video/mp4`. Files *should* be under 10MB and be of reasonable or tolerable quality
- Try not to use reuploads, remasters, or edits, as the source; Unless the edit or remaster is the actual media.
- Don't use videos where audio alongside artwork would be functionally identical. Lyrics videos are ok
- Sources *should* contain codec information; if you are unsure of what correct codecs to declare, do not declare any or ask for help.
No codec declarations are better than incorrect codec declarations. See [MDN](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/codecs_parameter#basic_syntax) for details
- All content *should* be hosted on Glowers Club. If you do not Glow, then your sources will be reuploaded if your Item(s) are accepted
<br/>
- `video/` **must** have a thumbnail preview.
- `video/` *should* have a `EDisplayType.SQUARE` fallback for audioOnly, and for when the agent does not support the provided `video/`.
- Animated previews **must** always have a `image/gif` fallback.
- 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
### `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
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**
If you do wish to use this data for your own purposes, i.e: to make a custom player, you should be caching the songs list so your application has something to fallback to if a breaking change to the format is made.
```yaml
required: [ version, songs ]
$defs:
GWRadioURI:
type: uri
description: 'A URI that points to the source file. See `GWMediaPlayer.fromURIToAbsolute()` for how to convert to a URL'
MediaCodecs:
type: array
description: 'An array of codecs contained within the source file. Items should follow RFC6381'
items:
- type: string
properties:
version: { type: integer }
songs:
items:
required: [ id, sources ]
properties:
id:
type: string
tags:
description: 'A list of tags used for filtering.'
type: array
items:
- const: sus
description: >-
Media information will render in the Among Us Font.
In imposter mode, only songs tagged with sus will be in shuffle
- const: niggers
description: >-
Media that was originally available through the now-defunct nigge.rs online radio.
Tagged items may contain the original _nigid and/or _nigkey as metadata
$seeAlso:
- '#/properties/songs/items/properties/metadata/properties/_nigid'
- '#/properties/songs/items/properties/metadata/properties/_nigkey'
- const: splash-song
description: 'Media that can play on the Glowers Club splash page.'
- const: misc
description: 'Media that does not significantly contain music.'
- const: moonman
description: 'Moonman songs'
- const: metadata-prefer-id
description: >-
Use the Media id instead of the metadata title for MediaSession.
Primarily for media where the source title does not match the assigned id
- regex: '^radio\-media\-style\-[a-z\-]+'
description: >-
Used to add or remove styling for particular Media, such as to remove the
Album Art box or disable background blur.
- type: string
description: 'Tags may also be arbitrary'
metadata:
required: [ title, artist ]
properties:
title: { type: string }
artist: { type: string }
href:
$ref: "#/$defs/GWRadioURI"
description: 'A URI where the original source can be found, if known. Link may be dead'
_nigid:
$seeAlso: '#/properties/songs/items/properties/tags/items/1'
description: 'The original song id from nigge.rs.'
type: string
_nigkey:
$seeAlso: '#/properties/songs/items/properties/tags/items/1'
description: 'Content of _id from the original nigge.rs song entry.'
type: string
sources:
type: array
items:
- required: [ type, url ]
properties:
type: { type: string, format: mimetype }
codecs: { "$ref": "#/$defs/MediaCodecs" }
uri: { "$ref": "#/$defs/GWRadioURI" }
previews:
description: >-
This is an array so GWMediaPlayer can better display videos being played as audio only.
The first Item is how the MediaItem *should* be displayed, other Items are alternative versions the player may use.
type: array
items:
- properties:
display_type:
description: 'Used to determine how the media should be displayed. See GWMediaPlayer.EDisplayType'
type: string
type: { type: string, format: mimetype }
codecs: { "$ref": "#/$defs/MediaCodecs" }
uri: { "$ref": "#/$defs/GWRadioURI" }
size: { type: string }
```js
RadioItem.new("hummerguy")
.addItemInfo(RadioMetadata.newLAV("hummer guy ytpmv", "gud boi", RadioMetadata.createYouTubeURI("A2Fd4NHreI0")).bOfficial())
.addItemInfo(RadioMetadata.newLA("Skrillex - Scary Monsters and Nice Sprites (Sihk Happy Hardcore Remix)", "SIHK", RadioMetadata.createYouTubeURI("Z01Tsgwe2dQ")).setFor(0).bOriginal().bOfficial())
.addItemInfo(RadioMetadata.newLA(null, null, RadioMetadata.createSoundcloudURI("skrillex-scary-monsters-nice-sprites-sihk-happy-hardcore-remix-free-dl", "sihk66")).setFor(0).bOriginal().bOfficial().bAlt())
.addSource(RadioSource.new("video/mp4", [ "avc1.4D4029", "mp4a.40.2" ])
.setURI("mxc://glowers.club/jnmPzoUhxCTrvRZmpxmGXYMr")
.addPreview("mxc://glowers.club/AmkQLtUuuCixPKNzkugAkiHh", "image/jpg", "800x449"))
.addSource(RadioSource.new("audio/mp3", [ "mp3" ])
.setURI("mxc://glowers.club/wtsFmPEzerDPdzOSQraBzupN")
.addPreview("mxc://glowers.club/UPPtHMbKXrEaeHLDYovVkZRt", "image/jpg", "440x440")),
```
```js
RadioItem.new("kramer")
.setMiscInfo(RadioMiscInfo.new().bExplicit().bMetadataPreferId())
.addItemInfo(RadioMetadata.newLAV("wholesome ytpmv 3", "KrazedDonut", RadioMetadata.createYouTubeURI("LVdJ6cqqiUA")).bOfficial().bUnavailable().bExplicit())
.addItemInfo(RadioMetadata.newLA("Spin ye Bottle (Minigame)", "Jake Kaufman", RadioMetadata.createBandcampURI("spin-ye-bottle-minigame", "virt")).setFor(0).bOriginal().bOfficial())
.addItemInfo(RadioMetadata.newLA(null, null, RadioMetadata.createAppleMusicURI(1170509291)).setFor(0).bOriginal().bOfficial().bAlt())
.addSource(RadioSource.new("video/mp4", [ "avc1.4D4029", "mp4a.40.2" ])
.setURI("mxc://glowers.club/FztaIVnDJeHkYQfZmdHFOdnP")
.addPreview("mxc://glowers.club/FKCKRytGQEFRJUxTfeKjXmXz", "image/jpg", "800x450"))
.addSource(RadioSource.new("audio/mp3", [ "mp3" ])
.setURI("mxc://glowers.club/hqRzxaQMWfQoZGpiPIbyNSEk")
.addPreview("mxc://glowers.club/JurRLPteOyFLrfJoRJuzbZkH", "image/jpg", "500x500")),
```
```js
RadioItem.new("blsdm")
.setMiscInfo(RadioMiscInfo.new().bExplicit())
.addItemInfo(RadioMetadata.newLA("Black Lives (Still Don't) Matter", "Moonman").bExplicit().bPseudonym())
.addSource(RadioSource.new("audio/mp3", [ "mp3" ])
.setURI("mxc://glowers.club/GfcCntGLSZsYkkzzkaoJrUWx")
.addPreview("mxc://glowers.club/yyWJVkClXhWIFqgayFFtZZDJ", "image/jpg", "500x500")),
```
## Integrations
See [data/schema.yaml] for JSONSchema documentation. You may also want to inspect the code within [lib/]