|
@@ -1,39 +0,0 @@
|
1
|
|
-$(() => {
|
2
|
|
- /*
|
3
|
|
- $("#post").click(e => {
|
4
|
|
- let hard_error = m => {
|
5
|
|
- if (e.isDefaultPrevented()) return
|
6
|
|
- alert(m)
|
7
|
|
- e.preventDefault()
|
8
|
|
- }
|
9
|
|
- let soft_error = m => {
|
10
|
|
- if (e.isDefaultPrevented()) return
|
11
|
|
- if (!confirm(`${m}\n\nPress OK to upload anyway`)) {
|
12
|
|
- e.preventDefault()
|
13
|
|
- }
|
14
|
|
- }
|
15
|
|
-
|
16
|
|
- if (!$('#file').raw().value) {
|
17
|
|
- hard_error('No torrent file is selected')
|
18
|
|
- }
|
19
|
|
- if ($('#album_desc').raw().value.length < 10) {
|
20
|
|
- hard_error('The group description is too short')
|
21
|
|
- }
|
22
|
|
-
|
23
|
|
- if ($('#file').raw().value.slice(-8).toLowerCase() != '.torrent') {
|
24
|
|
- soft_error('The file selected does not appear to be a .torrent file')
|
25
|
|
- }
|
26
|
|
- let mi = $('#mediainfo').raw().value
|
27
|
|
- if (mi && (!mi.includes('General') || (!mi.includes('Video') && !mi.includes('Audio')))) {
|
28
|
|
- soft_error('Your MediaInfo does not appear to be from a valid MediaInfo utility')
|
29
|
|
- }
|
30
|
|
- if (!$('#image').raw().value) {
|
31
|
|
- soft_error('You did not include a cover image, which is mandatory if one exists')
|
32
|
|
- }
|
33
|
|
- if ($('#media_tr select').raw().value == 'DVD' && (['720p','1080i','1080p','4K'].includes($('#ressel').raw().value) || +$('#resolution').raw().value.split('x')[1] > 576)) {
|
34
|
|
- soft_error('Your selected resolution is too high to be a DVD. Are you sure the media type should be DVD and not WEB?')
|
35
|
|
- }
|
36
|
|
- })
|
37
|
|
- $('#tags').on('blur', e => $('#tags').raw().value = $('#tags').raw().value.split(',').map(t=>t.trim()).filter(t=>t).join(', '))
|
38
|
|
- */
|
39
|
|
-})
|