[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.1/kdemultimedia/kioslave/audiocd/plugins
From:       Richard Lärkäng <richard () goteborg ! utfors ! se>
Date:       2008-10-21 17:51:34
Message-ID: 1224611494.077761.11832.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 874483 by larkang:

Backport:
Fix off by one in track info

BUG: 171561


 M  +2 -2      flac/encoderflac.cpp  
 M  +2 -2      lame/encoderlame.cpp  
 M  +3 -3      vorbis/encodervorbis.cpp  


--- branches/KDE/4.1/kdemultimedia/kioslave/audiocd/plugins/flac/encoderflac.cpp #874482:874483
@@ -177,8 +177,8 @@
 //    d->metadata[2] = FLAC__metadata_object_new(FLAC__METADATA_TYPE_SEEKTABLE)
 
     typedef QPair<QString, QVariant> Comment;
-    Comment comments[7] = { Comment("Title", info.track(track).get(Title)),
-	    	    	    Comment("Artist", info.track(track).get(Artist)),
+    Comment comments[7] = { Comment("Title", info.track(track-1).get(Title)),
+	    	    	    Comment("Artist", info.track(track-1).get(Artist)),
 	    	    	    Comment("Album",  info.get(Title)),
 	    	    	    Comment("Genre",  info.get(Genre)),
 	    	    	    Comment("Tracknumber", QString::number(track)),
--- branches/KDE/4.1/kdemultimedia/kioslave/audiocd/plugins/lame/encoderlame.cpp #874482:874483
@@ -341,10 +341,10 @@
 void EncoderLame::fillSongInfo( KCDDB::CDInfo info, int track, const QString &comment ){
 	trackInfo.clear();
 	trackInfo.append("--tt");
-	trackInfo.append(info.track(track).get(Title).toString());
+	trackInfo.append(info.track(track-1).get(Title).toString());
 
 	trackInfo.append("--ta");
-	trackInfo.append(info.track(track).get(Artist).toString());
+	trackInfo.append(info.track(track-1).get(Artist).toString());
 
 	trackInfo.append("--tl");
 	trackInfo.append(info.get(Title).toString());
--- branches/KDE/4.1/kdemultimedia/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp #874482:874483
@@ -306,13 +306,13 @@
   typedef QPair<QByteArray, QVariant> CommentField;
   Q3ValueList<CommentField> commentFields;
 
-  commentFields.append(CommentField("title", info.track(track).get(Title)));
-  commentFields.append(CommentField("artist", info.track(track).get(Artist)));
+  commentFields.append(CommentField("title", info.track(track-1).get(Title)));
+  commentFields.append(CommentField("artist", info.track(track-1).get(Artist)));
   commentFields.append(CommentField("album", info.get(Title)));
   commentFields.append(CommentField("genre", info.get(Genre)));
   commentFields.append(CommentField("tracknumber", QString::number(track)));
   commentFields.append(CommentField("comment", comment));
-	
+
   if (info.get(Year).toInt() > 0) {
     QDateTime dt( QDate(info.get(Year).toInt(), 1, 1) );
     commentFields.append(CommentField("date", dt.toString(Qt::ISODate).toUtf8().data()));
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic