mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-05 03:49:24 +02:00
Disable download by default on track urls exposed over federation
This commit is contained in:
parent
828f602b79
commit
dd9cca432d
6 changed files with 45 additions and 6 deletions
|
@ -846,6 +846,11 @@ class Upload(models.Model):
|
|||
def listen_url(self):
|
||||
return self.track.listen_url + "?upload={}".format(self.uuid)
|
||||
|
||||
@property
|
||||
def listen_url_no_download(self):
|
||||
# Not using reverse because this is slow
|
||||
return self.listen_url + "&download=false"
|
||||
|
||||
def get_transcoded_version(self, format, max_bitrate=None):
|
||||
if format:
|
||||
mimetype = utils.EXTENSION_TO_MIMETYPE[format]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue