Methods should not have been tagged with classmethods and now the basename of class name is attributed to the final home path.

This commit is contained in:
2018-09-23 17:26:43 +02:00
parent a106a35d42
commit bfab59d49c

View File

@@ -48,7 +48,7 @@ class Video(object):
self.format = format
#: Release group of the video
self.home = home
self.release_group = release_group
#: Resolution of the video stream (480p, 720p, 1080p or 1080i)
self.resolution = resolution
@@ -166,11 +166,9 @@ class Episode(Video):
def fromname(cls, name):
return cls.fromguess(name, guessit(name, {'type': 'episode'}))
@classmethod
def sufficientInfo(self):
return None not in [self.series, self.season, self.episode] and list not in [type(self.series), type(self.episode)]
@classmethod
def moveLocation(self):
series = titlecase(self.series)
grandParent = '{}/{} {:02d}'.format(series, series, self.season)
@@ -216,16 +214,15 @@ class Movie(Video):
def fromname(cls, name):
return cls.fromguess(name, guessit(name, {'type': 'movie'}))
@classmethod
def sufficientInfo(self):
return None not in [self.title, self.year]
@classmethod
t = hasattr(self, "title")
y = hasattr(self, "year")
return None not in [t, y]
def moveLocation(self):
title = titlecase(self.title)
parent = '{} ({})'.format(title, self.year)
self.home = os.path.join(parent, self.name)
self.home = os.path.join(parent, os.path.basename(self.name))
def __repr__(self):
if self.year is None: