bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.79k stars 206 forks source link

Sub-subfolder displayed but does not open #422

Closed zigmhount closed 2 years ago

zigmhount commented 2 years ago

Hi!

I'm setting up pigallery2 for the first time on my Raspberry Pi 3B. I'm using the docker image without nginx, but with pigallery2 as a subdirectory of my Apache vhost for Nextcloud (using ProyPass etc.), so that my Nextcloud is reachable on https://subdomain.domain.com and Pigallery2 on https://subdomain.domain.com/photos . I struggled a bit to get it to use the pictures from Nextcloud but managed using symlinks to my storage disk /app/data/images/user -> /mnt/raid1/clouddata/user/files/gallery by adding a volume /mnt/raid1/clouddata:/mnt/raid1/clouddata:ro into docker-compose.yml. So far so good, but the background may be relevant to my problem.

Now, whether I create a sub-subfolder inside the images folder in the symlink'd Nextcloud folder or directly manually in the images folder, I can index and visualize the pictures in the main and in the first subfolder, but clicking on the sub-subfolder brings me back to the main images folder. Is this an expected limitation of pigallery2 or a real bug?

Docker-compose excerpt:

...
volumes:
      - "/mnt/raid1/pigallery2/config:/app/data/config"
      - "db-data:/app/data/db"
      - "/mnt/raid1/pigallery2/images:/app/data/images:ro"
      - "/mnt/raid1/pigallery2/tmp:/app/data/tmp"
# clouddata for symbolic links:
      - "/mnt/raid1/clouddata:/mnt/raid1/clouddata:ro"
...

Images folder:

pi@host:/mnt/raid1/pigallery2/images $ ls -l
total 12
-rw-r--r-- 1 root root 7005 Jul 14  2014 OXegP.gif
lrwxrwxrwx 1 root root   46 Feb 13 17:52 simon -> /mnt/raid1/clouddata/simon/files/Photos_albums
pi@nextcloudpi:/mnt/raid1/pigallery2/images $ sudo ls -l --recursive simon/
simon/:
total 11196
drwxr-xr-x 1 www-data www-data      46 Feb 13 17:53 Albumtest1
-rw-r--r-- 1 www-data www-data 6251748 Feb 13 12:16 IMG_20220213_121645.jpg
-rw-r--r-- 1 www-data www-data 5206151 Feb  9 13:53 PANO_20220209_135304.jpg

simon/Albumtest1:
total 6684
-rw-r--r-- 1 www-data www-data 6842915 Feb 13 13:33 IMG_20220213_133344.jpg

Web app: In the web app, I can see the folders images/simon and images/simon/Albumtest1 and their thumbnail, as well as the pictures in images/ and in images/simon/, but not in Albumtest1.

Docker logs: docker logs pigallery2 shows nothing much after server start listening on port 80:

...
NODE_ENV environmental variable is set to debug, forcing all logs to print
2/13/2022, 5:27:17 PM[DEBUG][Worker] Worker is waiting for tasks
2/13/2022, 5:27:17 PM[DEBUG] GET /gallery/ 200 83ms
2/13/2022, 5:27:17 PM[DEBUG] GET /styles.9e38d4b881bc215683fa.css 200 62ms
2/13/2022, 5:27:17 PM[DEBUG] GET /assets/icon.png 304 33ms
2/13/2022, 5:27:17 PM[DEBUG] GET /polyfills-es2015.22a1d610edd57ce6362c.js 200 79ms
2/13/2022, 5:27:17 PM[DEBUG] GET /runtime-es2015.8413ad8beac169f353b4.js 200 40ms
2/13/2022, 5:27:17 PM[DEBUG] GET /main-es2015.e717c0e9b049b0d3a128.js 200 91ms
2/13/2022, 5:27:18 PM[VERBS] GET /api/user/me 200 13ms
2/13/2022, 5:27:18 PM[VERBS] GET /api/notifications 304 148ms
2/13/2022, 5:27:18 PM[DEBUG] GET /assets/icon_inv.png 304 17ms
2/13/2022, 5:27:19 PM[VERBS] GET /api/gallery/content/ 304 187ms
2/13/2022, 5:27:19 PM[DEBUG] GET /manifest.json 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /assets/icon.png 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /open-iconic.42125a176cf7bfb24819.woff 304 8ms
2/13/2022, 5:27:19 PM[DEBUG] GET /assets/icon_inv.png 304 10ms
2/13/2022, 5:27:20 PM[VERBS] GET /api/gallery/content/simon 304 86ms
2/13/2022, 5:27:21 PM[VERBS] GET /api/gallery/content/?klm=1644771143731&kls=1644771151468 304 37ms

Environment :

Used app version:

Let me know if you need more information!

zigmhount commented 2 years ago

Quickly confirming that it's not a permissions problem: mounting the pictures folder with bindfs -u root -g root and then using its target as volume source in docker-compose.yml shows all files as owned by root:root and still gives the same problem.

Also, mounting the nextcloud folder as the root of /app/data/images does allow me to see the pics in the 1st level subfolders , but not in the sub-subfolders.

And lastly, in case it may be related, I somehow can't get the index.md files to show in the album view, regardless of the folder.

I'm vaguely aware that what I'm writing here may be confusing, let me know if you don't get it :)

bpatrik commented 2 years ago

Hi,

My guess would be the issue is with symlink: You cannot mount symlinks to docker. Here is an other issue about that https://github.com/bpatrik/pigallery2/issues/39

Here you can read more about the docker's symlink issue: https://stackoverflow.com/questions/38485607/mount-host-directory-with-a-symbolic-link-inside-in-docker-container

zigmhount commented 2 years ago

Thanks for your answer! However I don't think that's where the problem lies unfortunately:

/mnt/raid1/pigallery2/images/subfolder1: total 20 drwxr-xr-x 1 root root 76 Feb 21 21:45 . drwxr-xr-x 1 root root 54 Feb 21 21:40 .. -rw-r--r-- 1 root root 36 Feb 21 21:43 index.md -rw-r--r-- 1 root root 13786 Nov 11 20:28 mozillafirefox.svg drwxr-xr-x 1 root root 34 Feb 21 21:47 subsubfolder

/mnt/raid1/pigallery2/images/subfolder1/subsubfolder: total 8 drwxr-xr-x 1 root root 34 Feb 21 21:47 . drwxr-xr-x 1 root root 76 Feb 21 21:45 .. -rw-r--r-- 1 root root 2648 Mar 17 2021 gnome.png -rw-r--r-- 1 root root 36 Feb 21 21:46 index.md


and the markdown files are of course not empty:

$ cat /mnt/raid1/pigallery2/images/subfolder1/index.md

Title

text

subtitle

text again


As far as I can tell this seems all right, yet when I open pigallery I can't access `subsubfolder` nor see any markdown files...:
![recording_compressed](https://user-images.githubusercontent.com/58641590/155027781-b7da46c1-f84b-4152-a642-41c8a3c2621f.gif)

and there is not even a GET request to /subsubfolder in the logs :thinking: 

2/21/2022, 9:16:59 PM[DEBUG] GET /gallery/ 200 11ms 2/21/2022, 9:17:00 PM[DEBUG] GET /assets/icon.png 304 18ms 2/21/2022, 9:17:00 PM[DEBUG] GET /styles.9e38d4b881bc215683fa.css 200 69ms 2/21/2022, 9:17:00 PM[DEBUG] GET /runtime-es2015.8413ad8beac169f353b4.js 200 55ms 2/21/2022, 9:17:00 PM[DEBUG] GET /polyfills-es2015.22a1d610edd57ce6362c.js 200 68ms 2/21/2022, 9:17:00 PM[DEBUG] GET /main-es2015.e717c0e9b049b0d3a128.js 200 104ms 2/21/2022, 9:17:00 PM[VERBS] GET /api/notifications 304 7ms 2/21/2022, 9:17:00 PM[DEBUG] GET /assets/icon_inv.png 304 6ms 2/21/2022, 9:17:00 PM[VERBS] GET /api/user/me 200 6ms 2/21/2022, 9:17:01 PM[VERBS] GET /api/gallery/content/ 304 54ms 2/21/2022, 9:17:01 PM[VERBS] GET /api/gallery/content/subfolder1/mozillafirefox.svg/thumbnail/240 304 12ms 2/21/2022, 9:17:01 PM[VERBS] GET /api/gallery/content/OXegP.gif/thumbnail/480 304 8ms 2/21/2022, 9:17:02 PM[VERBS] GET /api/gallery/content/OXegP.gif/bestFit 304 10ms 2/21/2022, 9:17:03 PM[VERBS] GET /api/gallery/content/subfolder1 304 69ms 2/21/2022, 9:17:04 PM[VERBS] GET /api/gallery/content/subfolder1/subsubfolder/gnome.png/thumbnail/240 304 22ms 2/21/2022, 9:17:04 PM[VERBS] GET /api/gallery/content/subfolder1/mozillafirefox.svg/thumbnail/480 304 20ms 2/21/2022, 9:17:05 PM[VERBS] GET /api/gallery/content/subfolder1/mozillafirefox.svg/bestFit 304 8ms 2/21/2022, 9:17:06 PM[VERBS] GET /api/gallery/content/?klm=1645476012924&kls=1645476259107 304 35ms 2/21/2022, 9:17:07 PM[VERBS] GET /api/gallery/content/subfolder1?klm=1645476336613&kls=1645476452302 304 39ms 2/21/2022, 9:17:07 PM[VERBS] GET /api/gallery/content/?klm=1645476012924&kls=1645476259107 304 51ms



any idea what else I could investigate?
zigmhount commented 2 years ago

Hi again, For what it's worth, I've just tried the same docker image on my laptop, and there I can access sub-subfolders without problem. I however also can't see any Markdown files, whether in the root folder or any subfolder.

zigmhount commented 2 years ago

Quick update: on my laptop, the markdown files finally appear with the image nightly-debian-buster :) I haven't managed yet to display a GPX file's map in an album though. Next I'll probably try installing pigallery using npm instead of docker, both on my laptop and on the raspberry, and see if that makes a difference.

bpatrik commented 2 years ago

Hi,

Can you try showing more logs?

Here is what you can do.

  1. use nightly. It will be the new release soon. the prev. release is quite old. nightly-debian-buster is good.
  2. Set login to all. In the docker-compose file:
    environment:
      - NODE_ENV=debug

    (Or you can also set config Server.Log.level="debug")

  3. check the browser developer console if it shows any error. (right click -> inspect or hitting F12) kép

Markdown is only supported in the nightly.

GPX: can be disabled in the config, make sure, you have enabled them: kép

zigmhount commented 2 years ago

Hi! Thanks for taking the time to reply :) Here is what I've tried today:

Sorry if that's too much useless info, I hope it can help ;)

bpatrik commented 2 years ago

I see the following:

  1. there are some uncatch issues in pigallery2_docker_rpi_nightly.log that introduced this morning. 8469903 should fix it. Should not be a big deal.
  2. Not Founds in pigallery2_docker_rpi_ffconsole.log are more troubling.

You get 404 for listing the subdirectory. The app things that it is not a valid path or it does not have read/list permission on it.

Can you try logging in, then opening in a separate browser https:///photos/api/gallery/content/subfolder1/subsubfolder (so not with%2 but with / ) and see what happens.

My guess would be some symbolic link, rights related issue.

GPX:

Here is sample supported gpx file: https://github.com/bpatrik/pigallery2/blob/master/demo/images/RK_gpx%20_2015-06-12_0727.gpx Please not the different tags.

A file is parsed here: https://github.com/bpatrik/pigallery2/blob/84699031893260927d409b4f7ddf221d47fd9d28/src/frontend/app/ui/gallery/map/map.service.ts#L73-L86

I'm using runkeeper and just downloading gpx from there.

zigmhount commented 2 years ago

Thanks for the example GPX file! I've put that one in the album folders, it's unfortunately not displayed either on the gallery page, both on my laptop and on the rpi (both with the nightly docker image).

Can you try logging in, then opening in a separate browser https:///photos/api/gallery/content/subfolder1/subsubfolder (so not with%2 but with / ) and see what happens.

Navigating to the subsubfolder on my local instance shows the URL http://localhost:81/gallery/subfolder%2Fsubsubfolder in my browser, however pointing the browser directly at http://localhost:81/gallery/subfolder/subsubfolder just brings up pigallery2's loading and welcome page. On the rpi, opening the URL https://<mydomain>/photos/gallery/subfolder1/subsubfolder does the same (loading and welcome page), but https://<mydomain>/photos/gallery/subfolder1%2Fsubsubfolder brings error 404 (like the console was saying). Instead of permissions (my current image/ folder structure is all in the same local folder, not a single symbolic link) I looked into Apache's rules to somehow decode this %2F, and following this thread I added the following to my apache config:

AllowEncodedSlashes NoDecode
# Pigallery2 docker container exposes to port 1234
ProxyPass        http://localhost:1234 nocanon

Aaand voilà, the sub-subfolder issue is resolved! I hope that this post helps other people someday :)

The GPX issue is however not due to Apache since it's also failing using the pre-containerized Nginx proxy.

martadinata666 commented 2 years ago

Pretty curious about this, as i dont use .gpx. So i take sample from sample-gpx and the attached pigallery2 sample I set pigallery2 not debug mode, and the debug result show it scanning but not processing. So the folder just empty blank. My settings map enabled, openstreet, gpx enabled. latest git pull and rebuild. v1.9.2

igallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:25:56 AM[SILLY][GalleryManager] Reindexing reason: lastModified mismatch: known: 1645932134573, current:1645932301034
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:25:56 AM[SILLY][DiskManager] scanning directory: GPX
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:25:56 AM[VERBS] GET /api/gallery/content/GPX?klm=1645932134573&kls=1645932201149 200 21ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:03 AM[SILLY][GalleryManager] Reindexing reason: never scanned
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:03 AM[SILLY][DiskManager] scanning directory: GPX/sample-gpx
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:03 AM[VERBS] GET /api/gallery/content/GPX%2Fsample-gpx 200 16ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:03 AM[VERBS] GET /api/gallery/content/GPX/sample-gpx/README.md 200 2ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:11 AM[SILLY][GalleryManager] Reindexing reason: never scanned
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:11 AM[SILLY][DiskManager] scanning directory: GPX/sample-gpx/RoscoffCoastal
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:11 AM[VERBS] GET /api/gallery/content/GPX%2Fsample-gpx%2FRoscoffCoastal 200 13ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:17 AM[SILLY][GalleryManager] Reindexing reason: never scanned
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:17 AM[SILLY][DiskManager] scanning directory: GPX/sample-gpx/RoscoffCoastal/simplified
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:17 AM[VERBS] GET /api/gallery/content/GPX%2Fsample-gpx%2FRoscoffCoastal%2Fsimplified 200 9ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:26:32 AM[DEBUG] HEAD /heartbeat 200 2ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:27:12 AM[DEBUG] HEAD /heartbeat 200 0ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:27:28 AM[VERBS] GET /api/gallery/content/?klm=1645931136337&kls=1645931194133 200 464ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:27:29 AM[VERBS] GET /api/gallery/content/CXIJOINhbYP_slide_2.jpg/thumbnail/480 200 2ms
pigallery2_app.1.eij3rxkahu9h@homelab    | 2/27/2022, 10:27:29 AM[VERBS] GET /api/gallery/content/CXIJOINhbYP_slide_3.jpg/thumbnail/480 200 2ms

On other hand v1.9.0, it show need DOMparser.

pigallery2p_app.1.ltfynyxvbkkw@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2p_app.1.ltfynyxvbkkw@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags
bpatrik commented 2 years ago

There is one more catch with gpx: Map is only shown if there is at least one photo with gps data in the folder. If there is no photo like this, map wont shown, so you also cannot see the gpx file.

martadinata666 commented 2 years ago

i see, tried use all the demo image from repo, and throwed DOMparser error. Is it ok?

The map showing, there is 2 type tag, cirle with image/photo, and gps pin position. I assume the circle with photo is the photo with gpx tag, and the gps pin show the trip? If it is then it work correctly 👍🏼

pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:12 AM[SILLY] [SharpRenderer] rendering photo:/home/debian/pigallery2/data/images/demo/images/IMG_1252.jpg, size:240
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:12 AM[VERBS] GET /api/gallery/content/demo/images/IMG_1252.jpg/thumbnail/240 200 103ms
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[SILLY][GalleryManager] Reindexing reason: never scanned
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[SILLY][DiskManager] scanning directory: demo/images
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[DEBUG][MetadataLoader] Error parsing exif /home/debian/pigallery2/data/images/demo/images/broken image.JPG TypeError: unsupported file type: undefined (file: /home/debian/pigallery2/data/images/demo/images/broken image.JPG)
pigallery2_app.1.r337onb21xi3@homelab    |     at lookup (/home/debian/pigallery2/node_modules/image-size/dist/index.js:51:11)
pigallery2_app.1.r337onb21xi3@homelab    |     at Function.imageSize (/home/debian/pigallery2/node_modules/image-size/dist/index.js:124:16)
pigallery2_app.1.r337onb21xi3@homelab    |     at /home/debian/pigallery2/src/backend/model/threading/MetadataLoader.js:160:55
pigallery2_app.1.r337onb21xi3@homelab    |     at FSReqCallback.wrapper [as oncomplete] (node:fs:660:5)
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[SILLY] [SharpRenderer] rendering photo:/home/debian/pigallery2/data/images/demo/images/IMG_1252.jpg, size:480
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | Warning: DOMParser is not available. It is needed to be able to parse XMP tags.
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[VERBS] GET /api/gallery/content/demo%2Fimages 200 87ms
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[VERBS] GET /api/gallery/content/demo/images/index.md 200 1ms
pigallery2_app.1.r337onb21xi3@homelab    | 2/28/2022, 12:04:16 AM[VERBS] GET /api/gallery/content/demo/images/IMG_1252.jpg/thumbnail/480 200 
zigmhount commented 2 years ago

I haven't seen DOMParser errors - but I haven't tried parsing pictures with much XMP metadata either.

There is one more catch with gpx: Map is only shown if there is at least one photo with gps data in the folder. If there is no photo like this, map wont shown, so you also cannot see the gpx file.

Ooooh I see! Too bad, my use case was to not capture GPS coordinates in the EXIF metadata of my pictures, but use only a GPX file instead to display locations related to album - similar to the possibility in Google Photos to add a map to an album, even if unrelated to the actual pictures - as a fancier "blogging" feature. I guess it should not be technically too difficult to make pigallery display the map as soon as there is a GPX file in the folder (though I'm not sure what pin would be displayed if not a related picture...), would it? Unfortunately I'm not a developer so I'd have a hard time figuring it out, but if you can point me in the right direction I might be able to hack my way around :)

Alternatively, I'm looking into ExifTool and jExifToolGUI to add GPS coordinates to pictures afterwards, but if I just update the metadata when the picture is already in Pigallery2 I first have to reset the database for it to force re-scanning that picture's metadata, not really convenient. I might just get used to activating my GPS when taking pictures.

bpatrik commented 2 years ago

There is one more catch with gpx: Map is only shown if there is at least one photo with gps data in the folder. If there is no photo like this, map wont shown, so you also cannot see the gpx file.

211a5bd should make it possible.

bpatrik commented 2 years ago

@martadinata666 the DOMParser missing errors are odd. Never seen them. Not sure what causing them.

yes: photos show up in circle, while tracks have a starting pin and the track it self.

zigmhount commented 2 years ago

There is one more catch with gpx: Map is only shown if there is at least one photo with gps data in the folder. If there is no photo like this, map wont shown, so you also cannot see the gpx file.

211a5bd should make it possible.

Awesome, thanks a lot!

One last thing: would it be hard to adjust the GPX parsing to also get pins for <wpt> items in addition to paths for <trk>? OsmAnd exports favorites/PoI as e.g.

  <wpt lat="39.5678" lon="-0.12345">
    <time>2022-02-04T00:12:22Z</time>
    <name>name of the place</name>
    <extensions>
      <osmand:address>address</osmand:address>
      <osmand:icon>special_star</osmand:icon>
      <osmand:background>circle</osmand:background>
      <osmand:color>#eecc22</osmand:color>
    </extensions>
  </wpt>

but it'd be great to simply have a pin on the map for each wpt's lat and lon... What do you think? I can make it a separate feature request for the pipeline if you prefer.

bpatrik commented 2 years ago

I do not mind adding this. A separate feature request would be great. Better would be a pull request :) (I dont have that much time for this project)