Index: Slim/Control/Command.pm =================================================================== --- Slim/Control/Command.pm (revision 5794) +++ Slim/Control/Command.pm (working copy) @@ -797,7 +797,7 @@ my $title = $p2; my $playlistObj = $ds->updateOrCreate({ - 'url' => Slim::Utils::Misc::fileURLFromPath( + 'url' => Slim::Utils::Misc::fileURLFromPath( catfile(Slim::Utils::Prefs::get('playlistdir'), $title . '.m3u') ), 'attributes' => { @@ -806,7 +806,7 @@ }, }); - my $annotatedList; + my $annotatedList = []; if (Slim::Utils::Prefs::get('saveShuffled')) { Index: Slim/Player/Playlist.pm =================================================================== --- Slim/Player/Playlist.pm (revision 5794) +++ Slim/Player/Playlist.pm (working copy) @@ -109,6 +109,23 @@ if (defined($repeat)) { $client->prefSet("repeat", $repeat); + + # Check the buffers for the client and reset based on repeat change + foreach my $everyclient ($client, Slim::Player::Sync::syncedWith($client)) { + + if ($everyclient->playmode() =~ /playout/) { + + if ($repeat) { + + # changing to repeat all or one, set to continue playback + $everyclient->playmode('playout-play'); + } else { + + # repeat off, set to stop at end of track + $everyclient->playmode('playout-stop'); + } + } + } } return $client->prefGet("repeat"); @@ -581,9 +598,15 @@ # This can happen if the user removes the # playlist - because this is a closure, we get # a bogus object back) - unless ($playlistObj->can('tracks')) { + if (!$playlistObj->can('tracks')) { return 0; } + + if ($playlistObj->title eq $client->string('UNTITLED')) { + + $::d_playlist && msg("Not writing out untitled playlist.\n"); + return 0; + } Slim::Formats::Parse::writeM3U( [ $playlistObj->tracks ], Index: Slim/Web/EditPlaylist.pm =================================================================== --- Slim/Web/EditPlaylist.pm (revision 5871) +++ Slim/Web/EditPlaylist.pm (working copy) @@ -243,14 +243,9 @@ $existingPlaylist = undef; } - $ds->updateOrCreate({ - 'url' => $playlistObj, - 'attributes' => { - 'url' => $newUrl, - 'title' => $newName, - }, - 'commit' => 1, - }); + $playlistObj->set('url', $newUrl); + $playlistObj->set('title', $newName); + $playlistObj->update; Slim::Player::Playlist::scheduleWriteOfPlaylist($client, $playlistObj); }