sortable dates for file names on sync device
Signed-off-by: Rafi Rubin <rafi@seas.upenn.edu>
This commit is contained in:
parent
50501c809c
commit
d91b837880
|
@ -166,7 +166,7 @@ defaults = {
|
|||
|
||||
'max_filename_length': 999,
|
||||
|
||||
'custom_sync_name': '{episode.pubdate_prop}_{episode.title}',
|
||||
'custom_sync_name': '{episode.sortdate}_{episode.title}',
|
||||
'custom_sync_name_enabled': False,
|
||||
|
||||
'after_sync': {
|
||||
|
|
|
@ -733,6 +733,10 @@ class PodcastEpisode(PodcastModelObject):
|
|||
|
||||
pubdate_prop = property(fget=cute_pubdate)
|
||||
|
||||
@property
|
||||
def sortdate(self):
|
||||
return str(datetime.datetime.fromtimestamp(self.published).strftime('%F'))
|
||||
|
||||
def calculate_filesize(self):
|
||||
filename = self.local_filename(create=False)
|
||||
if filename is None:
|
||||
|
|
Loading…
Reference in New Issue