From a4dc416ce8e2cbb123fdbe1db0889756030e5683 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 10 Dec 2024 00:05:58 -0500 Subject: [PATCH] Simplify directory_path This looked to be identical code to what `filename` used. Remove the duplicated code by using the function instead. --- tubesync/sync/models.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tubesync/sync/models.py b/tubesync/sync/models.py index 2f116356..d9f04ff1 100644 --- a/tubesync/sync/models.py +++ b/tubesync/sync/models.py @@ -1291,10 +1291,7 @@ class Media(models.Model): @property def directory_path(self): - # Otherwise, create a suitable filename from the source media_format - media_format = str(self.source.media_format) - media_details = self.format_dict - dirname = self.source.directory_path / media_format.format(**media_details) + dirname = self.source.directory_path / self.filename return os.path.dirname(str(dirname)) @property