summaryrefslogtreecommitdiff
path: root/jamos
diff options
context:
space:
mode:
Diffstat (limited to 'jamos')
-rwxr-xr-xjamos12
1 files changed, 9 insertions, 3 deletions
diff --git a/jamos b/jamos
index 2e6350e..30b2d32 100755
--- a/jamos
+++ b/jamos
@@ -61,9 +61,15 @@ def write_metadata_to_song_file(file, metadata):
def format_youtube_date(date):
- fmt = "%Y%m%d"
- d = datetime.datetime.strptime(date, fmt)
- return d.year
+ default = "Unknown Year"
+ try:
+ fmt = "%Y%m%d"
+ d = datetime.datetime.strptime(date, fmt)
+ return d.year
+ except Exception as ex:
+ print(ex)
+
+ return default
def sort_stuff():