Permalink
Browse files

fixed: can't calculate the last song duration of cue sheet because mi…

…ssing Duration in ape tag loader.
  • Loading branch information...
1 parent 23d386c commit 9a60ab622e50140016e30da7c5037ba1040193f6 @taxigps taxigps committed with Apr 3, 2012
Showing with 7 additions and 0 deletions.
  1. +7 −0 xbmc/music/tags/MusicInfoTagLoaderApe.cpp
@@ -20,6 +20,7 @@
*/
#include "MusicInfoTagLoaderApe.h"
+#include "cores/paplayer/DVDPlayerCodec.h"
#include "DllLibapetag.h"
#include "MusicInfoTag.h"
#include "utils/log.h"
@@ -39,6 +40,12 @@ bool CMusicInfoTagLoaderApe::Load(const CStdString& strFileName, CMusicInfoTag&
// retrieve the APE Tag info from strFileName
// and put it in tag
tag.SetURL(strFileName);
+ DVDPlayerCodec codec;
+ if (codec.Init(strFileName, 4096))
+ {
+ tag.SetDuration((int)(codec.m_TotalTime/1000));
+ codec.DeInit();
+ }
CAPEv2Tag myTag;
if (myTag.ReadTag((char*)strFileName.c_str())) // true to check ID3 tag as well
{

0 comments on commit 9a60ab6

Please sign in to comment.