scratchpad only reloads active playlist, not entire contents.

This commit is contained in:
naomiaro 2010-09-22 10:51:41 -04:00
parent a3e8e41f33
commit dbd44da1ad
2 changed files with 13 additions and 3 deletions

View File

@ -225,7 +225,7 @@ class uiPlaylist
}
}
$this->Base->SCRATCHPAD->reloadMetadata();
$this->Base->SCRATCHPAD->reloadActivePLMetadata($this->activeId);
return TRUE;
} // fn addItem
@ -253,7 +253,7 @@ class uiPlaylist
}
}
$this->Base->SCRATCHPAD->reloadMetadata();
$this->Base->SCRATCHPAD->reloadActivePLMetadata($this->activeId);
return TRUE;
} // fn removeItem

View File

@ -241,7 +241,6 @@ class uiScratchPad
*/
public function reloadMetadata()
{
$_SESSION['pl'] = $this->items;
foreach ($this->items as $key => $val) {
if($val['type'] === 'playlist')
$this->items[$key] = $this->Base->getPLMetaInfo($val['id']);
@ -249,5 +248,16 @@ class uiScratchPad
$this->items[$key] = $this->Base->getMetaInfo($val['id']);
}
}
public function reloadActivePLMetadata($id)
{
foreach ($this->items as $key => $val) {
if($val['id'] === $id) {
$this->items[$key] = $this->Base->getPLMetaInfo($val['id']);
return;
}
}
}
} // class uiScratchPad
?>