[Muine] [PATCH] more foregiving AlbumKey
- From: Albin Holmgren <albhol02 astud chalmers se>
- To: muine-list gnome org
- Subject: [Muine] [PATCH] more foregiving AlbumKey
- Date: Thu, 23 Sep 2004 01:34:42 +0200
Hi.
Attached is a small patch to strip whitespaces and a few other
characters from the name of an album when constructing the AlbumKey.
This will help prevent songs from one album from being splitted because
of leading spaces etc.
I'm new to both Mono and Muine, so I hope I got it right ;-).
Albin Holmgren
Index: Song.cs
===================================================================
RCS file: /cvs/gnome/muine/src/Song.cs,v
retrieving revision 1.45
diff -u -p -r1.45 Song.cs
--- Song.cs 20 Jun 2004 18:53:26 -0000 1.45
+++ Song.cs 22 Sep 2004 23:06:45 -0000
@@ -178,7 +178,8 @@ public class Song
string dirname = Path.GetDirectoryName (filename);
- return dirname + ":" + album.ToLower ();
+ char[] split_chars = new char[]{'
','-','_','/',':','(',')','\''};
+ return dirname + ":" + String.Join( "",
album.ToLower().Split(split_chars) );
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]