Sets hash value based on if movie or episode instance.
This commit is contained in:
@@ -73,8 +73,11 @@ def scan_video(path):
|
|||||||
|
|
||||||
# hash of name
|
# hash of name
|
||||||
hashids = Hashids(min_length=16)
|
hashids = Hashids(min_length=16)
|
||||||
hashid = hashids.encode(path)
|
if isinstance(v, Episode):
|
||||||
video.name_hash = hashid
|
videoHash = hashids.encode(''.join(self.title, self.year or ''))
|
||||||
|
elif isinstance(v, Movie):
|
||||||
|
videoHash = hashids.encode(''.join(self.series, self.season, self.episode))
|
||||||
|
video.hash = videoHash
|
||||||
|
|
||||||
return video
|
return video
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user