scratchpad only reloads active playlist, not entire contents.
This commit is contained in:
parent
a3e8e41f33
commit
dbd44da1ad
|
@ -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
|
||||
|
|
|
@ -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
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue