mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 22:16:37 +00:00
Simplify directory_path
This looked to be identical code to what `filename` used. Remove the duplicated code by using the function instead.
This commit is contained in:
parent
40e48c9317
commit
a4dc416ce8
@ -1291,10 +1291,7 @@ class Media(models.Model):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def directory_path(self):
|
def directory_path(self):
|
||||||
# Otherwise, create a suitable filename from the source media_format
|
dirname = self.source.directory_path / self.filename
|
||||||
media_format = str(self.source.media_format)
|
|
||||||
media_details = self.format_dict
|
|
||||||
dirname = self.source.directory_path / media_format.format(**media_details)
|
|
||||||
return os.path.dirname(str(dirname))
|
return os.path.dirname(str(dirname))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user