[Slim-Checkins] r33729 - /7.7/trunk/server/Slim/Schema.pm

[email protected]
Newsgroups gmane.music.equipment.slimdevices.cvs
Message-ID <[email protected]>
Author: agrundman
Date: Mon Nov 21 07:00:56 2011
New Revision: 33729

URL: http://svn.slimdevices.com/slim?rev=33729&view=rev
Log:
Bug 17609, avoid a possible locking issue by ensuring VA object is up to date at init time instead of waiting until the first time it's called, for example through artistsQuery

Modified:
    7.7/trunk/server/Slim/Schema.pm

Modified: 7.7/trunk/server/Slim/Schema.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Schema.pm?rev=33729&r1=33728&r2=33729&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Schema.pm (original)
+++ 7.7/trunk/server/Slim/Schema.pm Mon Nov 21 07:00:56 2011
@@ -226,6 +226,10 @@
 	$class->storage->debugobj('Slim::Schema::Debug');
 
 	$class->updateDebug;
+	
+	# Bug 17609, avoid a possible locking issue by ensuring VA object is up to date at init time
+	# instead of waiting until the first time it's called, for example through artistsQuery.
+	$class->variousArtistsObject;
 
 	$class->schemaUpdated($update);
 	
@@ -1864,7 +1868,7 @@
 =cut
 
 sub variousArtistsObject {
-	my $self = shift;
+	my $class = shift;
 
 	my $vaString = Slim::Music::Info::variousArtistString();
 
@@ -1872,7 +1876,7 @@
 	# XXX - exception should go here. Coming soon.
 	if (!blessed($vaObj) || !$vaObj->can('name')) {
 
-		$vaObj  = $self->rs('Contributor')->update_or_create({
+		$vaObj  = $class->rs('Contributor')->update_or_create({
 			'name'       => $vaString,
 			'namesearch' => Slim::Utils::Text::ignoreCaseArticles($vaString, 1),
 			'namesort'   => Slim::Utils::Text::ignoreCaseArticles($vaString),
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.