This question is answered.


Permlink Replies: 20 - Pages: 2 [ Previous | 1 2 ] - Last Post: 6 Oct 24, 18:22 Last Post By: RobM Threads: [ Previous | Next ]
RobM

Posts: 3,847
Registered: 4-Aug-2006
Re: One picture of 2430 ist missing every second time the album is created
Posted: 2 Oct 24, 12:36   in response to: fodohgraf in response to: fodohgraf
 
  Click to reply to this thread Reply
Great. I might update the tool to show more information when it completes, so if no duplicate is found you don’t need to look in the system console.

The chance are you will remember about duplication of base file names and not need to use it in new projects.
fodohgraf

Posts: 35
Registered: 18-Dec-2012
Re: One picture of 2430 ist missing every second time the album is created
Posted: 2 Oct 24, 17:49   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM,
I've tested your great script on another album, where it detected duplicate base file names. This was completely correct on file system level. In this case I had a JPG and a PNG version of the same picture, but one of them was excluded. As far as I understand the issue this should not be a problem as it does not lead to a duplicate file in the album directory.

Therefore I made a small modification to your script by adding a check if the file is included. This avoided the detection of this situation.
Another two small changes based on my personal taste: First, I removed the question at the beginning of the script if it really shall be executed. Second, I added an output to console when the script is started ans has ended.

I attached the script with my small modifications.
RobM

Posts: 3,847
Registered: 4-Aug-2006
Re: One picture of 2430 ist missing every second time the album is created
Posted: 2 Oct 24, 18:16   in response to: fodohgraf in response to: fodohgraf
 
  Click to reply to this thread Reply
I left excluded images in the checklist for several reasons. It could be one is used as a theme image and the other as part of the album, I don’t know what effect that would have. A user may have temporarily excluded the object, but intends to use it later on. A skin may have a script function that uses getDescendants(), that can include excluded objects.

By checking all files a user can always decide if a file does need renaming or not. But if the change you made is what you want go for it.

I normally include a start message for two reasons, so the users knows the script is running and it gives them a chance to exit without running it, should they have accidentally picked the wrong tool. I also usually have a script completed message, some of my tools can take a while to run, for exemple making a video from the images in a folder/project.

Glad you have a solution that works for you. :)
JeffTucker

Posts: 8,227
Registered: 31-Jan-2006
Re: One picture of 2430 ist missing every second time the album is created
Posted: 2 Oct 24, 18:40   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I'd vote for ignoring the excluded stuff all the time.

The case I'm thinking of is a folder that has both the RAW and JPG versions of the same images, and the user has bulk excluded the RAW ones. You really would want to ignore the excluded items. (ETA: And that's the one case in which a camera will crank out image files with the same base name.)

Skins almost universally ignore excluded items, and theme images are usually given a skin-specific name in the output, so I wouldn't worry about those cases.
RobM

Posts: 3,847
Registered: 4-Aug-2006
Re: One picture of 2430 ist missing every second time the album is created
Posted: 2 Oct 24, 19:23   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
I’ll have a think about that, I could ignore RAW & JPG, they should only really appear if jAlbum has processed the RAW files. The problem is I’m lazy and checking for all RAW file formats would be tedious.



OK. I’ve had a think and I will ignore excluded objects, it is the path of least resistance. :)
RobM

Posts: 3,847
Registered: 4-Aug-2006
Re: One picture of 2430 ist missing every second time the album is created
Posted: 6 Oct 24, 18:22   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
I've made a generalised tool with the output enclosed by 'start' and 'stop' messages. It also has a settings window that has boxes for check excluded objects, ignore filename case (for OS's that are not case sensitive) and a 'show settings window'. If the last one is unchecked the tool runs without confirmation/settings windows and 'tool completed
popup window. The status bar shows when the tool has finished.

If interested the new version is at https://jalbum.net/forum/thread.jspa?threadID=59945&tstart=0
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums