Skip to content
Snippets Groups Projects
Commit 5b57cd31 authored by Cloud Dumper's avatar Cloud Dumper Committed by Robin Appelman
Browse files

Also use track_number to retrieve song track.

This adds support for id3v2 tags such as TRACK/TOTAL.
parent 6b95d742
No related branches found
No related tags found
No related merge requests found
......@@ -120,7 +120,20 @@ class OC_MEDIA_SCANNER{
$title=stripslashes($data['comments']['title'][0]);
}
$size=$data['filesize'];
$track=(isset($data['comments']['track']))?$data['comments']['track'][0]:0;
if (isset($data['comments']['track']))
{
$track = $data['comments']['track'][0];
}
else if (isset($data['comments']['track_number']))
{
$track = $data['comments']['track_number'][0];
$track = explode('/',$track);
$track = $track[0];
}
else
{
$track = 0;
}
$length=isset($data['playtime_seconds'])?round($data['playtime_seconds']):0;
}
if(!isset(self::$artists[$artist])){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment