PDA

View Full Version : [Slim-Checkins] r2927 - in branches/browsedb/server:Plugins/MusicMagic Slim/Buttons



vidurapparao
2005-04-11, 08:36
Kevin,

I noticed you resurrected the old mixer code in BrowseDB.pm (the bit
that modifies the current mode parameters and pushes into INPUT.List).
As Robert indicated in
http://forums.slimdevices.com/showthread.php?t=13543, this won't work
since we use INPUT.List for browsedb. Specifically, popping out of the
mixer list will probably create a few problems.

--Vidur

>Modified: branches/browsedb/server/Slim/Buttons/BrowseDB.pm
>================================================== =================
>--- branches/browsedb/server/Slim/Buttons/BrowseDB.pm 2005-04-10 17:11:01 UTC (rev 2926)
>+++ branches/browsedb/server/Slim/Buttons/BrowseDB.pm 2005-04-10 20:33:48 UTC (rev 2927)
>@@ -200,9 +200,46 @@
> },
>
> 'create_mix' => sub {
>- my $client = shift;
>-
>- # XXX Mixer functions will need to be rewritten
>+ my $client = shift;
>+
>+ my $Imports = Slim::Music::Import::importers();
>+
>+ my @mixers = ();
>+
>+ for my $import (keys %{$Imports}) {
>+
>+ if (defined $Imports->{$import}->{'mixer'} && $Imports->{$import}->{'use'}) {
>+ push @mixers, $import;
>+ }
>+ }
>+
>+ if (scalar @mixers == 1) {
>+
>+ $::d_plugins && msg("Running Mixer $mixers[0]\n");
>+ &{$Imports->{$mixers[0]}->{'mixer'}}($client);
>+
>+ } elsif (@mixers) {
>+
>+ my $params = $client->modeParameterStack(-1);
>+ $params->{'listRef'} = \@mixers;
>+ $params->{'stringExternRef'} = 1;
>+
>+ $params->{'header'} = 'INSTANT_MIX';
>+ $params->{'headerAddCount'} = 1;
>+ $params->{'callback'} = \&mixerExitHandler;
>+
>+ $params->{'overlayRef'} = sub { return (undef, Slim::Display::Display::symbol('rightarrow')) };
>+
>+ $params->{'overlayRefArgs'} = '';
>+ $params->{'valueRef'} = \$mixer;
>+
>+ Slim::Buttons::Common::pushModeLeft($client, 'INPUT.List', $params);
>+
>+ } else {
>+
>+ # if we don't have mix generation, then just play
>+ (getFunctions())->{'play'}($client);
>+ }
> },
> );
> }
>

vidurapparao
2005-04-11, 09:56
Oops....wrong list. Sorry.

Vidur Apparao wrote:

>
> Kevin,
>
> I noticed you resurrected the old mixer code in BrowseDB.pm (the bit
> that modifies the current mode parameters and pushes into INPUT.List).
> As Robert indicated in
> http://forums.slimdevices.com/showthread.php?t=13543, this won't work
> since we use INPUT.List for browsedb. Specifically, popping out of the
> mixer list will probably create a few problems.
>
> --Vidur
>
>> Modified: branches/browsedb/server/Slim/Buttons/BrowseDB.pm
>> ================================================== =================
>> --- branches/browsedb/server/Slim/Buttons/BrowseDB.pm 2005-04-10
>> 17:11:01 UTC (rev 2926)
>> +++ branches/browsedb/server/Slim/Buttons/BrowseDB.pm 2005-04-10
>> 20:33:48 UTC (rev 2927)
>> @@ -200,9 +200,46 @@
>> },
>>
>> 'create_mix' => sub {
>> - my $client = shift;
>> -
>> - # XXX Mixer functions will need to be rewritten
>> + my $client = shift;
>> +
>> + my $Imports = Slim::Music::Import::importers();
>> +
>> + my @mixers = ();
>> +
>> + for my $import (keys %{$Imports}) {
>> +
>> + if (defined $Imports->{$import}->{'mixer'} &&
>> $Imports->{$import}->{'use'}) {
>> + push @mixers, $import;
>> + }
>> + }
>> +
>> + if (scalar @mixers == 1) {
>> +
>> + $::d_plugins && msg("Running Mixer $mixers[0]\n");
>> + &{$Imports->{$mixers[0]}->{'mixer'}}($client);
>> +
>> + } elsif (@mixers) {
>> +
>> + my $params = $client->modeParameterStack(-1);
>> + $params->{'listRef'} = \@mixers;
>> + $params->{'stringExternRef'} = 1;
>> +
>> + $params->{'header'} = 'INSTANT_MIX';
>> + $params->{'headerAddCount'} = 1;
>> + $params->{'callback'} = \&mixerExitHandler;
>> +
>> + $params->{'overlayRef'} = sub { return (undef,
>> Slim::Display::Display::symbol('rightarrow')) };
>> +
>> + $params->{'overlayRefArgs'} = '';
>> + $params->{'valueRef'} = \$mixer;
>> +
>> + Slim::Buttons::Common::pushModeLeft($client,
>> 'INPUT.List', $params);
>> +
>> + } else {
>> +
>> + # if we don't have mix generation, then just play
>> + (getFunctions())->{'play'}($client);
>> + }
>> },
>> );
>> }
>>
>
>