| 1 |
Debian: Adjust to building against taglib 2.x. |
| 2 |
Author: Mike Gabriel <[email protected]> |
| 3 |
Forwarded: https://gitlab.com/ubports/development/apps/lomiri-filemanager-app/-/merge_requests/121 |
| 4 |
|
| 5 |
--- a/src/plugin/folderlistmodel/dirmodel.cpp |
| 6 |
+++ b/src/plugin/folderlistmodel/dirmodel.cpp |
| 7 |
@@ -2027,8 +2027,11 @@ |
| 8 |
return QString::fromUtf8(tag->genre().toCString(true)); |
| 9 |
case TrackLengthRole: |
| 10 |
if (!f.isNull() && f.audioProperties()) { |
| 11 |
+#if TAGLIB_MAJOR_VERSION >= 2 |
| 12 |
+ return QString::number(f.audioProperties()->lengthInSeconds()); |
| 13 |
+#else |
| 14 |
return QString::number(f.audioProperties()->length()); |
| 15 |
- |
| 16 |
+#endif /* TAGLIB_MAJOR_VERSION >= 2 */ |
| 17 |
} else { |
| 18 |
return QString::number(0); |
| 19 |
} |