diff --git a/fhem/FHEM/98_MediaList.pm b/fhem/FHEM/98_MediaList.pm index d2f22be7a..c0ba77c07 100644 --- a/fhem/FHEM/98_MediaList.pm +++ b/fhem/FHEM/98_MediaList.pm @@ -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($$) {