KonradIT / mmt

Media Management Tool - make importing videos/photos from GoPro and other action cameras/drones a little bit more bearable.
http://mmt.camera
Apache License 2.0
96 stars 11 forks source link

Blank folder name if location detection fails #91

Closed nicolinux closed 1 year ago

nicolinux commented 1 year ago

Folder name blank if location detection fails

Context:

Expected Behavior:

Just skip folder with location name.

Current Behavior:

Check out the tree output. For the date "20221010" location was detected correctly (I replaced city name with xxx for privacy reasons). But for the date "20230108" there is no location folder. That would be the expected behaviour if there where a flag to disable location detection. Folder name problem - for the date "20230112" there is an invisible folder (at least on the command line, in the macOS finder it shows a folder with an empty name) which contains the dji and insta360 videos.

Logs / Screenshots:

├── 20221010
│   └── xxx Deutschland
│       └── Mini 3 Pro
│           └── photos
│               ├── DJI_0006.JPG
│               └── raw
│                   └── DJI_0006.DNG
├── 20230108
│   └── Insta360 Camera
│       └── videos
│           └── 360
│               └── 161519
│                   ├── VID_20230108_161519_00_001.insv
│                   └── VID_20230108_161519_10_001.insv
├── 20230109
│   └── Insta360 Camera
│       └── videos
│           └── 360
│               └── 144742
│                   ├── VID_20230109_144742_00_009.insv
│                   └── VID_20230109_144742_10_009.insv
└── 20230112
    ├──  
    │   └── DJI Device
    │       └── photos
    │           ├── DJI_0012.JPG
    │           └── raw
    │               └── DJI_0012.DNG
    └── Insta360 Camera
        ├── photos
        │   ├── 151433
        │   │   ├── IMG_20230112_151433_00_011.dng
        │   │   └── IMG_20230112_151433_00_011.insp
        └── videos
            └── 360
                └── 151354
                    ├── VID_20230112_151354_00_010.insv
                    └── VID_20230112_151354_10_010.insv

Steps to Reproduce:

KonradIT commented 1 year ago

Hi,

1) For 20230108 it makes sense there's no location folder, Insta360 cameras don't have GPS in them, so the code doesn't sort by location for insta cameras 2) Seems only the DJI videos are on the invisible folder, this could be a space (`) or just a blank string (""`) (which I didn't know you could create!)

I've added a commit (https://github.com/KonradIT/mmt/commit/cf544212ec4306f2eb106c247b2fc71b97db1fc7) that covers both cases and reverts back to the fallback.

KonradIT commented 1 year ago

Hi @nicolinux can you try again w/ the fix.

nicolinux commented 1 year ago

I would like to try it. Could you publish a new release with the hotfix? I am traveling right now and I don't have the time/knowledge to compile mmt myself - sorry.

KonradIT commented 1 year ago

Hi, I'll add a few more features from the issues tab before issuing a release.

KonradIT commented 1 year ago

Latest release should fix it, let me know: https://github.com/KonradIT/mmt/releases

nicolinux commented 1 year ago

Alright, I tested the latest release 1.7 and the bug with blank name folders is gone! (thanks). But somehow spaces are still introduced sometimes at the beginning of a location name. For example one of the "errors" of already imported files - the folder names look this (space at the beginning):

>> File /Users/steve/Movies/Neuseeland 2023/20230206/ Manawatū-Whanganui New Zealand / Aotearoa/DJI Device/videos/DJI_0001.MP4 already exists

Some location names are fine though:

>> File /Users/steve/Movies/Neuseeland 2023/20230206/Taumarunui New Zealand / Aotearoa/DJI Device/videos/DJI_0013.MP4 already exists
KonradIT commented 1 year ago

Is Taumarunui New Zealand / Aotearoa the actual name of the folder? Its dangerous having the / in there.

I'll add the following fixes:

And testing for the function.

Moved to issue: #98