mirror of
				https://github.com/krateng/maloja.git
				synced 2023-08-10 21:12:55 +03:00 
			
		
		
		
	Renamed import module to match v3
This commit is contained in:
		| @@ -11,7 +11,7 @@ def loadexternal(filename): | ||||
| 		print("File could not be found.") | ||||
| 		return | ||||
|  | ||||
| 	from .importer import import_scrobbles | ||||
| 	from .import_scrobbles import import_scrobbles | ||||
| 	result = import_scrobbles(filename) | ||||
|  | ||||
| 	msg = f"Successfully imported {result['CONFIDENT_IMPORT'] + result['UNCERTAIN_IMPORT']} scrobbles" | ||||
|   | ||||
| @@ -12,7 +12,8 @@ c = CleanerAgent() | ||||
| outputs = { | ||||
| 	"CONFIDENT_IMPORT": lambda msg: None, | ||||
| 	"UNCERTAIN_IMPORT": lambda msg: print(col['orange'](msg)), | ||||
| 	"CONFIDENT_SKIP": lambda msg: print(col['ffcba4'](msg)), | ||||
| 	#"CONFIDENT_SKIP": lambda msg: print(col['ffcba4'](msg)), | ||||
| 	"CONFIDENT_SKIP": lambda msg: None, | ||||
| 	"UNCERTAIN_SKIP": lambda msg: print(col['orange'](msg)), | ||||
| 	"FAIL": lambda msg: print(col['red'](msg)), | ||||
| } | ||||
| @@ -145,6 +146,8 @@ def parse_spotify_lite(inputf): | ||||
| 				yield ('FAIL',None,f"{entry} could not be parsed. Scrobble not imported. ({repr(e)})") | ||||
| 				continue | ||||
| 
 | ||||
| 		print() | ||||
| 
 | ||||
| 
 | ||||
| def parse_spotify_full(inputf): | ||||
| 
 | ||||
| @@ -212,7 +215,7 @@ def parse_spotify_full(inputf): | ||||
| 
 | ||||
| 
 | ||||
| 					ts_group = int(timestamp/10) | ||||
| 					relevant_ts_groups = [ts_group-2,ts_group-1,ts_group,ts_group+1,ts_group+2] | ||||
| 					relevant_ts_groups = [ts_group-3,ts_group-2,ts_group-1,ts_group,ts_group+1,ts_group+2,ts_group+3] | ||||
| 					similar_scrobbles = [scrob for tsg in relevant_ts_groups for scrob in inaccurate_timestamps.get(tsg,[])] | ||||
| 
 | ||||
| 					scrobble_describe = (timestamp,entry['spotify_track_uri'],entry['ms_played']) | ||||
		Reference in New Issue
	
	Block a user
	 krateng
					krateng