Skip to content

Commit

Permalink
fix: View old uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
purzelrakete committed Jan 29, 2024
1 parent 9c12d2f commit 19577e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class Track:
comment: str = None
date: str = None
duration: float = None
path: str = None

def from_probe(probe):
tags = probe.get("format", {}).get("tags", {})
Expand Down Expand Up @@ -91,9 +92,14 @@ class Transcription:
def transcribed(self):
return self.transcript is not None

@property
def track_path(self):
"""Deprecated. Old files include the path on self.track"""
return self.track.path if self.track else None

@property
def uploaded_file(self):
return Path(self.path)
return Path(self.path or self.track_path)

@property
def transcoded_file(self):
Expand Down

0 comments on commit 19577e0

Please sign in to comment.