Restore "Unknown Location" folder

This commit is contained in:
Jaisen Mathai 2015-10-16 23:08:48 -07:00
parent 49622b9b7d
commit 0f7bfd9f23
2 changed files with 6 additions and 4 deletions

View File

@ -53,7 +53,7 @@ You'll notice that your photos are now organized by date and location. Some phot
Don't fret if your photos don't have much EXIF information. I'll show you how you can fix them up later on but let's walk before we run. Don't fret if your photos don't have much EXIF information. I'll show you how you can fix them up later on but let's walk before we run.
Back to your photos. When I'm done you should see something like this. Back to your photos. When I'm done you should see something like this. Notice that I've renamed your files by adding the date and time they were taken. This helps keep them in chronological order when using most viewing applications. You'll can thank me later.
``` ```
├── 2015-06-Jun ├── 2015-06-Jun

View File

@ -108,11 +108,13 @@ class FileSystem:
path.append(metadata['album']) path.append(metadata['album'])
elif(metadata['latitude'] is not None and metadata['longitude'] is not None): elif(metadata['latitude'] is not None and metadata['longitude'] is not None):
place_name = geolocation.place_name(metadata['latitude'], metadata['longitude']) place_name = geolocation.place_name(metadata['latitude'], metadata['longitude'])
if(place_name is None): if(place_name is not None):
path.append('Unknown Location')
else:
path.append(place_name) path.append(place_name)
# if we don't have a 2nd level directory we use 'Unknown Location'
if(len(path) < 2):
path.append('Unknown Location')
return '/'.join(path) return '/'.join(path)
def process_file(self, _file, destination, media, **kwargs): def process_file(self, _file, destination, media, **kwargs):