Skip to content
Permalink
Browse files

quick fix for crash on startup when "missing" songs in library

  • Loading branch information
squentin committed Nov 12, 2011
1 parent b8df868 commit 10fe09e0eaadad256af97ccf1507a73835a794fd
Showing with 3 additions and 3 deletions.
  1. +1 −1 gmusicbrowser.pl
  2. +2 −2 gmusicbrowser_songs.pm
@@ -1932,7 +1932,7 @@ sub ReadSavedTags #load tags _and_ settings
my $filter= Filter->newadd(TRUE,'missing:e:0', $mfilter);
$Library=[]; #dummy array to avoid a warning when filtering in the next line
$Library= SongArray->new( $filter->filter_all );
Songs::AddMissing( Songs::AllFilter('missing:-e:0') );
Songs::AddMissing( Songs::AllFilter('missing:-e:0'), 'init' );
}

delete $Options{LastPlayFilter} unless $Options{RememberPlayFilter};
@@ -1713,7 +1713,7 @@ sub UpdateTags
}

sub AddMissing #FIXME if song in EstimatedLength, set length to 0
{ my $IDs=$_[0];
{ my ($IDs,$init)=@_;
push @Missing,@$IDs;
$MissingHash=undef;
#if ($MissingHash)
@@ -1722,7 +1722,7 @@ sub AddMissing #FIXME if song in EstimatedLength, set length to 0
# push @{ $MissingHash->{$key} },$ID;
#}
#}
Set($IDs,missing=>$::DAYNB);
Set($IDs,missing=>$::DAYNB) unless $init;
}
sub CheckMissing
{ return undef unless @Missing;

0 comments on commit 10fe09e

Please sign in to comment.
You can’t perform that action at this time.