Index: IR/Default.map =================================================================== --- IR/Default.map (revision 24437) +++ IR/Default.map (working copy) @@ -59,7 +59,7 @@ power_off = power_off power_on = power_on add.single = add -add.hold = zap +add.hold = dead sleep.single = sleep sleep.hold = sleep snooze.single = snooze @@ -155,6 +155,9 @@ [home] arrow_left.hold = dead +[playlist] +add.hold = zap + [off] # When the player is powered off, most buttons are dead play.single = modefunction_off->play @@ -328,7 +331,7 @@ play.single = done play.hold = done add.single = done -add.hold = done +add.hold = zap pause = done_passback stop = done_passback knob = done Index: Slim/Buttons/Common.pm =================================================================== --- Slim/Buttons/Common.pm (revision 24459) +++ Slim/Buttons/Common.pm (working copy) @@ -1223,6 +1223,25 @@ $client->pushRight(); } }, + + 'zap' => sub { + my $client = shift; + + if (Slim::Player::Playlist::count($client) > 0) { + + # we zap the displayed song in playlist mode and playing song in all others + my $index = mode($client) eq 'playlist' ? Slim::Buttons::Playlist::browseplaylistindex($client) : + Slim::Player::Source::playingSongIndex($client); + + $client->showBriefly( { + 'line' => [ $client->string('ZAPPING_FROM_PLAYLIST'), + Slim::Music::Info::standardTitle($client, Slim::Player::Playlist::song($client, $index)) ] + }, {'firstline' => 1, block => 1 } + ); + + $client->execute(["playlist", "zap", $index]); + } + }, ); sub getFunction { Index: Slim/Buttons/Playlist.pm =================================================================== --- Slim/Buttons/Playlist.pm (revision 24459) +++ Slim/Buttons/Playlist.pm (working copy) @@ -238,23 +238,6 @@ } }, - 'zap' => sub { - my $client = shift; - my $zapped = catfile($prefs->get('playlistdir'), $client->string('ZAPPED_SONGS') . '.m3u'); - - if (Slim::Player::Playlist::count($client) > 0) { - - $client->showBriefly( { - 'line' => [ $client->string('ZAPPING_FROM_PLAYLIST'), Slim::Music::Info::standardTitle($client, - Slim::Player::Playlist::song($client, browseplaylistindex($client))) ] - }, { - 'firstline' => 1 - }); - - $client->execute(["playlist", "zap", browseplaylistindex($client)]); - } - }, - 'play' => sub { my $client = shift;