Bug 15818 - Windows Home Server: disable iTunes Integration in default installation
: Windows Home Server: disable iTunes Integration in default installation
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 7.4.2
: PC Windows Home Server
: P2 normal (vote)
: 7.6.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-02 17:31 UTC by Walker LaRon
Modified: 2010-05-20 07:24 UTC (History)
4 users (show)

See Also:
Category: ---


Attachments
more complete patch (1.35 KB, patch)
2010-03-08 04:35 UTC, Michael Herger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walker LaRon 2010-03-02 17:31:52 UTC
Windows Home Server
SB Server 7.4.2 and also tested on 7.5 latest

Hello All,

We have be receiving cases where customers are not able to use iTunes integration successfully on Windows Home Server.

Does this work on Windows Home Server?  

The "Use iTunes" checkbox that is resident on other SB Server Control Panels, but the iTunes plugin is automatically installed, and the tab is available in Advanced settings.

I have asked QA about this, and they stated that it "may or may not work depending on if the iTunes add-in is installed and configured properly".  

I am assuming that in WHS, if the add-in is installed, the customer has to import his iTunes music library from their old computer to the new WHS iTunes add-in (which they would need to contact Apple for), and once this is done, it should work?

I know this does not work if you "copy and paste" the iTunes music library.xml file.

If iTunes integration was intentionally left off of the SB Server Control Panel for WHS because it does not work, the iTunes plugin should not be included in the build, or installed by default.


--
Thanks,

LaRon
Comment 1 Walker LaRon 2010-03-02 17:37:27 UTC
Corrections to my bug:


****
The "Use iTunes" checkbox that is resident on other SB Server Control Panels (MAC/PC) IS NOT present on the WHS Control Panel, but the iTunes plugin is still automatically installed, and the tab is available in Advanced settings.

****

--
Thanks,

LaRon
Comment 2 Michael Herger 2010-03-02 21:23:26 UTC
iTunes integration works as on any system which does not run iTunes locally: you'll have to copy iTunes' xml file to the server, then set the path to the original files in the iTunes settings (Advanced settings). 

Or you install iTunes locally on that computer. 

You can't integrate with whatever local iTunes server is installed on the box though.

It's really just a Windows box. The only difference is the installer and the control panel. Feature wise it's identical.
Comment 3 Walker LaRon 2010-03-03 11:18:25 UTC
Hello Michael,

Thanks for the info.  We have reviewed this as a team, and per Dan, we are not supporting iTunes integration on Windows Home Server.


Per this decision, we are requesting that the iTunes plugin NOT be installed by default in the Windows Home Server Build.


--
Thanks,

LaRon
Comment 4 Chris Owens 2010-03-05 11:36:14 UTC
Michael, could I trouble you for a risk and effort estimate for fixing this bug in 7.5.0?
Comment 5 Michael Herger 2010-03-07 23:23:48 UTC
I wonder whether we should enable this option on anything but OSX/Windows at all then?

The change required wouldn't be much more than the following:

Index: server/Slim/Plugin/iTunes/Common.pm
===================================================================
--- server/Slim/Plugin/iTunes/Common.pm	(revision 30346)
+++ server/Slim/Plugin/iTunes/Common.pm	(working copy)
@@ -408,8 +408,8 @@
 		$prefs->set('lastITunesMusicLibraryDate',0);
 	}
 
-	if (!defined $prefs->get('itunes') && defined $class->findMusicLibraryFile()) {
-		$prefs->set('itunes', 1);
+	if (!defined $prefs->get('itunes')) {
+		$prefs->set('itunes', defined $class->findMusicLibraryFile() ? 1 : 0);
 	}
 	
 	if (!defined $prefs->get('ignore_playlists')) {


This check should already have done this, but failed to _disable_ iTunes integration in case no library was found, but only explicitely enabled it if it was. This lead to it being enabled in some other place. The above change would disable it for good.
Comment 6 Michael Herger 2010-03-08 04:35:10 UTC
Created attachment 6608 [details]
more complete patch

disable iTunes unless
- it's already enabled (don't touch existing installations)
- or an iTunes XML file is found
- or we're on a Mac
- or we're running Windows (but not Windows Home Server)

This would disable iTunes integration by default on any Linux or WHS system.
Comment 7 Michael Herger 2010-03-08 04:48:53 UTC
The reasoning behind this change is that by default we disable it on any platform which would require manual configuration for iTunes integration to work anyway. Which basically means all but OSX and desktop Windows.

The risk imho is minimal.
Comment 8 SVN Bot 2010-03-16 01:30:15 UTC
 == Auto-comment from SVN commit #30378 to the slim repo by mherger ==
 == https://svn.slimdevices.com/slim?view=revision&revision=30378 ==

Fixed Bug: 15818
Description: don't default iTunes integration to on unless 
- a library can be found automatically
- or we're on OSX
- or we're on Windows, but not WHS
Comment 9 Chris Owens 2010-04-08 17:25:22 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!
Comment 10 Walker LaRon 2010-04-09 11:01:55 UTC
Hello All,

This iTunes Plugin is still enabled in Advanced Settings when  you Install it on Windows Homes Server (clean install of official version).  This request was to disable this Plugin on WHS by default, and not have it available when going into Advanced settings. (Please see Comment 3)


Re-Opening Bug


Thanks,

LaRon
Comment 11 Chris Owens 2010-04-09 11:11:57 UTC
LaRon, noting Michael's remarks in comment 8, is there an iTunes library on the machine you were testing with?
Comment 12 Walker LaRon 2010-04-09 11:18:09 UTC
(In reply to comment #11)
> LaRon, noting Michael's remarks in comment 8, is there an iTunes library on the
> machine you were testing with?

Hello Chris,

No, not at all.  This is a vanilla WHS VM, nothing else installed.


Thanks,

LaRon
Comment 13 Michael Herger 2010-04-09 12:00:30 UTC
LaRon - could you please post details from the Settings/Information page?
Comment 14 Walker LaRon 2010-04-09 12:38:29 UTC
(In reply to comment #13)
> LaRon - could you please post details from the Settings/Information page?

Here you go...

Squeezebox Server Status

Version: 7.5.0 - r30464 @ Thu Apr 1 05:51:56 PDT 2010
Hostname: whs
Server IP Address: 172.19.70.242
Server HTTP Port Number: 9000
Operating system: Windows Home Server - EN - cp1252 
Platform Architecture: 586
Perl Version: 5.10.0 - MSWin32-x86-multi-thread
MySQL Version: 5.0.22-community-nt
Total Players Recognized: 0
 
Library Statistics

Total Tracks: 107
Total Albums: 13
Total Artists: 15
Total Genres: 9
Total Playing Time: 5:49:15
 
Cache Folder
C:\Documents and Settings\All Users\Application Data\Squeezebox\Cache
Preferences Folder
C:\Documents and Settings\All Users\Application Data\Squeezebox\prefs
Plugin Folders
C:\Program Files\Squeezebox\server\Slim\Plugin, C:\Documents and Settings\All Users\Application Data\Squeezebox\Cache\InstalledPlugins\Plugins, C:\Program Files\Squeezebox\server\Plugins
Squeezebox Server Log File

C:\Documents and Settings\All Users\Application Data\Squeezebox\Logs\server.log 
 
Scanner Log File

C:\Documents and Settings\All Users\Application Data\Squeezebox\Logs\scanner.log
Comment 15 Michael Herger 2010-04-09 13:36:00 UTC
Looking normal - could you please upload the full server.log file too?
Comment 16 Walker LaRon 2010-04-09 13:40:25 UTC
(In reply to comment #15)
> Looking normal - could you please upload the full server.log file too?

(In reply to comment #15)
> Looking normal - could you please upload the full server.log file too?

Here you go...

[10-04-09 10:37:53.4683] main::init (323) Starting Squeezebox Server (v7.5.0, r30464, Thu Apr  1 05:51:56 PDT 2010) perl 5.010000
[10-04-09 10:38:05.1247] Slim::Schema::init (147) Warning: Creating new database - empty database or database from 6.3.x found
[10-04-09 10:38:05.1262] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::mysql::st execute failed: Table 'slimserver.dbix_migration' doesn't exist [for Statement "SELECT value FROM dbix_migration WHERE name = ?;
"]
[10-04-09 10:38:05.1267] Slim::Schema::Storage::throw_exception (82) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema/Storage.pm line 82)
   frame 1: Slim::Schema::Storage::throw_exception (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Class/Storage/DBI.pm line 957)
   frame 2: DBIx::Class::Storage::DBI::__ANON__ (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 237)
   frame 3: (eval) (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 233)
   frame 4: DBIx::Migration::_version (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 149)
   frame 5: DBIx::Migration::version (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema.pm line 478)
   frame 6: Slim::Schema::migrateDB (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema.pm line 161)
   frame 7: Slim::Schema::init (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/Import.pm line 744)
   frame 8: Slim::Music::Import::_checkLibraryStatus (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/Import.pm line 677)
   frame 9: Slim::Music::Import::useImporter (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/MusicFolderScan.pm line 48)
   frame 10: Slim::Music::MusicFolderScan::init (slimserver.pl line 435)
   frame 11: main::init (slimserver.pl line 54)
   frame 12: PerlSvc::Startup (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>PerlSvc.pm line 95)
   frame 13: PerlSvc::_startup (slimserver.pl line 0)
   frame 14: (eval) (slimserver.pl line 0)

[10-04-09 10:38:05.1282] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::mysql::st execute failed: Table 'slimserver.dbix_migration' doesn't exist [for Statement "SELECT value FROM dbix_migration WHERE name = ?;
"]
[10-04-09 10:38:05.1286] Slim::Schema::Storage::throw_exception (82) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema/Storage.pm line 82)
   frame 1: Slim::Schema::Storage::throw_exception (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Class/Storage/DBI.pm line 957)
   frame 2: DBIx::Class::Storage::DBI::__ANON__ (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 237)
   frame 3: (eval) (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 233)
   frame 4: DBIx::Migration::_version (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>DBIx/Migration.pm line 78)
   frame 5: DBIx::Migration::migrate (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema.pm line 480)
   frame 6: Slim::Schema::migrateDB (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Schema.pm line 161)
   frame 7: Slim::Schema::init (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/Import.pm line 744)
   frame 8: Slim::Music::Import::_checkLibraryStatus (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/Import.pm line 677)
   frame 9: Slim::Music::Import::useImporter (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>Slim/Music/MusicFolderScan.pm line 48)
   frame 10: Slim::Music::MusicFolderScan::init (slimserver.pl line 435)
   frame 11: main::init (slimserver.pl line 54)
   frame 12: PerlSvc::Startup (/<C:\Program Files\Squeezebox\server\SqueezeSvr.exe>PerlSvc.pm line 95)
   frame 13: PerlSvc::_startup (slimserver.pl line 0)
   frame 14: (eval) (slimserver.pl line 0)

[10-04-09 10:38:22.4370] Slim::Plugin::MusicMagic::Plugin::initPlugin (265) Can't connect to port 10002 - MusicIP disabled.
[10-04-09 10:38:25.9840] main::checkDataSource (974) Warning: Schema updated or no tracks in the database, initiating scan.
Comment 17 Michael Herger 2010-04-12 03:08:27 UTC
LaRon - investigating further I still can't reproduce the issue. I guess you misinterpret the availability of the iTunes tab as failure of this change? The tab would still be there, but the "use iTunes" checkbox should be unchecked. Isn't this what you're seeing?

Could you please
- stop SBS
- delete prefs/plugin/itunes.prefs from the SBS settings folder
- restart SBS
- upload the newly created itunes.prefs file

There would be a line:
itunes: ~

If this reads
itunes: 1

then this bug indeed isn't fixed. But it's the former in my case.

If you want the full plugin to be disabled (not available to the user without going in to Settings/Plugins), then that would be another request.
Comment 18 Walker LaRon 2010-04-12 11:19:00 UTC
Hello Michael,

Per our conversation in the meeting, the request to have the iTunes plugin disabled by default when being installed on WHS was the intention of this bug. 

Per Dan (along with others), the decision was made that we do not support the iTunes integration feature on the Windows Home Server OS, which is why this is being requested.


I have spoken with Chris, and he is going to start an email chain in regards to this.

Thanks,

LaRon
Comment 19 Chris Owens 2010-04-12 16:01:46 UTC
Target is in the past
Comment 20 Michael Herger 2010-04-28 03:38:39 UTC
Chris - let's re-target this issue once we've defined what behaviour we want to see.
Comment 21 Dan Evans 2010-04-30 14:50:55 UTC
Michael,

I don't think this needs lengthy discussion.  The question boils down to:

 * Can you disable the iTunes _plugin_ for WHS installs?  (not just the option)

That way, the tab will not appear at all.
Comment 22 Michael Herger 2010-04-30 15:10:23 UTC
Sure, we can do almost anything. It's software after all ;-).

The discussion could be lenghty for good reasons: We have at least three ways to "disable" iTunes integration:

1.) load the plugin, but don't use it by default (current situation)
2.) don't load the plugin, but let the user enable in the plugins section
3.) remove the plugin alltogether

1. wasn't good enough from your POV.
2. is what I'm going to implement next
3. would be a big mistake
Comment 23 Dan Evans 2010-04-30 17:18:20 UTC
Three cheers for the magic of software. :)

To your suggestions, I agree and approve.
Comment 24 SVN Bot 2010-05-20 07:24:27 UTC
 == Auto-comment from SVN commit #30801 to the slim repo by mherger ==
 == http://svn.slimdevices.com/slim?view=revision&revision=30801 ==

Fixed Bug: 15818
Description: disable iTunes by default on Windows Home Server, but don't remove the plugin.