Hi,
As I announced a while ago I doing a rewrite of gnupod_search.pl
Reading the source of gnupod_search I've found something strange in the newpl
handler.
############################################
# Eventhandler for PLAYLIST items
sub newpl {
# Delete or rename needs to rebuild the XML file
my ($el, $name, $plt) = @_;
if(($plt eq "pl" or $plt eq "pcpl") && ref($el->{add}) eq "HASH") { #Add
action
if(defined($el->{add}->{id}) && int(keys(%{$el->{add}})) == 1) { #Only
id
return unless($keeplist[$el->{add}->{id}]); #ID not on keeplist.
drop it
}
}
elsif($plt eq "spl" && ref($el->{splcont}) eq "HASH") { #spl content
if(defined($el->{splcont}->{id}) && int(keys(%{$el->{splcont}})) == 1)
{ #Only one item
return unless($keeplist[$el->{splcont}->{id}]);
}
}
GNUpod::XMLhelper::mkfile($el,{$plt."name"=>$name});
}
#############################################
It looks like the elsif branch is only used for smartplaylist items.
I didn't know that smartplaylists can contain song id items at all.
Could somebody enlighten me?
I don't want to copy'n paste without understanding what I'm doing.
cheers
-h
_______________________________________________
Bug-gnupod mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/bug-gnupod