Clear StringBuilder on each new NFO.

This commit is contained in:
2014-05-19 17:15:27 +01:00
parent dd29f5a234
commit 4171da8be5
2 changed files with 8 additions and 1 deletions

5
QDXMVNC/ChangeLog Normal file
View File

@@ -0,0 +1,5 @@
2014-05-19 Natalia Portillo <claunia@claunia.com>
* Program.cs:
Clear StringBuilder on each new NFO.

View File

@@ -30,7 +30,7 @@ namespace QDXMVNC
List<string> artist_paths = new List<string>(Directory.EnumerateDirectories(args[0]));
StringBuilder nfo_sb = new StringBuilder();
StringBuilder nfo_sb;
int skipped = 0;
int written = 0;
int videos = 0;
@@ -69,6 +69,7 @@ namespace QDXMVNC
}
else
{
nfo_sb = new StringBuilder();
nfo_sb.AppendLine("<musicvideo>");
nfo_sb.AppendFormat("\t<album>{0}</album>", System.Security.SecurityElement.Escape(album)).AppendLine();
nfo_sb.AppendFormat("\t<artist>{0}</artist>", System.Security.SecurityElement.Escape(artist)).AppendLine();
@@ -109,6 +110,7 @@ namespace QDXMVNC
}
else
{
nfo_sb = new StringBuilder();
nfo_sb.AppendLine("<musicvideo>");
nfo_sb.AppendFormat("\t<album>{0}</album>", System.Security.SecurityElement.Escape("[non-album tracks]")).AppendLine();
nfo_sb.AppendFormat("\t<artist>{0}</artist>", System.Security.SecurityElement.Escape(artist)).AppendLine();