summaryrefslogtreecommitdiffstats
path: root/lib/class/tmpplaylist.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class/tmpplaylist.class.php')
-rw-r--r--lib/class/tmpplaylist.class.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/class/tmpplaylist.class.php b/lib/class/tmpplaylist.class.php
index 050d6211..a0654a2a 100644
--- a/lib/class/tmpplaylist.class.php
+++ b/lib/class/tmpplaylist.class.php
@@ -1,7 +1,7 @@
<?php
/*
- Copyright (c) 2001 - 2007 Ampache.org
+ Copyright (c) Ampache.org
All rights reserved.
This program is free software; you can redistribute it and/or
@@ -213,8 +213,11 @@ class tmpPlaylist {
$id = Dba::insert_id();
- /* Prune dead tmp_playlists */
- self::prune_playlists();
+ $do_prune = rand(0,4);
+ if ($do_prune%2) {
+ self::prune_playlists();
+ self::prune_tracks();
+ }
/* Clean any other playlists assoicated with this session */
self::delete($sessid,$id);