diff --git a/client/html/post_upload_row.tpl b/client/html/post_upload_row.tpl index a1ea46bb..c7cc5dba 100644 --- a/client/html/post_upload_row.tpl +++ b/client/html/post_upload_row.tpl @@ -64,16 +64,6 @@ }) %> <% } %> - - <% if (['video'].includes(ctx.uploadable.type)) { %> -
- <%= ctx.makeCheckbox({ - text: 'Loop video', - name: 'loop-video', - checked: ctx.uploadable.flags.includes('loop'), - }) %> -
- <% } %>
diff --git a/client/js/views/post_upload_view.js b/client/js/views/post_upload_view.js index 3ccf7f35..f1d465fc 100644 --- a/client/js/views/post_upload_view.js +++ b/client/js/views/post_upload_view.js @@ -49,12 +49,6 @@ class Uploadable extends events.EventTarget { get name() { throw new Error('Not implemented'); } - - _initComplete() { - if (['video'].includes(this.type)) { - this.flags.push('loop'); - } - } } class File extends Uploadable { @@ -74,7 +68,6 @@ class File extends Uploadable { new CustomEvent('finish', {detail: {uploadable: this}})); }); } - this._initComplete(); } destroy() { @@ -105,7 +98,6 @@ class Url extends Uploadable { super(); this.url = url; this.dispatchEvent(new CustomEvent('finish')); - this._initComplete(); } get mimeType() { @@ -290,11 +282,6 @@ class PostUploadView extends events.EventTarget { uploadable.anonymous = true; } - uploadable.flags = []; - if (rowNode.querySelector('.loop-video input:checked')) { - uploadable.flags.push('loop'); - } - uploadable.tags = []; uploadable.relations = []; for (let [i, lookalike] of uploadable.lookalikes.entries()) { diff --git a/doc/API.md b/doc/API.md index c23f0454..6a733f75 100644 --- a/doc/API.md +++ b/doc/API.md @@ -843,12 +843,13 @@ data. automatically created. Tags created automatically have no implications, no suggestions, one name and their category is set to the first tag category found. Safety must be any of `"safe"`, `"sketchy"` or `"unsafe"`. Relations - must contain valid post IDs. `` currently can be only `"loop"` to - enable looping for video posts. Sending empty `thumbnail` will cause the - post to use default thumbnail. If `anonymous` is set to truthy value, the - uploader name won't be recorded (privilege verification still applies; it's - possible to disallow anonymous uploads completely from config.) For details - how to pass `content` and `thumbnail`, see [file uploads](#file-uploads). + must contain valid post IDs. If `` is omitted, they will be defined + by default (`"loop"` will be set for all video posts, and `"sound"` will be + auto-detected). Sending empty `thumbnail` will cause the post to use default + thumbnail. If `anonymous` is set to truthy value, the uploader name won't be + recorded (privilege verification still applies; it's possible to disallow + anonymous uploads completely from config.) For details on how to pass `content` + and `thumbnail`, see [file uploads](#file-uploads). ## Updating post - **Request** @@ -892,9 +893,9 @@ data. automatically created. Tags created automatically have no implications, no suggestions, one name and their category is set to the first tag category found. Safety must be any of `"safe"`, `"sketchy"` or `"unsafe"`. Relations - must contain valid post IDs. `` currently can be only `"loop"` to - enable looping for video posts. Sending empty `thumbnail` will reset the - post thumbnail to default. For details how to pass `content` and + must contain valid post IDs. `` can be either `"loop"` to enable looping + for video posts or `"sound"` to indicate sound. Sending empty `thumbnail` will + reset the post thumbnail to default. For details how to pass `content` and `thumbnail`, see [file uploads](#file-uploads). All fields except the [`version`](#versioning) are optional - update concerns only provided fields.