diff --git a/src/lib/songs.cr b/src/lib/songs.cr index f98f5db..7e6f6b0 100644 --- a/src/lib/songs.cr +++ b/src/lib/songs.cr @@ -223,7 +223,7 @@ module CrystalGauntlet::Songs end if !author_id - author_id = get_artist_id(metadata.author, metadata.source, metadata.author_url) + author_id = get_artist_id(metadata.author, metadata.author_url, metadata.source) end if config_get("songs.sources.proxy_downloads") diff --git a/src/template_endpoints/levels.cr b/src/template_endpoints/levels.cr index c45d330..28d1af4 100644 --- a/src/template_endpoints/levels.cr +++ b/src/template_endpoints/levels.cr @@ -25,7 +25,7 @@ CrystalGauntlet.template_endpoints[{ id = params["id"].as(String).to_i begin - name, username, difficulty_community, difficulty_set, demon_difficulty_int, featured, epic, rated_coins, downloads, likes, stars, description, song_id, song_name, song_author, song_url, song_author_url = DATABASE.query_one("select levels.name, users.username, community_difficulty, difficulty, demon_difficulty, featured, epic, rated_coins, downloads, likes, levels.stars, description, song_id, song_data.name, song_authors.name, songs.url, song_authors.source from levels left join users on levels.user_id = users.id left join songs on songs.id = levels.song_id left join song_data on song_data.id = levels.song_id left join song_authors on song_data.author_id = song_authors.id where levels.id = ?", id, as: {String, String, Int32?, Int32?, Int32?, Bool, Bool, Bool, Int32, Int32, Int32?, String, Int32, String?, String?, String?, String?}) + name, username, difficulty_community, difficulty_set, demon_difficulty_int, featured, epic, rated_coins, downloads, likes, stars, description, song_id, song_name, song_author, song_url, song_author_url = DATABASE.query_one("select levels.name, users.username, community_difficulty, difficulty, demon_difficulty, featured, epic, rated_coins, downloads, likes, levels.stars, description, song_id, song_data.name, song_authors.name, songs.url, song_authors.url from levels left join users on levels.user_id = users.id left join songs on songs.id = levels.song_id left join song_data on song_data.id = levels.song_id left join song_authors on song_data.author_id = song_authors.id where levels.id = ?", id, as: {String, String, Int32?, Int32?, Int32?, Bool, Bool, Bool, Int32, Int32, Int32?, String, Int32, String?, String?, String?, String?}) rescue err LOG.error {"whar.... #{err}"} context.response.status = HTTP::Status::NOT_FOUND