summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Gyger <samuel@gyger.at>2012-08-01 00:26:35 +0200
committerBertrand Lorentz <bertrand.lorentz@gmail.com>2012-08-11 13:33:27 +0200
commit4c62e969139f119c95c5a5ee3be7af27d382c548 (patch)
tree7670ba117435d0f8aa20ddc728550a8c3ce51b5b
parenta0b12ea8d42e9ae496e3d9e88042790bb72c3fa6 (diff)
Lyrics: Download lyrics only for music tracks (bgo#626849)
Signed-off-by: Bertrand Lorentz <bertrand.lorentz@gmail.com>
-rw-r--r--src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsManager.cs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsManager.cs b/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsManager.cs
index 6bbd064..e16c7fb 100644
--- a/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsManager.cs
+++ b/src/Lyrics/Banshee.Lyrics/Banshee.Lyrics/LyricsManager.cs
@@ -144,6 +144,10 @@ namespace Banshee.Lyrics
throw new NetworkUnavailableException ("You don't seem to be connected to internet. Check your network connection.");
}
+ if (!track.HasAttribute (TrackMediaAttributes.Music)) {
+ throw new InvalidFileException ("You can only download lyrics for a music track.");
+ }
+
//download the lyrics
string lyrics = null;
foreach (var source in GetSources (SourceData.LyricsSelector)) {