From d93b37285e6ac8c52254e0dc550e0b798f490fbd Mon Sep 17 00:00:00 2001 From: Cecil Hugh Watson Date: Thu, 30 Jul 2009 22:49:20 -0700 Subject: Myt2XviD3:Added archive.php to allow for the deletion of unwanted videos. --- abs/extra-testing/myt2xvid3/PKGBUILD | 5 +- abs/extra-testing/myt2xvid3/archive.php | 159 ++++++++++++++++++++++++++ abs/extra-testing/myt2xvid3/myt2xvid3.install | 10 +- 3 files changed, 164 insertions(+), 10 deletions(-) create mode 100644 abs/extra-testing/myt2xvid3/archive.php diff --git a/abs/extra-testing/myt2xvid3/PKGBUILD b/abs/extra-testing/myt2xvid3/PKGBUILD index ee20990..231d0b3 100755 --- a/abs/extra-testing/myt2xvid3/PKGBUILD +++ b/abs/extra-testing/myt2xvid3/PKGBUILD @@ -1,18 +1,19 @@ pkgname=myt2xvid3 pkgver=0.1 -pkgrel=1 +pkgrel=2 arch=("i686") pkgdesc="A multimedia framework based on the MPEG-4 Systems standard" url="http://www.knoppmythwiki.org/index.php?page=XvidEncoding" depends=('nuvexport') install="myt2xvid3.install" -source=( myt2xvid3 myt2xvid3-userjob.sh) +source=( myt2xvid3 myt2xvid3-userjob.sh archive.php) build() { cd $startdir/src install -D -m 755 myt2xvid3 $startdir/pkg/usr/bin/myt2xvid3 install -D -m 755 myt2xvid3-userjob.sh /$startdir/pkg/usr/bin/myt2xvid3-userjob.sh + install -D -m 755 archive.php /myth/video/archive/archive.php } diff --git a/abs/extra-testing/myt2xvid3/archive.php b/abs/extra-testing/myt2xvid3/archive.php new file mode 100644 index 0000000..f970868 --- /dev/null +++ b/abs/extra-testing/myt2xvid3/archive.php @@ -0,0 +1,159 @@ + + + + + MythWeb - Archive Recordings + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +'; + } +} + $i=1; + foreach (glob("*.XviD.xml") as $file) { + $lines = file($file); + echo '".''.""; + $i++; + } +//} + +function filesizeparse($size){ + $i=0; + $iec = array(" B", " KB", " MB", " GB", " TB"); + while (($size/1024)>1) { + $size=$size/1024; + $i++; + } + return substr($size,0,strpos($size,'.')+3).$iec[$i]; +} +?> +
View and delete recordings transcoded to XviD via Myt2XviD3.
+ '; + echo $delete; + unlink($delete) or print(" failed to be "); + echo ' has been deleted, '; + $deletetoo = substr($delete, 0, -3)."avi"; + echo $deletetoo; + unlink($deletetoo) or print(" failed to be "); + echo ' has been deleted.'; + echo'
 '; + echo ''.$i.''; + echo "".strip_tags($lines[1])."".strip_tags($lines[7])."".strip_tags($lines[6])."".filesizeparse(filesize(substr($file, 0, -3)."avi"))."".'Delete'." 
+ + diff --git a/abs/extra-testing/myt2xvid3/myt2xvid3.install b/abs/extra-testing/myt2xvid3/myt2xvid3.install index abc4256..f363fa2 100755 --- a/abs/extra-testing/myt2xvid3/myt2xvid3.install +++ b/abs/extra-testing/myt2xvid3/myt2xvid3.install @@ -18,21 +18,15 @@ post_install() { ln -s /myth/video/archive /data/srv/httpd/htdocs/archive mv /usr/bin/myt2xvid3 /tmp sed -e "s/REPLACEME/$HOSTNAME/g" /tmp/myt2xvid3 > /usr/bin/myt2xvid3 - - + chown -R mythtv:http /myth/video/archive } post_upgrade() { - - - mkdir /myth/video/archive - chown mythtv:users /myth/video/archive - ln -s /myth/video/archive /data/srv/httpd/htdocs/archive /usr/bin/myth2xvid -rebuild } post_remove() { - post_install + rm -fr /data/srv/http/htdocs/archive } op=$1 -- cgit v0.12