Re: [Muine] [PATCH] more foregiving AlbumKey
- From: Albin Holmgren <albhol02 astud chalmers se>
- To: muine-list gnome org
- Subject: Re: [Muine] [PATCH] more foregiving AlbumKey
- Date: Thu, 23 Sep 2004 15:26:25 +0200
Next time thinking "why havn't anyone thought of this?", I'll read the
archives. ;-)
Sorry about the noise, even though I don't realy understand the reasons
for not doing this.
Albin Holmgren
Albin Holmgren wrote:
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) );
}
}
_______________________________________________
muine-list mailing list
muine-list gnome org
http://mail.gnome.org/mailman/listinfo/muine-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]