diff --git a/src/contrib/apedecoder/apedecoder.vcproj b/src/contrib/apedecoder/apedecoder.vcproj index 1fca57976..55aef4975 100644 --- a/src/contrib/apedecoder/apedecoder.vcproj +++ b/src/contrib/apedecoder/apedecoder.vcproj @@ -61,6 +61,7 @@ /> openStreams[0]; + try + { + AudioStream* stream = this->openStreams.at(0); stream->SetPositionMs(position); + } + catch(...) + { + } } unsigned long Transport::TrackPosition() const diff --git a/src/cube/TracklistModel.cpp b/src/cube/TracklistModel.cpp index 0ef7fe85d..898706b60 100644 --- a/src/cube/TracklistModel.cpp +++ b/src/cube/TracklistModel.cpp @@ -83,9 +83,30 @@ uistring TracklistModel::CellValueToString(int rowIndex, ColumnRef co if(!track){ return _T(""); }else{ - const utfchar *value = track->GetValue(tracklistColumn->metaKey.c_str()); + const utfchar *value = track->GetValue(tracklistColumn->metaKey.c_str()); if(value) - return win32cpp::Escape(value); + { + if (tracklistColumn->metaKey == "duration") + { + UINT64 duration = boost::lexical_cast(value); + UINT64 days(duration/86400); + duration = duration%86400; + UINT64 hours(duration/3600); + duration = duration%3600; + UINT64 minutes(duration/60); + duration = duration%60; + utfstring result; + if (minutes < 10) + result += _T("0"); + result += boost::lexical_cast(minutes) + _T(":"); + if (duration < 10) + result += _T("0"); + result += boost::lexical_cast(duration); + return win32cpp::Escape(result); + } + return win32cpp::Escape(value); + + } return _T(""); }