From 95bb4eccea7007739d8839ecef8be47e5f0b57a5 Mon Sep 17 00:00:00 2001 From: John Maguire Date: Thu, 15 Jul 2010 12:59:14 +0000 Subject: [PATCH] Unpack artist/title from SomaFM streams correctly. Fixes issue #497 --- src/core/player.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/player.cpp b/src/core/player.cpp index 7d4bbbc28..c24ac74cf 100644 --- a/src/core/player.cpp +++ b/src/core/player.cpp @@ -356,6 +356,11 @@ void Player::EngineMetadataReceived(const Engine::SimpleMetaBundle& bundle) { bundle_copy.title = bundle_copy.title.left(dash_pos).trimmed(); } + // Hack as SomaFM's artist/title descriptions are backwards. + if (item->Url().host().contains("somafm.com")) { + qSwap(bundle_copy.artist, bundle_copy.title); + } + Song song = item->Metadata(); song.MergeFromSimpleMetaBundle(bundle_copy);