Commit e0368dcf authored by fred's avatar fred

adapt jingle methods to real contents of its filepath attribute

parent 418f1d40
......@@ -184,7 +184,10 @@ class Jingle(models.Model):
@property
def short(self):
return self.filepath[len(REMOTE_BASE_PATH):]
# property for compatibility with Track model
# for jingles self.filepath is actually only the last part of the path,
# ex: jingles panik/H_marimba_RP_chucho_zoe.wav
return self.filepath
def file_path(self):
# for compatibility with Track model method
......@@ -193,7 +196,7 @@ class Jingle(models.Model):
def get_local_filepath(self):
if not self.short:
return None
return os.path.join(LOCAL_BASE_PATH, self.short)
return os.path.join(LOCAL_BASE_PATH, 'SPOTS', self.short)
@property
def title(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment