Hey, man. I have a short list of genre IDs in my open-source app here: https://github.com/adityasaravana/Tuneder/blob/main/Tuneder/GenreSelection.swift, if you want to borrow some of those, and here's a simple script I run when my app launches to collect some genre data.
func search(_ query: String) async {
/// This code fetches the genres and ids of songs that that you enter in searchTerm, useful for adding more genres (See GenreSelection)
do {
let songSearch = try await MCatalog.search(for: query, types: [.songs], limit: 3)
for song in songSearch.songs {
let songDetailed = try await MCatalog.song(id: song.id, fetch: [.genres])
for genre in songDetailed.genres! {
print("⚠️⚠️⚠️⚠️⚠️⚠️ GENRE NAME: \(genre.name), ID: \(genre.id) ⚠️⚠️⚠️⚠️⚠️⚠️")
}
}
} catch {
print("caught at MusicManager.searchQuery")
}
}
.onAppear {
#if DEBUG
/// Finding the IDs of genres to add to GenreSelection.
Task {
await musicManager.search("jazz")
}
#endif
}