dont create torrent file if torrents are disabled

This commit is contained in:
j 2014-12-18 21:46:18 +00:00
parent 74772171c2
commit 0e425c6df1

View file

@ -1199,6 +1199,8 @@ class Item(models.Model):
return ox.torrent.bencode(data)
def make_torrent(self):
if settings.CONFIG['video'].get('torrent') == False:
return
streams = self.streams()
if streams.count() == 0:
return