diff options
-rwxr-xr-x | clerk | 4 | ||||
-rwxr-xr-x | clerk_rating_client | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -372,7 +372,7 @@ sub do_action { if ($tagging eq "true") { $mpd->sticker_value("song", "$uri", "rating", "$rating"); } - $mpd->send_message('rating', "$uri\tRATING\t${rating}"); + $mpd->send_message('rating', encode('UTF-8', "${uri}\tRATING\t${rating}")); } } elsif ($action eq "Add\n" || $action eq "Replace\n") { @@ -410,7 +410,7 @@ sub do_action { my $filename = $songs->{uri}; $mpd->sticker_value("song", $filename, "albumrating", "$rating"); if ($tagging eq "true") { - $mpd->send_message('rating', "$filename\tALBUMRATING\t${rating}"); + $mpd->send_message('rating', encode('UTF-8', "${filename}\tALBUMRATING\t${rating}")); } } } diff --git a/clerk_rating_client b/clerk_rating_client index b65f9c6..b05bc2b 100755 --- a/clerk_rating_client +++ b/clerk_rating_client @@ -4,7 +4,8 @@ binmode(STDOUT, ":utf8"); use v5.10; use warnings; use Array::Utils qw(:all); -#use DDP; +#use DDP { show_unicode => 1 }; +use Data::Dumper; use Try::Tiny; use Config::Simple; use File::Spec; |