Summary: | Features & Bugfixes to filerenamer | ||
---|---|---|---|
Product: | [Applications] juk | Reporter: | Lilltiger <rx.sweden> |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | REPORTED --- | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Lilltiger
2004-03-29 14:09:37 UTC
Can you please split this up into separate patches (incremental if needed) for the different parts? Generally speaking in the OSS world people are only going to apply patches if they're atomic and easy to understand -- this is not the case here. (As this requires either "all or nothing" rather than potentially accepting only certain parts.) Also you ignored the coding conventions in the file -- please pay attention to the indentation and spacing scheme... I think the two fixes are void as of a few moments ago since the code now depends on KIO for moving a file, and I think KIO cares about stuff like whether there is enough space available at the destination. CVS commit by wheeler: Add a bitrate column (hidden by default). CCMAIL:78665-done@bugs.kde.org M +2 -0 playlist.cpp 1.182 M +17 -5 playlistitem.cpp 1.83 M +3 -2 playlistitem.h 1.54 --- kdemultimedia/juk/playlist.cpp #1.181:1.182 @@ -170,4 +170,5 @@ Playlist::SharedSettings::SharedSettings for(int i = 0; i <= PlaylistItem::lastColumn(); i++) { switch(i) { + case PlaylistItem::BitrateColumn: case PlaylistItem::CommentColumn: case PlaylistItem::FileNameColumn: @@ -868,4 +869,5 @@ void Playlist::polish() addColumn(i18n("Year")); addColumn(i18n("Length")); + addColumn(i18n("Bitrate")); addColumn(i18n("Comment")); addColumn(i18n("File Name")); --- kdemultimedia/juk/playlistitem.cpp #1.82:1.83 @@ -78,4 +78,6 @@ QString PlaylistItem::text(int column) c case LengthColumn: return d->fileHandle.tag()->lengthString(); + case BitrateColumn: + return QString::number(d->fileHandle.tag()->bitrate()); case CommentColumn: return d->fileHandle.tag()->comment(); @@ -260,5 +262,6 @@ int PlaylistItem::compare(const Playlist } - if(column == TrackNumberColumn + offset) { + switch(column - offset) { + case TrackNumberColumn: if(firstItem->d->fileHandle.tag()->track() > secondItem->d->fileHandle.tag()->track()) return 1; @@ -267,6 +270,6 @@ int PlaylistItem::compare(const Playlist else return 0; - } - else if(column == LengthColumn + offset) { + break; + case LengthColumn: if(firstItem->d->fileHandle.tag()->seconds() > secondItem->d->fileHandle.tag()->seconds()) return 1; @@ -275,8 +278,17 @@ int PlaylistItem::compare(const Playlist else return 0; - } + break; + case BitrateColumn: + if(firstItem->d->fileHandle.tag()->bitrate() > secondItem->d->fileHandle.tag()->bitrate()) + return 1; + else if(firstItem->d->fileHandle.tag()->bitrate() < secondItem->d->fileHandle.tag()->bitrate()) + return -1; else + return 0; + break; + default: return strcoll(firstItem->d->local8Bit[column - offset], secondItem->d->local8Bit[column - offset]); + } } --- kdemultimedia/juk/playlistitem.h #1.53:1.54 @@ -58,6 +58,7 @@ public: YearColumn = 5, LengthColumn = 6, - CommentColumn = 7, - FileNameColumn = 8 }; + BitrateColumn = 7, + CommentColumn = 8, + FileNameColumn = 9 }; static int lastColumn() { return FileNameColumn; } Dah, wrong CCMAIL again... |