mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
98_Medialist.pm: bugfixing "round" problem
git-svn-id: https://svn.fhem.de/fhem/trunk@20005 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
4332989b88
commit
44972e52d2
@ -22,7 +22,7 @@
|
||||
##############################################
|
||||
#
|
||||
##############################################
|
||||
## install package libmp3-tag-perl, libjson-xs-perl, libmp3-info-perl, libmath-round-perl
|
||||
## install package libmp3-tag-perl, libjson-xs-perl, libmp3-info-perl
|
||||
##
|
||||
## images/cd-empty.png
|
||||
##############################################
|
||||
@ -43,7 +43,6 @@ use IO::File;
|
||||
use Fcntl;
|
||||
use File::Basename;
|
||||
use File::Copy;
|
||||
use Math::Round ();
|
||||
require 'Blocking.pm';
|
||||
require 'HttpUtils.pm';
|
||||
use vars qw($readingFnAttributes);
|
||||
@ -576,13 +575,14 @@ sub MediaList_GetMP3Tags($$) {
|
||||
if ($mp3 = MP3::Tag->new($file)) {
|
||||
my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
|
||||
my $mp3info = get_mp3info($file);
|
||||
|
||||
my $duration = round($mp3info->{SECS}, 0);
|
||||
|
||||
utf8::encode($title);
|
||||
utf8::encode($artist);
|
||||
utf8::encode($album);
|
||||
utf8::encode($comment);
|
||||
|
||||
$res = {"Artist" => $artist, "Title" => $title, "Album" => $album, "Time" => math::round($mp3info->{SECS}), "File" => $file, "Cover" => ""};
|
||||
$res = {"Artist" => $artist, "Title" => $title, "Album" => $album, "Time" => $duration, "File" => $file, "Cover" => ""};
|
||||
Log3 $hash, 5, "GetMP3Tags: ".Dumper($res);
|
||||
|
||||
return $res;
|
||||
@ -858,7 +858,6 @@ sub MediaList_Crawl($$) {
|
||||
|
||||
<li>libjson-xs-perl</li>
|
||||
<li>libmp3-info-perl</li>
|
||||
<li>libmath-round-perl</li>
|
||||
</ul>
|
||||
<br>
|
||||
<br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user