Announcement

#1 2017-01-05 15:25:36

ClintDanbury
Member
2016-12-20
21

First Attempt At Simulated Synchronization

Okay, I copied a tree of subdirectories to the galleries subdirectory, and tried my first Synchronization with the simulation box ticked.

The results are pasted in below.

Does this look about right in the eyes of the experts in this community ?


Code:

Database Synchronization With Files: ./Galleries/
[Simulation] Search for new images in the directories

26 albums added in the database
7433 photos added in the database
0 albums deleted in the database
0 photos deleted from the database
0 photos updated in the database
2382 errors during synchronization
[Simulation] Metadata synchronization results

0 photos' information synchronized with files metadata
0 photos candidates for metadata synchronization
Metadata used : filesize, width, height, date_creation, latitude, longitude
List of errors

The list of 2382 errors will be left out.

It's pretty obvious that the problem is blank spaces in the name of each file.  Screwed up in the nomenclature.

That correction is my homework assignment.

As for the rest, do these results look correct ?



===================ENVIRONMENT==============
Piwigo version: 2.8.3
PHP version: PHP: 5.5.36  [2016-12-20 16:27:32]
MySQL version: MySQL: 5.5.45-cll-lve [2016-12-20 16:27:32]
Piwigo URL: http://clintdanbury.info/pics/leaves/

Offline

 

#2 2017-01-05 17:46:47

reddn
Member
DC, USA
2015-09-29
30

Re: First Attempt At Simulated Synchronization

Spaces are allowed, there must be another character that is not allowed.  Post one example.

Offline

 

#3 2017-01-05 18:32:54

flop25
Piwigo Team
2006-07-06
7037

Re: First Attempt At Simulated Synchronization

reddn wrote:

Spaces are allowed, there must be another character that is not allowed.  Post one example.

nope by default no space is allowed ([Github] Piwigo file include/config_default.inc.php@L782) but _ are converted into space automatically


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#4 2017-01-05 19:33:01

ClintDanbury
Member
2016-12-20
21

Re: First Attempt At Simulated Synchronization

reddn wrote:

Post one example

flop25 wrote:

"...no space is allowed..."

"...but _ are converted into space automatically..."

Duh.

The (wrong) file names have hyphens, spaces, and underscore characters

Code:

2016-10-17-04-31-57 -- DSC_0638.JPG

I'm going to have to request shell access from my hosting company (they're okay with it, just being cautious; hardly blame them) so that I can run some command line stuff to fix the names.

I'm thinking that I'll just change all spaces to hyphens, and I suppose I'll change the underscore characters to hyphens as well.

Advice on that plan is welcome and requested.

Offline

 

#5 2017-01-05 21:41:31

reddn
Member
DC, USA
2015-09-29
30

Re: First Attempt At Simulated Synchronization

flop25 wrote:

reddn wrote:

Spaces are allowed, there must be another character that is not allowed.  Post one example.

nope by default no space is allowed ([Github] Piwigo file include/config_default.inc.php@L782) but _ are converted into space automatically

Geez, file Nazi's.  Of all characters to not allow, that should be one to allow.

Turns out I added this in my LocalConfigEditor (under plugins) to allow for spaces in my file names.

Code:

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

I personally do not remember changing the regex, but piwigo works just fine for me.

Note: I also use VideoJS with its synchronized feature using both mediainfo and ffmpeg (get a poster, and I add the film roll edges).  It works with all of my video's, even ones that have spaces.


Clint, maybe you should change your allowed characters to allow for spaces.  I have not had any problems but that doesn't mean you won't.

Last edited by reddn (2017-01-05 21:48:32)

Offline

 

#6 2017-01-06 00:54:12

ClintDanbury
Member
2016-12-20
21

Re: First Attempt At Simulated Synchronization

So I change one line in the config file (whatever that is) and I don't have to worry about screwing up a thousand others ?

I will be Considering that carefully.

Offline

 

#7 2017-01-06 02:04:09

reddn
Member
DC, USA
2015-09-29
30

Re: First Attempt At Simulated Synchronization

ClintDanbury wrote:

So I change one line in the config file (whatever that is) and I don't have to worry about screwing up a thousand others ?

I will be Considering that carefully.

Yep.  But if it messes something up, you can go back start from scratch, which is where you are now anyway.

If you want to do it goto Admin > Plugins > (left dock) LocalFiles Editor >  and add the above code on the line above the '?>'


Here is my LocalFiles Editor

Code:

<?php

/* The file does not exist until some information is entered 
below. Once information is entered and saved, the file will be created. */

 $conf['smtp_host']='smtp.gmail.com';  // Notice I didn't indicate the port
$conf['smtp_port']='587';
$conf['smtp_user']='***@***.com';
$conf['smtp_password']='******';
$conf['smtp_secure']='tls'; // you can put ssl instead

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

$conf['newcat_default_status'] = 'private';
?>

Offline

 

#8 2017-01-06 09:13:14

flop25
Piwigo Team
2006-07-06
7037

Re: First Attempt At Simulated Synchronization

reddn wrote:

ClintDanbury wrote:

So I change one line in the config file (whatever that is) and I don't have to worry about screwing up a thousand others ?

I will be Considering that carefully.

Yep.  But if it messes something up, you can go back start from scratch, which is where you are now anyway.

no you just have to use your FTP access to edit it again

reddn wrote:

Here is my LocalFiles Editor

Code:

<?php

/* The file does not exist until some information is entered 
below. Once information is entered and saved, the file will be created. */

 $conf['smtp_host']='smtp.gmail.com';  // Notice I didn't indicate the port
$conf['smtp_port']='587';
$conf['smtp_user']='***@***.com';
$conf['smtp_password']='******';
$conf['smtp_secure']='tls'; // you can put ssl instead

$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';

$conf['newcat_default_status'] = 'private';
?>

here sync_chars_regex is what you need


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#9 2017-01-06 17:11:03

newts
Member
Newt Hampshire
2017-01-06
4

Re: First Attempt At Simulated Synchronization

A slight tangent, if you get shell access or before you upload again I found the detox program to be handy:

https://linux.die.net/man/1/detox

I also modified my default detoxrc to remove ~ as well.

jv

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact