Commit Graph

97 Commits (36305301cb31fb8f66c4e544e91f8e5e3228c2ee)

Author SHA1 Message Date
Chocobozzz 36305301cb
Set AKISMET_KEY as env 2022-09-28 08:25:46 +02:00
Chocobozzz e9fc9e03c1
Optimize fetching playlist urls 2022-09-08 08:41:48 +02:00
Chocobozzz 863477173e
Cleanup tests imports 2022-08-17 15:47:54 +02:00
Chocobozzz e0faa8ad6e
We don't need to import mocha 2022-08-17 15:40:57 +02:00
Chocobozzz b211106695 Support video views/viewers stats in server
* Add "currentTime" and "event" body params to view endpoint
 * Merge watching and view endpoints
 * Introduce WatchAction AP activity
 * Add tables to store viewer information of local videos
 * Add endpoints to fetch video views/viewers stats of local videos
 * Refactor views/viewers handlers
 * Support "views" and "viewers" counters for both VOD and live videos
2022-04-15 09:49:35 +02:00
Chocobozzz 57e4e1c1a9
Don't store remote rates of remote videos
In the future we'll stop to expose all available rates to improve users
privacy
2022-03-18 11:21:50 +01:00
Chocobozzz b5c00b9b67
Fix lint 2022-03-01 08:33:23 +01:00
Chocobozzz 242f52253e
Fix getting avatars in videos list 2022-03-01 08:32:49 +01:00
kontrollanten d0800f7661
Implement avatar miniatures (#4639)
* client: remove unused file

* refactor(client/my-actor-avatar): size from input

Read size from component input instead of scss, to make it possible to
use smaller avatar images when implemented.

* implement avatar miniatures

close #4560

* fix(test): max file size

* fix(search-index): normalize res acc to avatarMini

* refactor avatars to an array

* client/search: resize channel avatar to 120

* refactor(client/videos): remove unused function

* client(actor-avatar): set default size

* fix tests and avatars full result

When findOne is used only an array containting one avatar is returned.

* update migration version and version notations

* server/search: harmonize normalizing

* Cleanup avatar miniature PR

Co-authored-by: Chocobozzz <me@florianbigard.com>
2022-02-28 08:34:43 +01:00
Chocobozzz b18a501a0e
Try to fix docker build 2022-01-03 14:20:56 +01:00
Chocobozzz c55e3d7227
Move test functions outside extra-utils 2021-12-17 12:24:03 +01:00
Chocobozzz bf54587a3e
shared/ typescript types dir server-commands 2021-12-17 09:29:23 +01:00
lutangar 06aad80165 chore(refactor): remove shared folder dependencies to the server
Many files from the `shared` folder were importing files from the `server` folder.
When attempting to use Typescript project references to describe dependencies,
it highlighted a circular dependency beetween `shared` <-> `server`.

The Typescript project forbid such usages.
Using project references greatly improve performance by rebuilding only
the updated project and not all source files.
> see https://www.typescriptlang.org/docs/handbook/project-references.html
2021-12-16 10:08:43 +01:00
Chocobozzz 5cf027bdc4
Force video updatedAt update on update 2021-11-10 14:34:02 +01:00
Chocobozzz d78b51aa4e
Fix tests 2021-11-10 14:25:33 +01:00
Chocobozzz 2760b454a7 Deprecate filter video query
Introduce include and isLocal instead
2021-10-29 11:48:21 +02:00
Chocobozzz 41fb13c330
esModuleInterop to true 2021-08-27 15:12:22 +02:00
Chocobozzz 83903cb65d Generate random uuid for video files 2021-07-26 11:29:31 +02:00
Chocobozzz 4c7e60bc17
Reorganize imports 2021-07-20 15:27:19 +02:00
Chocobozzz c0e8b12e7f
Refactor requests 2021-07-20 15:27:18 +02:00
Chocobozzz 254d3579f5
Use an object to represent a server 2021-07-20 15:27:18 +02:00
Chocobozzz 89d241a79c
Shorter server command names 2021-07-20 15:27:18 +02:00
Chocobozzz d23dd9fbfc
Introduce videos command 2021-07-20 15:27:18 +02:00
Chocobozzz 7926c5f9b3
Introduce user command 2021-07-20 15:27:18 +02:00
Chocobozzz 41d1d07501
Introduce login command 2021-07-20 15:27:18 +02:00
Chocobozzz 6c5065a011
Introduce server commands 2021-07-20 15:27:18 +02:00
Chocobozzz 0d8ecb7592
Fix NSFW tests 2021-07-20 15:27:18 +02:00
Chocobozzz 12edc1495a
Introduce comments command 2021-07-20 15:27:18 +02:00
Chocobozzz a54618880c
Introduce channels command 2021-07-20 15:27:18 +02:00
Chocobozzz 3d470a530c Faster ci using compiled ts files 2021-06-15 08:21:12 +02:00
Chocobozzz 99cb53fd5a
Don't count deleted comment for replies 2021-06-08 13:48:58 +02:00
Chocobozzz 2b02c520e6
Cleanup shared models 2021-05-11 11:32:31 +02:00
kontrollanten f6d6e7f861
Resumable video uploads (#3933)
* WIP: resumable video uploads

relates to #324

* fix review comments

* video upload: error handling

* fix audio upload

* fixes after self review

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/middlewares/validators/videos/videos.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* Update server/controllers/api/videos/index.ts

Co-authored-by: Rigel Kent <par@rigelk.eu>

* update after code review

* refactor upload route

- restore multipart upload route
- move resumable to dedicated upload-resumable route
- move checks to middleware
- do not leak internal fs structure in response

* fix yarn.lock upon rebase

* factorize addVideo for reuse in both endpoints

* add resumable upload API to openapi spec

* add initial test and test helper for resumable upload

* typings for videoAddResumable middleware

* avoid including aws and google packages via node-uploadx, by only including uploadx/core

* rename ex-isAudioBg to more explicit name mentioning it is a preview file for audio

* add video-upload-tmp-folder-cleaner job

* stronger typing of video upload middleware

* reduce dependency to @uploadx/core

* add audio upload test

* refactor resumable uploads cleanup from job to scheduler

* refactor resumable uploads scheduler to compare to last execution time

* make resumable upload validator to always cleanup on failure

* move legacy upload request building outside of uploadVideo test helper

* filter upload-resumable middlewares down to POST, PUT, DELETE

also begin to type metadata

* merge add duration functions

* stronger typings and documentation for uploadx behaviour, move init validator up

* refactor(client/video-edit): options > uploadxOptions

* refactor(client/video-edit): remove obsolete else

* scheduler/remove-dangling-resum: rename tag

* refactor(server/video): add UploadVideoFiles type

* refactor(mw/validators): restructure eslint disable

* refactor(mw/validators/videos): rename import

* refactor(client/vid-upload): rename html elem id

* refactor(sched/remove-dangl): move fn to method

* refactor(mw/async): add method typing

* refactor(mw/vali/video): double quote > single

* refactor(server/upload-resum): express use > all

* proper http methud enum server/middlewares/async.ts

* properly type http methods

* factorize common video upload validation steps

* add check for maximum partially uploaded file size

* fix audioBg use

* fix extname(filename) in addVideo

* document parameters for uploadx's resumable protocol

* clear META files in scheduler

* last audio refactor before cramming preview in the initial POST form data

* refactor as mulitpart/form-data initial post request

this allows preview/thumbnail uploads alongside the initial request,
and cleans up the upload form

* Add more tests for resumable uploads

* Refactor remove dangling resumable uploads

* Prepare changelog

* Add more resumable upload tests

* Remove user quota check for resumable uploads

* Fix upload error handler

* Update nginx template for upload-resumable

* Cleanup comment

* Remove unused express methods

* Prefer to use got instead of raw http

* Don't retry on error 500

Co-authored-by: Rigel Kent <par@rigelk.eu>
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-05-10 11:13:41 +02:00
Chocobozzz 185eabe1ef
Increase test timeout 2021-04-26 11:33:14 +02:00
Chocobozzz 7519c4a27b
Fix tests 2021-01-29 15:58:01 +01:00
Rigel Kent f2eb23cd87
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes
- convert more codes to typed ones
- factorize html generator for error responses
2020-12-08 21:16:10 +01:00
Chocobozzz 33ff70baa6 Fix audio encoding params 2020-11-25 10:07:51 +01:00
Chocobozzz 021c42657f
Try to fix multiple server tests 2020-11-18 14:15:25 +01:00
Chocobozzz f127331459
Add admin view to manage comments 2020-11-16 13:48:58 +01:00
Chocobozzz 696d83fd13 Block comments from muted accounts/servers
Add better control for users of comments displayed on their videos:

 * Do not forward comments from muted remote accounts/servers (muted by the current server or by the video owner)
 * Do not list threads and hide replies (with their children) of accounts/servers muted by the video owner
 * Hide from RSS comments of muted accounts/servers by video owners

Use case:
  * Try to limit spam propagation in the federation
  * Add ability for users to automatically hide comments on their videos from undesirable accounts/servers (the comment section belongs to videomakers, so they choose what's posted there)
2020-05-29 09:32:20 +02:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz ffc65cbd2a
Remove HLS torrents 2020-01-24 16:48:05 +01:00
Chocobozzz c883db6d03
Move deleted comment on new follow tests 2019-12-04 11:48:12 +01:00
Julien Maulny b5206dfc45 Fix retrieving of deleted comments when subscribing to a new instance 2019-12-04 09:36:45 +01:00
Julien Maulny 69222afac8 Soft delete video comments instead of detroy 2019-12-04 09:36:45 +01:00
Chocobozzz 210709a907
Fix tests 2019-09-18 17:20:37 +02:00
Chocobozzz 0b353d1d8a
Fix redundancy exceeding the limit 2019-08-12 08:46:46 +02:00
Chocobozzz 511765c9f8
Remove comment federation by video owner 2019-08-07 15:35:29 +02:00
Chocobozzz 24163420dd Add retries to travis mocha 2019-07-24 10:58:16 +02:00
Chocobozzz 80b8ad2a70
Update travis ffmpeg patch version 2019-05-17 16:50:52 +02:00