Skip to content
This repository has been archived by the owner on Sep 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #281 from EsupPortail/drclockwork/bugfix_delete_video
Browse files Browse the repository at this point in the history
drclockwork/bugfix_delete_video
  • Loading branch information
DrClockwork authored Feb 20, 2018
2 parents 0800b30 + b5fe2f8 commit 4a31634
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pod_project/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:

Expand Down
2 changes: 2 additions & 0 deletions pod_project/pods/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))



Expand Down
1 change: 0 additions & 1 deletion pod_project/pods/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4a31634

Please sign in to comment.