Autor Beitrag
lodibach
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: So 02.05.10 13:20 
Hallo, ich weiß es gibt viele tutorials um Tags zu füllen, aber ich habe sie ausprobiert und irgendwie will es bei mir nicht funktionieren.
Ich verwende:

Console.WriteLine("Test",v1Tag.Title);

doch warum auch immer will es nicht... Mein gesamter Code sieht so aus:
ausblenden C#-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
                FileInfo oFile = new FileInfo(sDateien[iFileindex]);
                if (oFile.FullName.EndsWith(".mp3"truenull))
                {
                    ID3File file = new ID3File(oFile.FullName);
                    ID3v1Tag v1Tag = file.ID3v1Tag;

                    if (v1Tag.Artist != null)
                    {
                        string [] sMp3Artist = oFile.Name.Split(new Char[] { '-' });
                        Console.WriteLine(sMp3Artist[0],v1Tag.Artist);
                        file.Save(oFile.FullName);
                    }
                    v1Tag.Title = ""
                    file.Save(oFile.FullName);
                    if (v1Tag.Title != null)
                    {
                        string[] sMp3Artist = oFile.Name.Split(new Char[] { '-' });
                        Console.WriteLine(sMp3Artist[1],v1Tag.Title);
                        file.Save(oFile.FullName);
                    }


Danke für eure Hilfe


Moderiert von user profile iconChristian S.: Topic aus C# - Die Sprache verschoben am So 02.05.2010 um 20:43
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: So 02.05.10 13:38 
Du machst es uns unnötig schwer, wenn du keinen Link zur verwendeten Lib angibst und dich bei Fehlermeldungen auf "will nicht" beschränkst.

_________________
>λ=
lodibach Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: So 02.05.10 13:42 
Entschuldigung... hab ich vergessen.

ich arbeite mit

using ID3TagLib;

und "will nicht" bedeutet, dass das Programm zwar ohne Fehler durchläuft, aber nichts an der Datei ändert.
Greenberet
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 339
Erhaltene Danke: 20

Win 10
C# (VS 2012), C++ (VS 2012/GCC), PAWN(Notepad++), Java(NetBeans)
BeitragVerfasst: So 02.05.10 14:56 
Dir ist schon klar, dass du mit "Console.Writeline" das Ganze in der Konsole ausgibst und nicht in die Datei schreibst?
lodibach Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: So 02.05.10 20:03 
Nein, das ist es mir nicht!
So stand das ganze in einem Tutorial.
Was muss ich dann machen?