If one enables add. info for Music files, they are always shown with mentioned duration. Reproducible: Always Steps to Reproduce: As said Expected Results: Should show the actual duration Using git master, not sure since when this regressed (probably since port to nepomuk-core), cause i don't usually have it turned on.
Created attachment 75870 [details] Example
Thanks for the report. I assume you are using the master branch or one of the 4.10 betas?
(In reply to comment #2) > Thanks for the report. I assume you are using the master branch or one of > the 4.10 betas? Frank. I don't think this is a bug in Nepomuk. We report the duration in seconds. You need to convert it properly.
(In reply to comment #2) > Thanks for the report. I assume you are using the master branch or one of > the 4.10 betas? I am using git master, with the exception of dolphin, which is at 4.9.90, cause of bug 311769
(In reply to comment #3) > Frank. I don't think this is a bug in Nepomuk. We report the duration in > seconds. You need to convert it properly. All right, sorry about that. I just looked through the sources and found the following in the API docs for KNepomukRolesProvider::durationFromValue(int value): /** * @return Duration in the format HH::MM::SS for the value given * in milliseconds. */ I wonder why Peter assumed that the value we get from http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#duration is measured in miliseconds. Is there some public documentation that says that it's in seconds?
(In reply to comment #5) > (In reply to comment #3) > > Frank. I don't think this is a bug in Nepomuk. We report the duration in > > seconds. You need to convert it properly. > > All right, sorry about that. I just looked through the sources and found the > following in the API docs for KNepomukRolesProvider::durationFromValue(int > value): > > /** > * @return Duration in the format HH::MM::SS for the value given > * in milliseconds. > */ > > I wonder why Peter assumed that the value we get from > http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#duration is > measured in miliseconds. Is there some public documentation that says that > it's in seconds? Actually it is supposed to be an xsd:duration type. We however do not have support for that and save the time in seconds instead. If you want I'll add some public docs saying that we use seconds.
Thanks for the clarification! (In reply to comment #6) > If you want I'll add some public docs saying that we use seconds. No, not necessary. I had just been wondering if there had been some public docs saying that it's milliseconds because I don't understand why Dolphin's code apparently had been written with that assumption in mind. We'll just have to modify KNepomukRolesProvider::durationFromValue(int) then, which should be quite straightforward.
Git commit d23631d0410057b3d3b74f92596a51e5f64c48e2 by Emmanuel Pescosta. Committed on 09/01/2013 at 16:24. Pushed by emmanuelp into branch 'KDE/4.10'. Show the real audio file duration in additional informations Big Thanks to Frank Reininghaus and Vishesh Handa! REVIEW: 108281 FIXED-IN: 4.10 M +1 -1 dolphin/src/kitemviews/private/knepomukrolesprovider.cpp M +1 -1 dolphin/src/kitemviews/private/knepomukrolesprovider.h http://commits.kde.org/kde-baseapps/d23631d0410057b3d3b74f92596a51e5f64c48e2