[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdemultimedia/kioslave/audiocd/plugins
From: Richard Lärkäng <richard () goteborg ! utfors ! se>
Date: 2008-10-21 17:49:58
Message-ID: 1224611398.629577.11295.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 874481 by larkang:
Fix off by one in track info
M +2 -2 flac/encoderflac.cpp
M +2 -2 lame/encoderlame.cpp
M +3 -3 vorbis/encodervorbis.cpp
--- trunk/KDE/kdemultimedia/kioslave/audiocd/plugins/flac/encoderflac.cpp #874480:874481
@@ -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)),
--- trunk/KDE/kdemultimedia/kioslave/audiocd/plugins/lame/encoderlame.cpp #874480:874481
@@ -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());
--- trunk/KDE/kdemultimedia/kioslave/audiocd/plugins/vorbis/encodervorbis.cpp #874480:874481
@@ -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