Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 11 additions & 53 deletions api/swagger/swagger-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14387,59 +14387,17 @@ components:
$ref: "#/components/schemas/grant"
genre:
type: string
description: Music genre
enum:
- Electronic
- Rock
- Metal
- Alternative
- Hip-Hop/Rap
- Experimental
- Punk
- Folk
- Pop
- Ambient
- Soundtrack
- World
- Jazz
- Acoustic
- Funk
- R&B/Soul
- Devotional
- Classical
- Reggae
- Podcasts
- Country
- Spoken Word
- Comedy
- Blues
- Kids
- Audiobooks
- Latin
- Lo-Fi
- Hyperpop
- Dancehall
- Techno
- Trap
- House
- Tech House
- Deep House
- Disco
- Electro
- Jungle
- Progressive House
- Hardstyle
- Glitch Hop
- Trance
- Future Bass
- Future House
- Tropical House
- Downtempo
- Drum & Bass
- Dubstep
- Jersey Club
- Vaporwave
- Moombahton
maxLength: 100
description: |
Music genre. Any string up to 100 characters is accepted. Known/canonical
values (shown as autocomplete suggestions in clients): Electronic, Rock,
Metal, Alternative, Hip-Hop/Rap, Experimental, Punk, Folk, Pop, Ambient,
Soundtrack, World, Jazz, Acoustic, Funk, R&B/Soul, Devotional, Classical,
Reggae, Podcasts, Country, Spoken Word, Comedy, Blues, Kids, Audiobooks,
Latin, Lo-Fi, Hyperpop, Dancehall, Techno, Trap, House, Tech House,
Deep House, Disco, Electro, Jungle, Progressive House, Hardstyle,
Glitch Hop, Trance, Future Bass, Future House, Tropical House, Downtempo,
Drum & Bass, Dubstep, Jersey Club, Vaporwave, Moombahton.
albums_response:
required:
- latest_chain_block
Expand Down
4 changes: 2 additions & 2 deletions api/v1_track.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ type DDEXRightsController struct {
type CreateTrackRequest struct {
TrackId *trashid.HashId `json:"track_id,omitempty" validate:"omitempty,min=1"`
Title string `json:"title" validate:"required,min=1"`
Genre string `json:"genre" validate:"required,oneof='Electronic' 'Rock' 'Metal' 'Alternative' 'Hip-Hop/Rap' 'Experimental' 'Punk' 'Folk' 'Pop' 'Ambient' 'Soundtrack' 'World' 'Jazz' 'Acoustic' 'Funk' 'R&B/Soul' 'Devotional' 'Classical' 'Reggae' 'Podcasts' 'Country' 'Spoken Word' 'Comedy' 'Blues' 'Kids' 'Audiobooks' 'Latin' 'Lo-Fi' 'Hyperpop' 'Dancehall' 'Techno' 'Trap' 'House' 'Tech House' 'Deep House' 'Disco' 'Electro' 'Jungle' 'Progressive House' 'Hardstyle' 'Glitch Hop' 'Trance' 'Future Bass' 'Future House' 'Tropical House' 'Downtempo' 'Drum & Bass' 'Dubstep' 'Jersey Club' 'Vaporwave' 'Moombahton'"`
Genre string `json:"genre" validate:"required,min=1,max=100"`
Description *string `json:"description,omitempty" validate:"omitempty,max=1000"`
Mood *string `json:"mood,omitempty" validate:"omitempty,oneof='Peaceful' 'Romantic' 'Sentimental' 'Tender' 'Easygoing' 'Yearning' 'Sophisticated' 'Sensual' 'Cool' 'Gritty' 'Melancholy' 'Serious' 'Brooding' 'Fiery' 'Defiant' 'Aggressive' 'Rowdy' 'Excited' 'Energizing' 'Empowering' 'Stirring' 'Upbeat' 'Other'"`
Tags *string `json:"tags,omitempty"`
Expand Down Expand Up @@ -159,7 +159,7 @@ type CreateTrackRequest struct {
type UpdateTrackRequest struct {
Title *string `json:"title,omitempty" validate:"omitempty,min=1"`
Description *string `json:"description,omitempty" validate:"omitempty,max=1000"`
Genre *string `json:"genre,omitempty" validate:"omitempty,oneof='Electronic' 'Rock' 'Metal' 'Alternative' 'Hip-Hop/Rap' 'Experimental' 'Punk' 'Folk' 'Pop' 'Ambient' 'Soundtrack' 'World' 'Jazz' 'Acoustic' 'Funk' 'R&B/Soul' 'Devotional' 'Classical' 'Reggae' 'Podcasts' 'Country' 'Spoken Word' 'Comedy' 'Blues' 'Kids' 'Audiobooks' 'Latin' 'Lo-Fi' 'Hyperpop' 'Dancehall' 'Techno' 'Trap' 'House' 'Tech House' 'Deep House' 'Disco' 'Electro' 'Jungle' 'Progressive House' 'Hardstyle' 'Glitch Hop' 'Trance' 'Future Bass' 'Future House' 'Tropical House' 'Downtempo' 'Drum & Bass' 'Dubstep' 'Jersey Club' 'Vaporwave' 'Moombahton'"`
Genre *string `json:"genre,omitempty" validate:"omitempty,min=1,max=100"`
Mood *string `json:"mood,omitempty" validate:"omitempty,oneof='Peaceful' 'Romantic' 'Sentimental' 'Tender' 'Easygoing' 'Yearning' 'Sophisticated' 'Sensual' 'Cool' 'Gritty' 'Melancholy' 'Serious' 'Brooding' 'Fiery' 'Defiant' 'Aggressive' 'Rowdy' 'Excited' 'Energizing' 'Empowering' 'Stirring' 'Upbeat' 'Other'"`
Tags *string `json:"tags,omitempty"`
License *string `json:"license,omitempty"`
Expand Down
9 changes: 9 additions & 0 deletions indexer/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,12 @@ const (
Entity_DeveloperApp = "DeveloperApp"
Entity_Event = "Event"
)

// Track field constraints applied at EM-event indexing time. Track genres are
// arbitrary user-supplied strings (not an enum); enforce only a length cap.
// Mirrors discovery-provider's `CHARACTER_LIMIT_GENRE` so that when the Go
// indexer takes over track-entity event consumption from the Python
// discovery-provider, the rule stays consistent.
const (
MaxTrackGenreLength = 100
)
Loading