RenderPlaylist open/check/close dummy methods fixed
This commit is contained in:
parent
8ce6d73142
commit
eca221f37c
|
@ -798,9 +798,10 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileOpen($sessid, $plid)
|
function renderPlaylistToFileOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"LocStor::renderPlaylistToFileOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -813,8 +814,16 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileCheck($token)
|
function renderPlaylistToFileCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::renderPlaylistToFileCheck: not implemented"
|
"LocStor::renderPlaylistToFileCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$fakeFUrl = $this->getUrlPart()."access/$token.ogg";
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'url' => $fakeFUrl,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,10 +835,15 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToFileClose($token)
|
function renderPlaylistToFileClose($token)
|
||||||
{
|
{
|
||||||
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::renderPlaylistToFileClose: not implemented"
|
"LocStor::renderPlaylistToFileClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
unlink($fakeFile);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -841,9 +855,10 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToStorageOpen($sessid, $plid)
|
function renderPlaylistToStorageOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"LocStor::renderPlaylistToStorageOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -856,8 +871,16 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToStorageCheck($token)
|
function renderPlaylistToStorageCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.ogg";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::renderPlaylistToStorageCheck: not implemented"
|
"LocStor::renderPlaylistToStorageCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
unlink($fakeFile);
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'gunid' => '0000000000010001',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -871,9 +894,10 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSOpen($sessid, $plid)
|
function renderPlaylistToRSSOpen($sessid, $plid)
|
||||||
{
|
{
|
||||||
return PEAR::raiseError(
|
$token = '123456789abcdeff';
|
||||||
"LocStor::renderPlaylistToRSSOpen: not implemented"
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
);
|
file_put_contents($fakeFile, "fake renderred file");
|
||||||
|
return array('token'=>$token);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -886,8 +910,16 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSCheck($token)
|
function renderPlaylistToRSSCheck($token)
|
||||||
{
|
{
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
|
if($token != '123456789abcdeff' || !file_exists($fakeFile)){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::renderPlaylistToRSSCheck: not implemented"
|
"LocStor::renderPlaylistToRSSCheck: invalid token ($token)"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
$fakeFUrl = $this->getUrlPart()."access/$token.rss";
|
||||||
|
return array(
|
||||||
|
'status'=> 'success',
|
||||||
|
'url' => $fakeFUrl,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -899,10 +931,15 @@ class LocStor extends BasicStor{
|
||||||
*/
|
*/
|
||||||
function renderPlaylistToRSSClose($token)
|
function renderPlaylistToRSSClose($token)
|
||||||
{
|
{
|
||||||
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::renderPlaylistToRSSClose: not implemented"
|
"LocStor::renderPlaylistToRSSClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
$fakeFile = "{$this->accessDir}/$token.rss";
|
||||||
|
unlink($fakeFile);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*================================================= storage admin methods */
|
/*================================================= storage admin methods */
|
||||||
|
@ -957,7 +994,7 @@ class LocStor extends BasicStor{
|
||||||
{
|
{
|
||||||
if($token != '123456789abcdeff'){
|
if($token != '123456789abcdeff'){
|
||||||
return PEAR::raiseError(
|
return PEAR::raiseError(
|
||||||
"LocStor::createBackupCheck: invalid token"
|
"LocStor::createBackupClose: invalid token"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
$fakeFile = "{$this->accessDir}/$token.tar";
|
$fakeFile = "{$this->accessDir}/$token.tar";
|
||||||
|
|
Loading…
Reference in New Issue