Disbled hashing of filenames for now
This commit is contained in:
		
							
								
								
									
										20
									
								
								src/core.py
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								src/core.py
									
									
									
									
									
								
							| @@ -73,15 +73,17 @@ def scan_video(path): | |||||||
|     video.size = os.path.getsize(path) |     video.size = os.path.getsize(path) | ||||||
|  |  | ||||||
|     # hash of name |     # hash of name | ||||||
|     try: |     # if isinstance(video, Movie): | ||||||
|         if isinstance(video, Movie): |     #     if type(video.title) is str and type(video.year) is int: | ||||||
|             hash_str = ''.join([video.title, str(video.year) or '']) |     #         home_path = '{} ({})'.format(video.title, video.year) | ||||||
|         elif isinstance(video, Episode): |     #         hash_str = ''.join([video.title, str(video.year) or '']) | ||||||
|             hash_str = ''.join([video.series, str(video.season), str(video.episode)]) |     # elif isinstance(video, Episode): | ||||||
|         videoHash = hashlib.md5(hash_str.encode()).hexdigest()  |     #     if type(video.series) is str and type(video.season) is int and type(video.episode) is int: | ||||||
|         video.hash = videoHash |     #         home_path = '{} ({})'.format(video.title, video.year) | ||||||
|     except: |     #         hash_str = ''.join([video.series, str(video.season), str(video.episode)]) | ||||||
|         print(video) |     #     video.hash = hashlib.md5(hash_str.encode()).hexdigest()  | ||||||
|  |     # except: | ||||||
|  |     #     print(video) | ||||||
|  |  | ||||||
|     return video |     return video | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user