Removed old dat importing code.

metadata-restructure
Emily Frost 4 years ago
parent 35166fab89
commit c0960f37d9
Signed by: Emily
GPG Key ID: AA5D42849F1CBDC9

22
lark

@ -11,7 +11,6 @@ import os
import uuid
import xdg.BaseDirectory
#import dat
import metadata
HASH_CHUNK_SIZE = 10485760 # 10mb
@ -30,28 +29,7 @@ def get_sha1sum(filename):
return sha1sum.hexdigest()
'''
smd_dat = dat(SMD_DAT_PATH)
# TODO: Default to '.'
# TODO: Use a proper arg parser.
search_dir = sys.argv[1]
for filename in os.listdir(search_dir):
# TODO: Ignore or descend into directories.
# TODO: Compare hashes
file_path = os.path.abspath(os.path.join(search_dir, filename))
file_sha1 = get_sha1sum(file_path)
search_result = smd_dat.search_by_sha1(file_sha1)
if search_result:
rom_data = search_result[0]
print('File %s matches database entry for %s.' % (filename, rom_data.filename))
else:
print('File %s is not in database.' % filename)
'''
# Test code! :D
# TODO: Write test code that doesn't depend on external resources.
SMD_DAT_PATH = '/home/lumia/Downloads/Sega - Mega Drive - Genesis (20200303-035539).dat'
TEST_HASH = 'cfbf98c36c776677290a872547ac47c53d2761d6'
def _kwargs_parse(kwargs_list):
kwargs = {}

Loading…
Cancel
Save