mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
ref
This commit is contained in:
parent
e40e085d2a
commit
d874e6d5ee
@ -644,9 +644,7 @@ class Media(models.Model):
|
||||
|
||||
if encoding and encoding.status == "success" and encoding.profile.codec == "h264" and action == "add" and not encoding.chunk:
|
||||
from . import tasks
|
||||
logger.info('ti simbainei edw')
|
||||
tasks.create_hls(self.friendly_token)
|
||||
print('ti simbainei edw2')
|
||||
tasks.create_hls.delay(self.friendly_token)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@ -468,7 +468,9 @@ def create_hls(friendly_token):
|
||||
if media.hls_file != pp:
|
||||
media.hls_file = pp
|
||||
media.save(update_fields=["hls_file"])
|
||||
logger.info(f"All good / exiting for {friendly_token}")
|
||||
hlsfile = Media.objects.filter(friendly_token=friendly_token).first().hls_file
|
||||
# print file and size
|
||||
logger.info(f"HLS file created: {hlsfile} size {os.path.getsize(hlsfile)}")
|
||||
return True
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user