I’m using the excellent Dynamic Transition Updater plugin by James
Sutula. I would like to have the plugin use crossfading when playing
compilations and similar mixes although I have no pearl programming
ability. I assume that one could modify the subroutine to check whether
the previous and next song contains the same artist as the current one
and if not, to enable crossfading. Anyone have a suggestion which could
be inserted in the plugin to accomplish this? 

This the current code of the plugin which checks the album title for
crossfading. 

sub commandCallback {
        my $request = shift;
        my $client = $request->client();

        if (validGenre($client))
        {
                #if next or previous song is album match, use playing album 
options
                if (Slim::Player::ReplayGain->trackAlbumMatch($client, -1) ||
Slim::Player::ReplayGain->trackAlbumMatch($client, 1))
                {
                        
Slim::Utils::Prefs::clientSet($client,"transitionDuration",$album_transition_duration);
                        
Slim::Utils::Prefs::clientSet($client,"transitionType",$album_transition_type);
                        $::d_plugins && Slim::Utils::Misc::msg("DTU: Using 
transition
preferences for playing an album.\n");
                }
                #else use playing random tracks option
                else
                {
                        
Slim::Utils::Prefs::clientSet($client,"transitionDuration",$random_transition_duration);
                        
Slim::Utils::Prefs::clientSet($client,"transitionType",$random_transition_type);
                        $::d_plugins && Slim::Utils::Misc::msg("DTU: Using 
transition
preferences for random tracks.\n");
                }       
        }
        else
        {
                
Slim::Utils::Prefs::clientSet($client,"transitionDuration",$default_transition_duration);
                
Slim::Utils::Prefs::clientSet($client,"transitionType",$default_transition_type);
                $::d_plugins && Slim::Utils::Misc::msg("DTU: Genre for current 
or
next track is excluded from transition processing. Using default
transition preferences.\n");
        }


-- 
Jeff52
------------------------------------------------------------------------
Jeff52's Profile: http://forums.slimdevices.com/member.php?userid=103
View this thread: http://forums.slimdevices.com/showthread.php?t=30249

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to