[banshee] [MassStorageSource] Pad the track number if the folder depth is set



commit 5f5609da47a92f83ecad11a19a895cc60b570bbc
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Mon Jan 11 19:27:16 2010 +0100

    [MassStorageSource] Pad the track number if the folder depth is set
    
    If necessary, add a leading 0 to the track number while building the
    filename when FolderDepth is set. This matches the default behavior
    when FolderDepth is not set, and the code comments. Fixes BGO#606531.

 .../Banshee.Dap.MassStorage/MassStorageSource.cs   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
index ba753a0..40499d3 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
@@ -617,7 +617,7 @@ namespace Banshee.Dap.MassStorage
                     int depth = FolderDepth;
                     string album_artist = FileNamePattern.Escape (track.DisplayAlbumArtistName);
                     string track_album  = FileNamePattern.Escape (track.DisplayAlbumTitle);
-                    string track_number = FileNamePattern.Escape (Convert.ToString (track.TrackNumber));
+                    string track_number = FileNamePattern.Escape (String.Format ("{0:00}", track.TrackNumber));
                     string track_title  = FileNamePattern.Escape (track.DisplayTrackTitle);
 
                     if (depth == 0) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]