1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00

avoid duplicated lives

This commit is contained in:
Daniel 2022-01-15 16:56:08 -03:00
parent 755dac6353
commit f77d1b0acf

View file

@ -515,6 +515,12 @@ class LiveTransmitionHistory extends ObjectYPT {
$this->finished = 'NULL'; $this->finished = 'NULL';
} }
$activeLive = self::getActiveLiveFromUser($this->users_id, $this->live_servers_id, $this->key);
if(!empty($activeLive)){
$this->id = $activeLive['id'];
}
return parent::save(); return parent::save();
} }