G
Gerrit
Hello,
I have made a little program to create a playlist of all the mp3 's in a
folder. That work fine for me, but I have a problem with special characters
like é and ó.
In my playlist, they are good, but when I open the playlist in WinAmp, then
André becames: André
When I create a new playlist in WinAmp, and I open it again, then André
still is André.
When I open the playlists in Notepad, then the seems not different.
I use the code from this page:
http://www.codeproject.com/csharp/shellid3tagreader.asp to get the filename,
artist name and so on from the mp3.
I write my playlist with this code (with a little bit Dutch in it, but I
think you can understand):
public void Create()
{
DirectoryInfo dir = new DirectoryInfo(Pad);
FileInfo[] files = dir.GetFiles("*.mp3");
// Playlist opslaan
StreamWriter sw = new StreamWriter(dir.FullName + "\\" + fileName);
sw.WriteLine("#EXTM3U");
sw.WriteLine();
Mp3Bestand[] file = new Mp3Bestand[files.Length];
int t = 0;
foreach (FileInfo fi in files)
{
MP3File mp3File = ShellID3TagReader.ReadID3Tags(fi.FullName);
file[t] = new Mp3Bestand();
file[t].TrackNumber = mp3File.TrackNumber;
file[t].Length = mp3File.Lengte;
file[t].Artist = mp3File.ArtistName;
file[t].Title = mp3File.SongTitle;
file[t].FileName = mp3File.FileName;
t++;
}
Array.Sort(file);
foreach (Mp3Bestand file in file)
{
sw.WriteLine("#EXTINF:" + file.Length + "," + file.Artist + " - " +
file.Title);
sw.WriteLine(file.FileName);
sw.WriteLine();
}
sw.Close();
}
Does do you know a solution for this problem?
I have made a little program to create a playlist of all the mp3 's in a
folder. That work fine for me, but I have a problem with special characters
like é and ó.
In my playlist, they are good, but when I open the playlist in WinAmp, then
André becames: André
When I create a new playlist in WinAmp, and I open it again, then André
still is André.
When I open the playlists in Notepad, then the seems not different.
I use the code from this page:
http://www.codeproject.com/csharp/shellid3tagreader.asp to get the filename,
artist name and so on from the mp3.
I write my playlist with this code (with a little bit Dutch in it, but I
think you can understand):
public void Create()
{
DirectoryInfo dir = new DirectoryInfo(Pad);
FileInfo[] files = dir.GetFiles("*.mp3");
// Playlist opslaan
StreamWriter sw = new StreamWriter(dir.FullName + "\\" + fileName);
sw.WriteLine("#EXTM3U");
sw.WriteLine();
Mp3Bestand[] file = new Mp3Bestand[files.Length];
int t = 0;
foreach (FileInfo fi in files)
{
MP3File mp3File = ShellID3TagReader.ReadID3Tags(fi.FullName);
file[t] = new Mp3Bestand();
file[t].TrackNumber = mp3File.TrackNumber;
file[t].Length = mp3File.Lengte;
file[t].Artist = mp3File.ArtistName;
file[t].Title = mp3File.SongTitle;
file[t].FileName = mp3File.FileName;
t++;
}
Array.Sort(file);
foreach (Mp3Bestand file in file)
{
sw.WriteLine("#EXTINF:" + file.Length + "," + file.Artist + " - " +
file.Title);
sw.WriteLine(file.FileName);
sw.WriteLine();
}
sw.Close();
}
Does do you know a solution for this problem?