Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
"Add same location to all.bsh" -> fails with videos
Posted:
26 Oct 22, 18:26
|
|
|
Hi,
the tool Add same location to all.bsh fails, if there is a video in the folder to be processed. java.lang.NullPointerException: Null Pointer in Method Invocation of getGpsLocation() on variable: xm in Add same location to all.bsh at line number 93
I assume that this is wrong: } else if (cat == Category.image || cat == Category.video || cat == Category.audio || cat == Category.other) {
If I understand that code right, then the following code is executed if the file is an image or a video or an audio file or another file. As far as I know only picture files are able to "store" location data.
Anyway, can someone please look into this and fix it? Thanks in advance.
Edited by: RobM on 26 Oct 2022, 18:18
Added link to Laza’s tool post
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
26 Oct 22, 19:22
in response to: MarkusD
|
|
|
|
Laza will probably fix it. Videos can store location data, though it might need extracting to user variables.
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
7 Apr 23, 18:01
in response to: RobM
|
|
|
|
Laza, can you have please have a look into this issue? Thanks a lot.
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
4 Nov 24, 19:22
in response to: MarkusD
|
|
|
Two years later, still facing the same problem.  Anybody out there who can fix this, please? Thanks a lot. Markus
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
4 Nov 24, 19:29
in response to: MarkusD
|
|
|
|
I’ll move this thread to the skin and tools development thread, Laza might see it there but I think a pm might be better to get his attention.
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
4 Nov 24, 19:40
in response to: RobM
|
|
|
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
4 Nov 24, 21:01
in response to: MarkusD
|
|
|
|
When you run the tool it does say add to all images, so I don't see why you can't just delete those or statements for other categories. After all, you're only updating your copy of the tool.
|
|
|
Posts:
1,595
Registered:
6-Sep-2005
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 12:50
in response to: MarkusD
|
|
|
|
|
|
Sorry, I haven't noticed this thread so far.
You can also apply the location to the selected images. This way you can avoid such problems.
I believe videos can also have metadata, cannot they?
I have attached the fixed tool. I removed Audio and Other types from this version, but the code checks if the metadata exists before it tries to access the location.
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 17:17
in response to: Laza
|
|
|
Thanks Laza,
but now its worse, I even get an error if only pictures (to be honest, these are only screenshots, PNG files) are involved.
bsh.UtilEvalError: Attempt to resolve method: length() on undefined variable or class name: creator in Add same location to all.bsh at line number 152
I created a zip file with some files for testing.
https://www.markus-drueck.de/JA/10.7z
The coordinates:
60.601887,7.503842
Thanks, Markus
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 17:59
in response to: MarkusD
|
|
|
|
Unless something has changed, and I’ve got the metadata right, location data written to the edit window>Location pane only works for jpeg images.
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 18:51
in response to: RobM
|
|
|
Rob, Laza,
thanks for your help and ideas so far.
Please try to think from a users point of view, not from a developers point of view.
A user has some objects, pictures (jpg, png, svg, gif, webp etc.), PDFs, videos.
Now this user wants do give all these objects location data. Don't ask if this makes sense from your point of view. It makes sense from the users point of view.
And now things get bad, really bad, because if you enter the location data in the "Postion" pane on the right side for a video it seems that JA accepts the location data. But it does not. Which is super frustrating, because there is no feedback from the GUI that this is not possible.
This is one of many big fails in the GUI of JA which make me sick for years now. And I'm surprised that David doesn't fix this.
And no, I don't want to use some extra tools to get location data in files other than jpg. The JA GUI should handle that for me. If your answer is, many files don't allow to store meta data like location data, don't tell me that, I don't care how you solve that problem, but solve it. Just a thought, why don't JA store location data in "info" files of the objects?
<?xml version="1.0" encoding="UTF-8"?>
<java version="22" class="java.beans.XMLDecoder">
<object class="java.util.HashMap">
<void method="put">
<string>keywords</string>
<string>Bahnhof, Baustelle, Finse, WebCam</string>
</void>
<void method="put">
<string>userVariables</string>
<object class="java.util.LinkedHashMap">
<void method="put">
<string>xWeight</string>
<string>0.5</string>
</void>
<void method="put">
<string>yWeight</string>
<string>0.4947</string>
</void>
</object>
</void>
<void method="put">
<string>title</string>
<string>Finse</string>
</void>
</object>
</java>
I don't see any problem to add a section to store the location data here?
And by the way there is already some kind of trick to add location data for files other than jpg. Using the user variable "gpsLocation", but this is an awful „solution“.
So, please, make adding location data to every file type work. I'm sure that this a no-brainer for team Sweden.
Cheers, Markus
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 20:32
in response to: MarkusD
|
 |
Helpful |
|
|
Thanks Laza,
but now its worse, I even get an error if only pictures (to be honest, these are only screenshots, PNG files) are involved.
bsh.UtilEvalError: Attempt to resolve method: length() on undefined variable or class name: creator in Add same location to all.bsh at line number 152
I created a zip file with some files for testing.
https://www.markus-drueck.de/JA/10.7z
The coordinates:
60.601887,7.503842
Thanks, Markus
As far as I can see lines 152, 153 and 154 can be removed, those variables (useCreator, useCopyright and useCopyrightUrl) are not referenced anywhere else in the script. I just rem'd them out and the tool works.
|
|
|
Posts:
1,010
Registered:
13-Apr-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 20:38
in response to: RobM
|
|
|
|
Thanks Rob! Yes, now the tool works. Videos are not a problem any more, they don't through any errors. Cheers, Markus
|
|
|
Posts:
4,177
Registered:
4-Aug-2006
|
|
|
|
Re: "Add same location to all.bsh" -> fails with videos
Posted:
5 Nov 24, 20:54
in response to: MarkusD
|
|
|
Sorry you're not happy. My last post was based on the user manual, first 'note' at the top of the page https://jalbum.net/help/en/Geotagging. Apparently this has changed, as far as I can tell from version 23. I'll update that note to show videos that are not mp4, PDFs, Word documents etc. are not supported.
If That changes I'll try to notice the change.
|
|
|
|
Legend
|
|
Forum admins
|
|
Helpful Answer
|
|
Correct Answer
|
|