Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions gen_conf_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@
import re
import shutil
import sys
import threading

import colorama
from collections import defaultdict
from collections import namedtuple
import html as html_tools
from html.parser import HTMLParser
import PySimpleGUI as sg
CLI_ONLY = False
try:
import PySimpleGUI as sg
except ImportError:
CLI_ONLY = True
from tqdm import tqdm
from urllib.parse import unquote_plus
from urllib.parse import quote_plus
Expand Down Expand Up @@ -638,7 +640,7 @@ def write_mp3_to_disk(data, filename):
default=3)
parser.add_argument('-start', type=int,
help='First year to download. Note: not all historic sessions are available in all languages',
default=max_year - 5)
default=min_year)
parser.add_argument('-end', type=int,
help='Last year to download (defaults to present year).',
default=max_year)
Expand Down Expand Up @@ -667,7 +669,7 @@ def write_mp3_to_disk(data, filename):
args.cache_home = cache_home
validate_args(args)

if len(sys.argv) > 1 and args.nogui:
if CLI_ONLY or (len(sys.argv) > 1 and args.nogui):
# Initialize colorama
colorama.init()

Expand Down