Browse Source

Encourage uploaders to think twice about 1080p DVDs

spaghetti 7 years ago
parent
commit
8dad3df9b6
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      static/functions/validate_upload.js

+ 4
- 0
static/functions/validate_upload.js View File

@@ -18,6 +18,7 @@ $(() => {
18 18
     if ($('#album_desc').raw().value.length < 10) {
19 19
       hard_error('The group description is too short')
20 20
     }
21
+
21 22
     if ($('#file').raw().value.slice(-8).toLowerCase() != '.torrent') {
22 23
       soft_error('The file selected does not appear to be a .torrent file')
23 24
     }
@@ -28,6 +29,9 @@ $(() => {
28 29
     if (!$('#image').raw().value) {
29 30
       soft_error('You did not include a cover image, which is mandatory if one exists')
30 31
     }
32
+    if ($('#media_tr select').raw().value == 'DVD' && (['720p','1080i','1080p','4K'].includes($('#ressel').raw().value) || +$('#resolution').raw().value.split('x')[1] > 576)) {
33
+      soft_error('Your selected resolution is too high to be a DVD. Are you sure the media type should be DVD and not WEB?')
34
+    }
31 35
   })
32 36
   $('#tags').on('blur', e => $('#tags').raw().value = $('#tags').raw().value.split(',').map(t=>t.trim()).filter(t=>t).join(', '))
33 37
 })

Loading…
Cancel
Save