Hi,

as more or less written above, i use SugarCube actually without
Dynamicplaylist integration. Nevertheless, sometimes i want to hear a
dynamic playlist without Sugarcube. The 'problem' was that i had to
deactivate Sugarcube before that, since Sugarcube added the next tracks
instead of the DynamicPlaylistPlugin.

Therefore i changed the code of Sugarcube a little bit and it seems to
work. Base was the code of Phil.

Nevertheless, i gues, that now also the Dynamicplaylist integration of
sugarcube won't work anymore, but that could be improved

The advantage is, that i can leave SugarCube enabled while playing
DynamicPlaylists without disturbing each other


Code:
--------------------
    
  # Now into the fun, we have checked that we should be active and done checks 
for shuffle and various "noise".
  my $quicksong = Slim::Player::Playlist::url($client);.
  if ($quicksong =~ m/.pls/i || $quicksong=~ m/http:/i || $quicksong=~ m/.asx/i 
|| $quicksong=~ m/rtmp:/i || $qu
  return;.
  }
  
  # -----> i just added this to check if a Dynamicplalist is active or not 
<--------
  my $playlist = undef;
  if(UNIVERSAL::can("Plugins::DynamicPlayList::Plugin","getCurrentPlayList")) {
  no strict 'refs';
  $playlist = eval { 
&{"Plugins::DynamicPlayList::Plugin::getCurrentPlayList"}($client) };
  if ($@) {
  $log->error("Error calling DynamicPlaylist plugin: $...@\n");
  }
  use strict 'refs';
  }
  $log->debug("Playlist: $playlist\n");
  
  if (! $playlist == "" ){
  return;}
  # If there is a playlist avail from DynamicPlaylists, Sugarcube won't add a 
song
  # <-------------------------------------->
  $sugarclients{$client} = $client;                                             
  # Store $client.
  getmyNextSong($client);                 # Refresh UpNext Details.
  Slim::Utils::Timers::killTimers(undef, \&SugarPlayerCheck); #Paranoia check.
  
--------------------


-- 
mr_hyde

2 x Squeezebox 3 - SSOTS 4.1 - Squeezecenter 7.4.2 - QNAP TS439 Pro
(3.2.0_1127T) - 4 x 500 GB Hitachi (RAID5)
------------------------------------------------------------------------
mr_hyde's Profile: http://forums.slimdevices.com/member.php?userid=6032
View this thread: http://forums.slimdevices.com/showthread.php?t=73988

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

Reply via email to