Commit fbd0ff10 authored by fred's avatar fred

Revert manual utf-8 encoding

Setting an appropriate locale in the systemd unit script is enough.
parent be0b306e
......@@ -125,7 +125,7 @@ class NonstopFile(models.Model):
self.filename = os.path.basename(filepath)
def get_local_filepath(self):
return os.path.join(LOCAL_BASE_PATH, self.short).encode('utf-8')
return os.path.join(LOCAL_BASE_PATH, self.short)
class SomaLogLine(models.Model):
......
......@@ -199,13 +199,13 @@ class UploadTracksView(FormView):
track_title = metadata.get('title')[0]
monthdir = datetime.datetime.today().strftime('%Y-%m')
filepath = u'%s/%s - %s - %s%s' % (monthdir,
filepath = '%s/%s - %s - %s%s' % (monthdir,
datetime.datetime.today().strftime('%y%m%d'),
artist_name[:50].replace('/', ' ').strip(),
track_title[:80].replace('/', ' ').strip(),
os.path.splitext(f.name)[-1])
os.path.splitext(f.name)[-1]).encode('utf-8')
default_storage.save(os.path.join('nonstop', 'tracks', filepath.encode('utf-8')), content=f)
default_storage.save(os.path.join('nonstop', 'tracks', filepath), content=f)
nonstop_file = NonstopFile()
nonstop_file.set_track_filepath(filepath)
......
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