Results 1 to 3 of 3

Thread: Automatically delete Original videos

  1. #1

    Default Automatically delete Original videos

    Small mod to delete original videos after processing and update the process queue, just to tidy the database up a little and increase performance

    Name the file as cron_delete_original.php, and upload it to your video directory (http://site.com/video/) Then set cronjob to run once a day, thats all youll need

    Code:
    <?php
    require_once( "../include/config.php" );
    
    $result = mysql_query("SELECT file, status FROM process_queue WHERE status= '5'") or die(mysql_error());
    
    while($row = mysql_fetch_array( $result )) {
    
    unlink($row['file']);
    
    $sql = "DELETE FROM process_queue WHERE file='".$row['file']."'";
    mysql_query($sql) or die(mysql_error());
    
    }
    ?>

  2. #2
    Join Date
    Dec 2008
    Posts
    152

    Default Re: Automatically delete Original videos

    Very useful. Thanks for sharing

  3. #3
    Join Date
    Jul 2008
    Location
    United Kingdom
    Posts
    30

    Default Re: Automatically delete Original videos

    I was looking for something like this a while ago

    thanks for sharing :D

Similar Threads

  1. Replies: 2
    Last Post: 12-12-2008, 05:21 PM
  2. Delete all videos in dir video?
    By ramius in forum General Discussions
    Replies: 3
    Last Post: 03-04-2008, 10:36 PM
  3. Settings To Get Videos To Play Automatically
    By apj5621 in forum Fixed Bugs
    Replies: 1
    Last Post: 10-15-2007, 08:29 PM
  4. User can't able to delete his videos
    By letview in forum Feature Requests
    Replies: 1
    Last Post: 08-24-2007, 02:29 PM
  5. Delete original upload/converted files
    By Philthy in forum Feature Requests
    Replies: 11
    Last Post: 06-27-2007, 06:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •