[Slim-Checkins] r10130 -
/branches/6.5/server/Plugins/MusicMagic/Importer.pm
dsully at svn.slimdevices.com
dsully at svn.slimdevices.com
Mon Oct 2 11:05:27 PDT 2006
Author: dsully
Date: Mon Oct 2 11:05:26 2006
New Revision: 10130
URL: http://svn.slimdevices.com?rev=10130&view=rev
Log:
Bug: N/A
Description: Merge from trunk -r 10128:10129
Modified:
branches/6.5/server/Plugins/MusicMagic/Importer.pm
Modified: branches/6.5/server/Plugins/MusicMagic/Importer.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Plugins/MusicMagic/Importer.pm?rev=10130&r1=10129&r2=10130&view=diff
==============================================================================
--- branches/6.5/server/Plugins/MusicMagic/Importer.pm (original)
+++ branches/6.5/server/Plugins/MusicMagic/Importer.pm Mon Oct 2 11:05:26 2006
@@ -15,12 +15,15 @@
use Slim::Music::Import;
use Slim::Player::ProtocolHandlers;
use Slim::Utils::Misc;
+use Slim::Utils::OSDetect;
use Slim::Utils::Strings qw(string);
my $initialized = 0;
my $MMMVersion = 0;
my $MMSHost;
my $MMSport;
+
+my $OS = Slim::Utils::OSDetect::OS();
sub useMusicMagic {
my $class = shift;
@@ -267,7 +270,16 @@
# MiP 1.6+ encode filenames as UTF-8, even on Windows.
# So we need to turn the string from MiP to UTF-8, which then gets
# turned into the local charset below with utf8encode_locale
- for my $key (qw(album artist genre name file)) {
+ #
+ # This breaks Linux however, so only do it on Windows & OS X
+ @keys = qw(album artist genre name);
+
+ if ($OS eq 'mac' || $OS eq 'win') {
+
+ push @keys, 'file';
+ }
+
+ for my $key (@keys) {
if (!$songInfo{$key}) {
next;
@@ -291,7 +303,7 @@
$::d_musicmagic && msg("MusicMagic: Exporting song: $songInfo{'file'}\n");
# Both Linux & Windows need conversion to the current charset.
- if (Slim::Utils::OSDetect::OS() ne 'mac') {
+ if ($OS ne 'mac') {
$songInfo{'file'} = Slim::Utils::Unicode::utf8encode_locale($songInfo{'file'});
}
More information about the checkins
mailing list