Ever wanted to bulk update your photo gallery movie size?

Ever wanted to bulk update your photo gallery movie size? Now you can.

Gallery2 - LogoPlease note: this article is for the users who has gallery2 php photo gallery installed with mysql database. you should have access to database and filesystem to be able to use this script.

I have gallery installed and I upload both photos and videos to my albums. Videos are usually in FLV format so that user can stream the video over net and it consumes less space than regular movie item.
Problem was whenever I upload a video file, I had to manually update the movie size each time. Which is time consuming and boaring if you have 100s of videos to edit and update. So, I decided to make my own automated tool to update the sizes of movie of particular mime type.

This tool is tested and I use it for my personal use. If you are interested, you are free to use it, but use it at your own risk. Even though there is very less chances that you might get into trouble for this. I will recommend you to backup your database before you run this script.login screen

I used very simple interface to perform this automated task. This is fairly simple task, I didn't see any need to have fancy look to the interface. For security reason, you need to log in first.

after login screen
After login, you'll be presented number of records that does not have size defined along with their id. If there is record that needs to be updated, just press the [Process] button/link and you are done.

Enough talk, download the script from here and follow the instructions.

Note: Please clear your database cache from galley administration > maintenance section to reflect the database updates.

© Hossain Khan - Some rights reserved.
Creative Commons License This site is licensed under a Creative Commons Attribution-Noncommercial 2.5 License.