Compare commits

..

No commits in common. "e2656d4152ef9a24068009e6ced05feb550e8cd1" and "96e87eeb5e4afb45431030e9485d296a883193a7" have entirely different histories.

25 changed files with 43 additions and 6468 deletions

View file

@ -1,3 +0,0 @@
{
"recommendations": ["redhat.vscode-yaml"]
}

View file

@ -14,7 +14,6 @@ import model
GENRE_FILE = "everynoise_genres.json"
METADATA_DIR = Path("../metadata")
TRANSLATION_FILE = Path("../translations/mul.json")
def genre_letter(id: str) -> str:
@ -53,9 +52,6 @@ def genres_to_meta():
stored_genres = model.load_genre_dict(data)
print(f"{lt}: {len(stored_genres)} stored")
# Iterate through all stored genres of that letter,
# update them using scraped data and marking them deprecated
# if they are not presnt in the scraped data
for sg_id, sg in stored_genres.items():
if sg_id in lt_genres:
genre = lt_genres[sg_id]
@ -63,7 +59,7 @@ def genres_to_meta():
sg.playlist_id = genre.playlist_id
sg.popularity = genre.popularity
del lt_genres[sg_id]
elif not sg.metagenre:
else:
sg.deprecated = True
# Genres not already stored in metadata files
@ -172,22 +168,14 @@ def validate():
print(f"INFO: {genre_id} undescribed")
if unknown_refs:
print("Unknown refs:", sorted(list(unknown_refs)))
print(sorted(list(unknown_refs)))
if n_err > 0:
raise Exception(f"Validation returned {n_err} errors")
def make_translations():
metadata = read_meta()
translations = {genre_id: genre.name for genre_id, genre in metadata.items()}
with open(TRANSLATION_FILE, "w") as f:
json.dump(translations, f, ensure_ascii=False, sort_keys=True, indent=2)
if __name__ == "__main__":
load_dotenv()
# migrate_meta()
# genres_to_meta()
genres_to_meta()
# validate()
make_translations()

View file

@ -36,7 +36,6 @@ class GenreMetadata:
playlist_id: Optional[str] = None
alias: Optional[str] = None
deprecated: Optional[bool] = None
metagenre: Optional[bool] = None
def load_genre_dict(d: dict) -> Dict[str, GenreMetadata]:

View file

@ -1,100 +0,0 @@
# This file contains all metagenres
# Metagenres are extra genres used to group Spotify genres together for better organization
buddhist:
name: Buddhist
description:
Buddhist music is music created for or inspired by Buddhism and part of Buddhist
art.
parent: religious
wikipedia_url: https://en.wikipedia.org/wiki/Buddhist_music
metagenre: true
christmas:
name: Christmas
description: Music associated with Christmas
parent: event
wikipedia_url: https://en.wikipedia.org/wiki/Christmas_music
metagenre: true
dance:
name: Dance
description:
Dance music is music composed specifically to facilitate or accompany dancing.
wikipedia_url: https://en.wikipedia.org/wiki/Dance_music
metagenre: true
event:
name: Social events
description: Music for social events (Parties, Christmas, etc.)
metagenre: true
hinduist:
name: Hinduist
description: Music associated with Hinduism
parent: religious
metagenre: true
indigenous:
name: Indigenous
description:
Indigenous music is a term for the traditional music of the indigenous peoples of
the world.
parent: folk
wikipedia_url: https://en.wikipedia.org/wiki/Indigenous_music
metagenre: true
instrument:
name: Instruments
description: Music using specific instruments
wikipedia_url: https://en.wikipedia.org/wiki/Musical_instrument
metagenre: true
instrumental:
name: Instrumental
description: Music without vocals
wikipedia_url: https://en.wikipedia.org/wiki/Instrumental
metagenre: true
islamic:
name: Islamic
description:
Islamic music may refer to religious music, as performed in Islamic public services
or private devotions, or more generally to musical traditions of the Muslim world.
parent: religious
wikipedia_url: https://en.wikipedia.org/wiki/Islamic_music
metagenre: true
jewish:
name: Jewish
description:
Jewish music is the music and melodies of the Jewish people. There exist both
traditions of religious music, as sung at the synagogue and domestic prayers, and of
secular music, such as klezmer
parent: religious
wikipedia_url: https://en.wikipedia.org/wiki/Jewish_music
metagenre: true
musical:
name: Musical theatre
description:
Musical theatre is a form of theatrical performance that combines songs, spoken
dialogue, acting and dance.
wikipedia_url: https://en.wikipedia.org/wiki/Musical_theatre
metagenre: true
non-music:
name: Non-music
description:
Audio that is not considered music. Examples include ambient noises, podcasts,
audiobooks, etc.
metagenre: true
percussion:
name: Percussion
description: Music featuring percussion instruments
parent: instrument
wikipedia_url: https://en.wikipedia.org/wiki/Percussion_instrument
metagenre: true
religious:
name: Religious music
description: Music associated with religious service and rituals
wikipedia_url: https://en.wikipedia.org/wiki/Religious_music
metagenre: true
sikhist:
name: Sikhist
description: Music associated with sikhism
parent: religious
metagenre: true
vocal:
name: Vocal
description: Music in which singing is the main focus
wikipedia_url: https://en.wikipedia.org/wiki/Vocal_music
metagenre: true

View file

@ -1238,7 +1238,7 @@ alternative americana:
modern rock and alternative influences. It often features acoustic instruments like
banjos and fiddles and focuses on storytelling through lyrics. The sound is raw and
authentic, with a DIY attitude that emphasizes the DIY spirit of Americana.
parent: roots americana
parent: americana
popularity: 1406
playlist_id: 3C2FLsEbuhOQ2lUDdc7IyF
alternative ccm:
@ -3080,7 +3080,7 @@ austin americana:
elements of rock, blues, and country. It is characterized by acoustic instruments
such as guitars, banjos, and fiddles, as well as lyrics that often tell stories of
the American South and its people.
parent: roots americana
parent: americana
popularity: 2084
playlist_id: 4m33gxxb6nOSVYMzB0Rm94
austin hip hop:
@ -3189,7 +3189,7 @@ australian americana:
and banjos, and is characterized by its storytelling lyrics and simple melodies.
Artists such as Kasey Chambers, The Waifs, and Paul Kelly are some of the most
well-known Australian Americana musicians.
parent: roots americana
parent: americana
country: AU
localized_name: true
popularity: 1942

View file

@ -2412,7 +2412,7 @@ black americana:
gospel, and jazz, with folk and country music. It often tells stories of the black
experience in America, touching on themes of struggle, resilience, and cultural
identity.
parent: roots americana
parent: americana
country: US
wikipedia_url: https://en.wikipedia.org/wiki/African-American_music
popularity: 694

View file

@ -252,7 +252,7 @@ canadian americana:
acoustic instruments like the guitar, banjo, and fiddle, and focuses on storytelling
through lyrics. Canadian Americana artists often draw inspiration from their
country's landscapes, history, and cultural diversity.
parent: roots americana
parent: americana
country: CA
localized_name: true
popularity: 1309
@ -1393,7 +1393,7 @@ carnaval:
characterized by lively rhythms, colorful costumes, and parades. The music is often
played by brass bands and percussion ensembles. The lyrics are usually playful and
celebrate the joy of life.
parent: event
parent: party
language: nld
country: NL
localized_name: true
@ -1407,7 +1407,7 @@ carnaval cadiz:
celebrities, and current events. The music is often played by guitarists and
percussionists, and the lyrics are sung in a distinctive Andalusian accent. The
Carnaval Cadiz is a beloved tradition that has been celebrated for centuries.
parent: event
parent: party
language: spa
country: ES
localized_name: true
@ -2014,7 +2014,7 @@ chanson paillarde:
is often associated with drin"king songs and is popular in bars and taverns. The
songs are typically sung in a lively and upbeat style, with a focus on wordplay and
double entendres.
parent: event
parent: party
language: fra
localized_name: true
popularity: 2210
@ -3097,7 +3097,7 @@ chinese new year:
bring good luck and happiness to those who listen. The music often includes
traditional instruments such as the guzheng, yangqin, and suona, and is accompanied
by lion dances and firecrackers.
parent: event
parent: party
language: zho
country: CN
localized_name: true
@ -3803,7 +3803,7 @@ circus:
often features a fast tempo and upbeat rhythms that are meant to evoke the
excitement and energy of the circus atmosphere. It is often used in films,
commercials, and other media to add a sense of fun and whimsy to the proceedings.
parent: event
parent: party
localized_name: true
wikipedia_url: https://en.wikipedia.org/wiki/Circus_music
popularity: 4435
@ -6242,8 +6242,6 @@ corridos alternativos:
playlist_id: 7tt8E0lrPF9IoZ1gxM9Bn1
corridos belicos:
name: Corridos Bélicos
description:
Corridos Bélicos is a traditional Mexican music genre and a subgenre of Corido.
parent: corrido
localized_name: true
popularity: 1676
@ -6314,7 +6312,7 @@ cosmic american:
A blend of country, rock and folk music that originated in the United States during
the 1970s. The genre is characterized by its cosmic and spiritual themes, as well as
its emphasis on storytelling and poetic lyrics.
parent: roots americana
parent: americana
popularity: 1305
playlist_id: 05y5YX2kQFi6J8B5ece5qy
cosmic black metal:

View file

@ -3338,7 +3338,7 @@ drikkelek:
drink. The music associated with this genre is often upbeat and lively, with catchy
melodies and lyrics that encourage audience participation. Drikkelek is a fun and
festive genre that is perfect for parties and social gatherings.
parent: event
parent: party
language: nor
country: "NO"
popularity: 4872
@ -3836,7 +3836,7 @@ dutch americana:
and the natural world. Dutch Americana artists often incorporate elements of Dutch
culture and language into their music, resulting in a distinctive sound that is both
nostalgic and modern.
parent: roots americana
parent: americana
country: NL
localized_name: true
popularity: 2528

View file

@ -1021,7 +1021,7 @@ epa dunk:
lyrics often focus on themes like alcohol, sex and driving A-tractors (a car
modified to have a low maximum speed that can be driven from 15 years of age and
which is often associated with rural Sweden).
parent: event
parent: party
wikipedia_url: https://en.wikipedia.org/wiki/Epadunk
popularity: 2287
playlist_id: 6kQjCM6fYGrb5hz9Cx93nd

View file

@ -84,7 +84,7 @@ fan chant:
sporting events. It is characterized by its simple and repetitive lyrics, as well as
its upbeat and energetic tempo. This genre is perfect for those who love to cheer on
their favorite sports teams and want to be a part of the action.
parent: event
parent: party
localized_name: true
popularity: 3630
playlist_id: 1vop8KpVahupGKRDvAWDrr
@ -1628,7 +1628,7 @@ football:
perseverance, and victory. It's commonly associated with stadium chants and
sing-alongs, and is popular among football fans around the world. The genre has also
been used in advertising campaigns and as theme songs for major football events.
parent: event
parent: party
localized_name: true
popularity: 2926
playlist_id: 3kNWVqxt0cR2phbffWW78v
@ -2515,7 +2515,7 @@ frevo:
It is characterized by its energetic rhythms and brass instruments, often played
during carnival celebrations. The music is heavily influenced by African and
European styles, creating a unique sound that is both vibrant and complex.
parent: event
parent: party
wikipedia_url: https://en.wikipedia.org/wiki/Frevo
popularity: 6044
playlist_id: 1Qc7lRgdYegu5Cjz1XAX5x

View file

@ -2087,7 +2087,7 @@ gothic americana:
music. It is characterized by its dark, brooding sound, which often features
acoustic guitars, fiddle, and haunting vocals. Bands such as 16 Horsepower,
Wovenhand, and The Handsome Family are considered pioneers of the genre.
parent: roots americana
parent: americana
popularity: 3107
playlist_id: 3s8q8jIapmc1VcZoG9HztR
gothic black metal:
@ -2908,7 +2908,7 @@ guggenmusik:
during festivals and parades, and the music is known for its lively and energetic
sound. Guggenmusik is a popular genre in Switzerland and has also gained a following
in other countries.
parent: event
parent: party
language: deu
region: DH
popularity: 5840

View file

@ -96,7 +96,7 @@ halloween:
anthems. Halloween music is often used to create a sense of tension and suspense in
horror movies and haunted houses. Some classic Halloween songs include "Monster
Mash" by Bobby Pickett and "Thriller" by Michael Jackson.
parent: event
parent: party
popularity: 2265
playlist_id: 3c4jETt4Inrxg7nN4bWehP
hamburg electronic:

View file

@ -2794,7 +2794,7 @@ irish pub song:
The songs often tell stories of love, loss, and friendship, and are typically
accompanied by instruments such as the guitar, fiddle, and accordion. The lively and
communal nature of pub singing has made this genre a beloved part of Irish culture.
parent: event
parent: party
country: IE
localized_name: true
popularity: 2889

View file

@ -335,7 +335,7 @@ karaoke:
worldwide as a social activity in bars, clubs, and private parties. Karaoke allows
people to showcase their singing abilities and have fun with friends while singing
their favorite songs. It is often accompanied by drinks and laughter.
parent: event
parent: party
localized_name: true
wikipedia_url: https://en.wikipedia.org/wiki/Karaoke
popularity: 3769
@ -790,7 +790,7 @@ kermis:
accordion, trumpet, and drums. The music is upbeat and energetic, with a focus on
dance rhythms and catchy melodies. Kermis music is enjoyed by all ages and is a
staple of Dutch cultural events.
parent: event
parent: party
language: nld
country: NL
localized_name: true

View file

@ -1888,7 +1888,7 @@ memphis americana:
Known for its soulful vocals, twangy guitars, and storytelling lyrics, Memphis
Americana draws inspiration from the city's rich musical history and cultural
diversity.
parent: roots americana
parent: americana
country: US
popularity: 3838
playlist_id: 37qBQkNmniKSzKQSaF1gOw
@ -2924,7 +2924,7 @@ midwest americana:
folk, country, and rock music. This genre is characterized by its use of acoustic
instruments such as the banjo, mandolin, and fiddle, as well as its lyrics that
often tell stories of small-town life, love, and loss.
parent: roots americana
parent: americana
country: US
popularity: 3028
playlist_id: 35vbrIRrC2Yt071E4HL8Y4
@ -3600,7 +3600,6 @@ modern indie pop:
playlist_id: 0FkLYgMF09lmzytexAraKv
modern j-rock:
name: Modern J-Rock
description: Modern J-Rock is a modern interpretation of Japanese Rock
parent: j-rock
popularity: 1016
playlist_id: 3EBtIGORBSFLiY8Ga7QmZB

View file

@ -161,7 +161,7 @@ nashville americana:
rock influences. It often features acoustic instruments like banjos, mandolins, and
fiddles, and emphasizes storytelling through lyrics. Nashville Americana artists
tend to have a more stripped-down sound compared to mainstream country music.
parent: roots americana
parent: americana
country: US
popularity: 2815
playlist_id: 34hqvaKy6jIvN2hNf1sKlq
@ -971,7 +971,7 @@ new americana:
A genre that blends traditional American folk and country music with modern pop and
rock elements. It often features introspective lyrics about the American experience,
including themes of freedom, rebellion, and nostalgia.
parent: roots americana
parent: americana
popularity: 340
playlist_id: 7uSlfH4blWi70SZAtqAWbe
new beat:
@ -1027,7 +1027,7 @@ new england americana:
reflect the struggles of modern Indian society. This genre has gained popularity in
recent years and has become a platform for young Indian artists to showcase their
talents.
parent: roots americana
parent: americana
country: US
popularity: 2613
playlist_id: 2dKpmkhjtnpUnqY6kDB3Mv
@ -1217,7 +1217,7 @@ new orleans americana:
country, and folk, with a distinct New Orleans flavor. It often features the use of
brass instruments, such as the trumpet and trombone, and incorporates elements of
jazz and swing.
parent: roots americana
parent: americana
country: US
popularity: 3411
playlist_id: 6CIENNuy8mm01lwYaVOjIb
@ -2225,7 +2225,7 @@ norwegian americana:
acoustic instruments such as guitars, banjos, and fiddles, as well as its focus on
storytelling through lyrics. The genre often features themes of nature, rural life,
and the struggles of everyday people.
parent: roots americana
parent: americana
language: nor
country: "NO"
localized_name: true

View file

@ -275,7 +275,7 @@ oktoberfest:
Oktoberfest celebration. It typically features lively polkas, waltzes, and folk
songs played on instruments such as the accordion, tuba, and clarinet. The music is
upbeat and perfect for dancing and drinking beer with friends.
parent: event
parent: party
language: deu
country: DE
popularity: 2035

View file

@ -450,7 +450,7 @@ partyschlager:
audience participation. The genre draws inspiration from a variety of musical
styles, including pop, rock, and folk, and has become a staple of German party
culture.
parent: event
parent: party
localized_name: true
wikidata_id: 114443489
popularity: 823
@ -2414,8 +2414,6 @@ pop costarricense:
playlist_id: 4dI3GRKhI01UFrxVw64TRg
pop cristiano:
name: Pop Cristiano
description:
Pop Cristiano is contemporary christian music sung in the Spanish language
parent: ccm
language: spa
localized_name: true

View file

@ -3106,7 +3106,7 @@ roots americana:
lyrics. Roots Americana artists often incorporate elements of blues, gospel, and
rock and roll into their music, creating a sound that is both timeless and
contemporary.
parent: folk
parent: americana
popularity: 1635
playlist_id: 1iWoJHBrst3QgMIW6kXHxb
roots reggae:

View file

@ -811,7 +811,7 @@ scottish americana:
Americana artists often sing about themes such as emigration, love, and loss.
Artists such as The Proclaimers and Runrig are known for their Scottish Americana
sound.
parent: roots americana
parent: americana
country: UK
localized_name: true
popularity: 5161
@ -3613,7 +3613,7 @@ southern americana:
gospel. It is characterized by its storytelling lyrics, twangy guitars, and soulful
vocals, often accompanied by fiddle, banjo, and harmonica. The music reflects the
region's rich history and culture, from the struggles of the Civil Rights
parent: roots americana
parent: americana
country: US
popularity: 1618
playlist_id: 74lUBySWkWlasy8qCmtXAP
@ -5376,7 +5376,7 @@ swedish americana:
its introspective lyrics and storytelling, and is often associated with artists like
First Aid Kit and The Tallest Man on Earth. Swedish Americana has gained a dedicated
following in recent years, and has helped to introduce
parent: roots americana
parent: americana
language: swe
country: SE
localized_name: true

View file

@ -144,7 +144,7 @@ taiwan graduation song:
reflect on the journey of students and their memories of school life. The music is
usually slow-paced and melodic, with a focus on conveying a message of hope and
encouragement for the future.
parent: event
parent: party
language: zho
country: TW
localized_name: true
@ -550,8 +550,6 @@ tampa indie:
playlist_id: 0uGAwKwxPsuyNXulfbXNJp
tan co:
name: Tân Cổ
description:
Tân Cổ, literally "New Ancient", is a modern version of traditional Vietnamese music
parent: vietnamese traditional
localized_name: true
popularity: 5923

View file

@ -129,7 +129,7 @@ uk americana:
of love, loss, and the human condition. UK Americana artists draw inspiration from
the likes of Bob Dylan, Neil Young, and Joni Mitchell, but put their own unique spin
on the genre.
parent: roots americana
parent: americana
country: UK
localized_name: true
popularity: 994

View file

@ -409,7 +409,7 @@ western americana:
contemporary styles to create a unique sound that is both nostalgic and fresh. It
often features acoustic instruments like guitars, banjos, and fiddles, as well as
lyrics that evoke the spirit of the American West.
parent: roots americana
parent: americana
country: US
popularity: 2552
playlist_id: 0wngtIMvcnsMdZbd9xukhI
@ -702,7 +702,7 @@ wrestling:
of excitement and anticipation for the upcoming match. It is often used as an
entrance theme for wrestlers, and can be found in various forms of media, including
video games and television shows.
parent: event
parent: party
popularity: 1703
playlist_id: 4SHiHmOhFaUjBiCN9kj2qM
writing:

View file

@ -97,10 +97,6 @@
"deprecated": {
"description": "True if the genre is no longer part of Spotify's catalogue",
"type": "boolean"
},
"metagenre": {
"description": "True if the genre is a metagenre\nMetagenres do not exist at Spotify but are used to group other genres together.",
"type": "boolean"
}
},
"required": ["name"],

File diff suppressed because it is too large Load diff