Server Add Skip Existing Files (autosync sort of)

enone

Joined: 2012-01-30
Posts: 10
Posted: Wed, 2013-01-30 00:34

Hi All,

I'm Using G3 Fine, I've About 250.000+ Images To Add Sorted On 5 Folders...

If On My "Folder 1" I Start "Server Add" Module Adding Images I Must Keep
The Page Opened Until The Job Is Finished...

I Also Know That If I Close That Window / Or The Program Crash / Or The PC
Reboot For Some Unknown Reason I Must Go In Maintenance Area And Resume It

...But... What Happen If I Can't Resume The Job??

If I Reselect The Same "Folder 1" Server Add Can Skip Existing Files
Already Imported On Dbase? Or It Start Again From Scratch?

Also It's Possible To Generate The Little Thumbnails From Resized Images
Instead Using Original One?

It's Possible To Select The JPG Quality Of Generated Images (resize/thumb) To
Speed Up The Process?

Thanks In Advance...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2013-01-30 03:32
Quote:
If On My "Folder 1" I Start "Server Add" Module Adding Images I Must Keep
The Page Opened Until The Job Is Finished...

That is by design. We have to work in various environments and had to be robust as we could. In some environments the task would just be halted without notice. We have made it robust enough so that the task can be restarted. It should start where it left off.

@jpg quality: There is 2 advance settings: image_sharpen and image_quality adjust as needed.
There is also a new module that has some lossless image translation.

Dave
____________________________________________
Blog & G2 || floridave - Gallery Team

 
enone

Joined: 2012-01-30
Posts: 10
Posted: Thu, 2013-01-31 00:23

Thanks For The Kindly Reply Dave...

I've Set
- image_quality: 75
- image_sharpen 15

Also Disabled Exif_GPS Module
And Now The "Server Add" Process Is A Bit More Faster...

My Question Is Still Valid Since I've Done A Little Test And I've Found That "Add Server" Every Time I Try To Add The Same Folder It Create Another One With Strange String Of Numbers... test > become > test-1469080385

A Little Easy Example So You Can Try Yourself To Replicate The Problem:

1) Go In Your FTP Server In /var/upload/ folder
2) Create A "test" Folder
3) Create "1" Folder
4) Create "2" Folder
5) Create "3" Folder
6) Put An Image Inside Folder "1" "2" "3"
7) Do A "Server Add" And Select "test" Folder So Then You Can See The 3 Images In Your Gallery Inside The 3 Folders All Fine And Working As Expected! Until Now Right! :)
8) Now In FTP Create A Folder "4" in "test" Folder And A "1" Folder Inside "3" Folder Already Existing
9) Put An Image In The Two Folder Just Created
10) Import Again The "temp" Folder With "Server Add"

You Can Now See Tho Gallery Named "temp"! The Old One With "1" "2" "3" Folders And The New One With
"1" "2" "3" "4" Folders And "1" Inside "3" ...It's More Easy To Try And See ;) Than Write ehehe...

So Basically "Server Add" Is Unable To Sync An Already Existing Album And Subfolders...

Is There A Modified Version Of "Server Add" Able To sync/update The Gallery Without Recreate From Ground Zero
The Entire Folder/Subfolders Album? I Mean A "Server Add" Version That Can Also Check If An Image Is Already
Present On The /album Repository Folder / dBase
And Skip It? Or Ask To Replace The Image (maybe showing the old and new step by step so you can choose what to keep)?

When You Have More Than 200.000 Photos It's An Inhuman Task To Do!
I'll Like To Have An /upload Folder Well Organized By Hand By Me And Some Other Peoples And Then A Tool
That Can Import The New Folders And Images Inside The Gallery And Add New Folders If I Put New Folders
Inside An Album!

Thanks In Advance...

If You Need A Video Tutorial I Can Record It So You Can See What I Mean...

PS: I Don't Know If It's Considered A Bug Or A New Feature...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Thu, 2013-01-31 04:45

The server add module works as you describe and was designed that way.
Perhaps the http://codex.galleryproject.org/Gallery3:Modules:folder_sync is the module you are after?

If that is not what you are after then you would have to modify your steps 8+ to not use the sub albums as well.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
enone

Joined: 2012-01-30
Posts: 10
Posted: Tue, 2013-02-05 17:47

Thanks For The Answer Dave...

I've Understand Why "is by design" Anyway What Happen If I Add More Folder On /var/upload/folder1?

How Can I Insert New Images In An Already Existing Folder And Have Them Added To The Same Gallery Respecting Also Folder Structure?

...So We Cannot Change/Improve The "design"? :D

Unfortunately I'm Unable To Run Folder_sync Cron Script... Seems My ISP Don't Permit To Run Them, This Is The Only Solution I Have? :(

No One Have Had These Problems? All People Upload One Image At A Time And Never Add Some More Images To An Already Existing Gallery/Folder? :)

Later...

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-02-05 20:12
Quote:
I've Understand Why "is by design" Anyway What Happen If I Add More Folder On /var/upload/folder1?

maintain the same folder structure and remove items from the source folder or only add the items you want.
Yes the UI is not 100% in knowing that you can use Ctrl-Click to select different items in the tree. Deselect the items you have already added.

Quote:
How Can I Insert New Images In An Already Existing Folder And Have Them Added To The Same Gallery Respecting Also Folder Structure?

point server add to the existing folder in the structure and only select the items you have not added yet. If they are in sub-albums then you will have to extend your work flow to doing one album at a time if the albums already exist.

Quote:
So We Cannot Change/Improve The "design"?

Sure it is a community open source project. Anybody can enhance improve or replace the existing design. If you don't have the skills to do so you have a few options:
Wait for somebody to do it for you, find somebody to do it for you, hire somebody to do it for you and give back to the community.

Quote:
Unfortunately I'm Unable To Run Folder_sync Cron Script... Seems My ISP Don't Permit To Run Them, This Is The Only Solution I Have?

A better host? Manually run the task as a webpage or some other method. I have not used the module but I suspect that it could be done manually by visiting a custom page.

Quote:
No One Have Had These Problems?

I bet there has, but they have found work-rounds or have developed different work flows for adding items or use the folder_sync module. I think that is really what you are after.

Quote:
All People Upload One Image At A Time And Never Add Some More Images To An Already Existing Gallery/Folder?

I use the server add module as well as other upload methods to existing albums and new albums/sub-albums. I'm probably like most people, use different methods for different quantities/albums/workflows/location/....

If you are having issues finding duplicate images the community has provided a module for that as well:
http://codex.galleryproject.org/Gallery3:Modules:dupcheck

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team