diff --git a/pod_project/core/utils.py b/pod_project/core/utils.py index c38d1417..9ce469da 100755 --- a/pod_project/core/utils.py +++ b/pod_project/core/utils.py @@ -867,6 +867,7 @@ def create_main_m3u8(video_id, list_encod_video): # Create master playlist and replace path master = open(m3u8filename, 'w+') master.write("#EXTM3U\n\n") + ffmproberesult = '' for encoding_type in list_encod_video: if not encoding_type.output_height in [240, 480]: diff --git a/pod_project/pods/models.py b/pod_project/pods/models.py index 5015a23f..ab9013c0 100755 --- a/pod_project/pods/models.py +++ b/pod_project/pods/models.py @@ -540,6 +540,8 @@ def pod_files_removal(sender, instance, using, **kwargs): for file in list_files: if file.endswith('.ts') or file.endswith('.m3u8'): os.remove(os.path.join(path, file)) + if file.startswith('segment_'): + os.remove(os.path.join(path, file)) diff --git a/pod_project/pods/tests/tests_views.py b/pod_project/pods/tests/tests_views.py index 2deab70d..03aea02e 100755 --- a/pod_project/pods/tests/tests_views.py +++ b/pod_project/pods/tests/tests_views.py @@ -691,7 +691,6 @@ def test_video_edit_not_good_user(self): self.assertEqual(login, True) response = self.client.get('/video_add_favorite/%s/' % pod.slug) self.assertEqual(response.status_code, 403) - print(response.content) self.assertTrue("You cannot access this page." in response.content) def test_delete_favorite(self):