Revert "Added more MP4 Suport"

This reverts commit 2c7df929c2
This commit is contained in:
Yukimi Kazari 2017-01-04 04:49:27 -05:00
parent 6bd42a4f8e
commit 45635467ee
3 changed files with 6 additions and 6 deletions

View File

@ -43,7 +43,7 @@ abstract class Post_ImageStore_Base
{
if (is_file($this->file_path()))
@unlink($this->file_path());
if ($this->_post->image() or $this->_post->video()) {
if ($this->_post->image()) {
if (file_exists($this->preview_path()))
@unlink($this->preview_path());
if (file_exists($this->sample_path()))
@ -64,7 +64,7 @@ abstract class Post_ImageStore_Base
// chmod($this->file_path(), 0777);
if ($this->_post->image() or $this->_post->video()) {
if ($this->_post->image()) {
$this->_create_dirs($this->preview_path());
rename($this->_post->tempfile_preview_path(), $this->preview_path());
// chmod($this->preview_path(), 0777);

View File

@ -16,7 +16,7 @@ class Post_ImageStore_LocalFlat extends Post_ImageStore_Base
public function preview_path()
{
if ($this->_post->image() or $this->_post->video())
if ($this->_post->image())
return Rails::root() . "/public/data/preview/".$this->_post->md5.".jpg";
else
return Rails::root() . "/public/download-preview.png";
@ -31,7 +31,7 @@ class Post_ImageStore_LocalFlat extends Post_ImageStore_Base
{
if ($this->_post->status == "deleted")
return CONFIG()->url_base . "/deleted-preview.png";
elseif ($this->_post->image() or $this->_post->video())
elseif ($this->_post->image())
return CONFIG()->url_base . "/data/preview/".$this->_post->md5.".jpg";
else
return CONFIG()->url_base . "/download-preview.png";

View File

@ -16,7 +16,7 @@ class Post_ImageStore_LocalHierarchy extends Post_ImageStore_Base
public function preview_path()
{
if ($this->_post->image() or $this->_post->video())
if ($this->_post->image())
return Rails::root() . "/public/data/preview/" . $this->_file_hierarchy() . "/" .$this->_post->md5.".jpg";
else
return Rails::root() . "/public/download-preview.png";
@ -31,7 +31,7 @@ class Post_ImageStore_LocalHierarchy extends Post_ImageStore_Base
{
if ($this->_post->status == "deleted")
return CONFIG()->url_base . "/deleted-preview.png";
elseif ($this->_post->image() or $this->_post->video())
elseif ($this->_post->image())
return CONFIG()->url_base . "/data/preview/".$this->_post->md5.".jpg";
else
return CONFIG()->url_base . "/download-preview.png";