Commit Graph

581 Commits (c55e3d7227fe1453869e309025996b9d75256d5d)

Author SHA1 Message Date
Chocobozzz 10363c74c1
Move middleware utils in middlewares
helpers modules should not import models
2021-06-03 18:03:36 +02:00
Chocobozzz 136d7efde7
Refactor AP actors 2021-06-03 16:40:32 +02:00
Chocobozzz e030bfb59d
Refactor server errors handler 2021-06-02 18:15:41 +02:00
Rigel Kent 81628e5069 refactor error code values for URI compatibility 2021-06-02 16:57:07 +02:00
Rigel Kent 3866ea02d4 correct error codes and backward compat 2021-06-02 16:57:07 +02:00
Rigel Kent 76148b27f7 refactor API errors to standard error format 2021-06-02 16:57:07 +02:00
Rigel Kent 7dab0bd698
improve api param message for video names and tags
closes #4026
2021-05-31 20:47:59 +02:00
Rigel Kent 70330f6323
improve api param message for dates 2021-05-31 19:47:24 +02:00
Poslovitch 1f256e7d3c
Implemented configurable minimum signup age
Implements https://github.com/Chocobozzz/PeerTube/issues/3612

Fixed lint and removed debug

Fixed another lint error

Apply suggestions from code review

Co-authored-by: Chocobozzz <chocobozzz@cpy.re>

Add tests for min signup age config
2021-05-28 13:56:05 +02:00
Chocobozzz a1eda903a4
Support '/w/' and '/w/p/' for watch page
And use them as default in client
2021-05-28 11:38:08 +02:00
Chocobozzz 012580d98f
Cleanup
We must not expose private actor objects to clients
Just make 2 GET requests on channel/accounts instead
2021-05-28 10:22:50 +02:00
Chocobozzz 8f608a4cb2
Merge branch 'develop' into shorter-URLs-channels-accounts 2021-05-27 16:12:41 +02:00
Chocobozzz 32985a0a77
Error if importing a torrent with multiple files 2021-05-11 14:56:30 +02:00
Chocobozzz 428ccb8b7a
Reorganize plugin models 2021-05-11 13:33:11 +02:00
Chocobozzz 2b02c520e6
Cleanup shared models 2021-05-11 11:32:31 +02:00
Chocobozzz 7d9ba5c089
Cleanup models directory organization 2021-05-11 11:32:31 +02:00
Rigel Kent b8375da931
provide more schema examples in openapi spec 2021-05-11 01:50:42 +02:00
Chocobozzz 3ec535f72b
Fix E2E tests 2021-05-10 13:58:09 +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
Kimsible 1e37d32f4b Add server API actors route 2021-05-05 11:47:03 +02:00
Chocobozzz 1fd61899ea
Add ability to filter my videos by live 2021-05-03 16:42:15 +02:00
Chocobozzz 5182473faf
Upgrade server dep' 2021-04-12 16:35:04 +02:00
Chocobozzz 8280d0c227
Ensure to install supported plugins 2021-04-12 10:10:48 +02:00
Chocobozzz 213e30ef90 Add banner tests 2021-04-08 10:07:53 +02:00
Chocobozzz 2cb03dc1f4 Add banners support 2021-04-08 10:07:53 +02:00
Chocobozzz eebd9838f0
Add filter hook to forbid embed access 2021-03-24 18:18:41 +01:00
Chocobozzz f43db2f46e
Refactor auth flow
Reimplement some node-oauth2-server methods to remove hacky code needed by our external
login workflow
2021-03-24 18:18:41 +01:00
Chocobozzz e7053b1d9d
Fix AP security tests 2021-03-24 18:18:40 +01:00
Chocobozzz 18b24b2dc5
Add jobs tag to logger 2021-03-24 18:18:40 +01:00
Chocobozzz fbd51e69f2
Upgrade server dependencies 2021-03-03 16:14:32 +01:00
Chocobozzz 74d249bc13
Add ability to cleanup remote AP interactions 2021-03-03 10:08:08 +01:00
Chocobozzz 031ea8efed
Use named chunk for embed on analyze 2021-02-25 15:01:29 +01:00
Chocobozzz d7df188f23
Fix separate SQL query for video get 2021-02-25 11:18:11 +01:00
Chocobozzz 0221f8c9b1
Trim video name also on server 2021-02-25 10:01:33 +01:00
Chocobozzz b3d5cb92b1 Add ability to update torrents cache in client 2021-02-18 13:38:09 +01:00
Chocobozzz 3933a127d2
Ensure we don't receive things from local actors 2021-02-08 16:06:32 +01:00
Chocobozzz 9129b7694d Allow to specify transcoding and import jobs concurrency 2021-02-08 15:38:45 +01:00
Chocobozzz ba5a8d89bb
Update server dependencies 2021-02-03 09:45:08 +01:00
Chocobozzz 5e8dd6e08a
Fix lint 2021-02-01 16:05:22 +01:00
Chocobozzz 6d989edc66
Add ability to update plugin auth 2021-02-01 15:39:13 +01:00
Chocobozzz 1896bca09e
Support transcoding options/encoders by plugins 2021-01-28 15:55:39 +01:00
Rigel Kent ba5d4a849c move from trending routes to alg param 2021-01-28 15:55:34 +01:00
Rigel Kent 3da68f0a78 add default trending page choice, revert comments count for hot strategy 2021-01-28 15:55:34 +01:00
Rigel Kent 5bcbcbe338 modularize abstract video list header and implement video hotness recommendation variant 2021-01-28 15:55:34 +01:00
Rigel Kent 370240824e
Allow users/visitors to search through an account's videos (#3589)
* WIP: account search

* add search to account view

* add tests for account search
2021-01-19 13:43:33 +01:00
Rigel Kent 454c20fa7c
stricter youtubedl format selectors (#3516)
* stricter youtubedl format selectors

make sure selectors avoid av1, and otherwise match as closely to the
maximum resolution enabled for transcoding

* add support for merge formats in youtubedl

* avoid vp9.2 in youtubedl to avoid any HDR

* move getEnabledResolutions, safer replace of imported extension

* add test for youtube-dl selectors
2021-01-15 15:56:56 +01:00
Rigel Kent d8b34ee55b
Allow user to search through their watch history (#3576)
* allow user to search through their watch history

* add tests for search in watch history

* Update client/src/app/shared/shared-main/users/user-history.service.ts
2021-01-13 09:16:15 +01:00
Rigel Kent b7085c7132 add support for 1440p (Quad HD/QHD/WQHD) videos 2021-01-13 09:14:09 +01:00
Chocobozzz c9bc850e93
Use -1 for max live duration unlimited 2020-12-15 09:26:37 +01:00
Chocobozzz 402145b863
Refactor jobs state 2020-12-14 12:00:35 +01:00
Rigel Kent 040d6896a3
add display of logs matching any state 2020-12-13 19:27:25 +01:00
Chocobozzz b49f22d8f9 Upgrade sequelize to v6 2020-12-09 11:41:22 +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
kontrollanten 2805cb7cb6 server/mw/oauth: res.loc.auth to true upon auth
Setting res.locals.authenticated explicity to
true makes it's more clear whether the req is
authenticated when using optionalAuthenticate
middlware.
2020-12-08 10:40:08 +01:00
Chocobozzz 17b7d4b315
Don't allow manual redundancy of live videos 2020-12-07 16:07:52 +01:00
Rigel Kent 2d53be0267
replace numbers with typed http status codes (#3409) 2020-12-07 14:32:36 +01:00
Chocobozzz bb4ba6d94c
Add permanent live support 2020-12-03 15:21:16 +01:00
Chocobozzz 18490b0765 Fix migration and test 2020-11-25 11:07:56 +01:00
Rigel Kent 5beb89f223 refactor scoped token service 2020-11-25 11:07:56 +01:00
Rigel Kent afff310e50 allow private syndication feeds via a user feedToken 2020-11-25 11:07:56 +01:00
Chocobozzz daf6e48010 Split ffmpeg utils with ffprobe utils 2020-11-25 10:07:51 +01:00
Chocobozzz de94ac86a2
Fix incorrect IDs in AP federation 2020-11-20 11:21:08 +01:00
Chocobozzz fce7fe04ee
Update server dependencies 2020-11-19 09:07:20 +01:00
Chocobozzz 0aa52e1707
Add ability to display all channel/account videos 2020-11-18 15:29:38 +01:00
Chocobozzz f127331459
Add admin view to manage comments 2020-11-16 13:48:58 +01:00
Chocobozzz 0f8d00e314
Implement video comment list in admin 2020-11-13 16:38:23 +01:00
Chocobozzz 797d05bdd9
Force signed headers in http signatures
Thanks Roger
2020-11-12 16:29:32 +01:00
Chocobozzz 7a4ea93246
Remove deprecated abuse api 2020-11-10 14:50:16 +01:00
Chocobozzz 3cabf3532b Add live server hooks 2020-11-09 15:33:04 +01:00
Chocobozzz af4ae64f6f Begin live tests 2020-11-09 15:33:04 +01:00
Chocobozzz a056ca4813 Add max lives limit 2020-11-09 15:33:04 +01:00
Chocobozzz b5b687550d Add ability to save live replay 2020-11-09 15:33:04 +01:00
Chocobozzz fb7194043d Check live duration and size 2020-11-09 15:33:04 +01:00
Chocobozzz c6c0fa6cd8 Live streaming implementation first step 2020-11-09 15:33:04 +01:00
Chocobozzz e6abf95e9f
Add redirection on unavailable video due to follow constraints 2020-08-26 09:14:14 +02:00
Chocobozzz 50fcdebdb1
Update server dependencies 2020-08-25 13:54:59 +02:00
Chocobozzz 8054669f11
Optimize default sort when listing videos
createdAt does not have the appropriate index
2020-08-20 11:05:45 +02:00
Chocobozzz 371906639e Add ability to a video multiple times in a playlist 2020-08-19 11:30:21 +02:00
kimsible 766d13b447 Make channelName optionnal in tests only and validators
Fix tests channel displayName

Make channelName in createUser optionnal on server side to not break api

Fix auto channelName with createUser in tests
2020-08-11 08:46:35 +02:00
kimsible 4e68fc8605 Add validator channelName for create-user api 2020-08-11 08:46:35 +02:00
Chocobozzz 6fad8e51c4 Handle playlist oembed 2020-08-07 08:58:29 +02:00
Chocobozzz a02b93ce75 Fix lint 2020-08-07 08:28:14 +02:00
Chocobozzz bd45d503e5 Reorganize shared models 2020-08-07 08:28:14 +02:00
Chocobozzz 668b7f096e Add openapi doc 2020-07-31 11:35:19 +02:00
Chocobozzz 94148c9028 Add abuse messages management in my account 2020-07-31 11:35:19 +02:00
Chocobozzz edbc932546 Add server API to abuse messages 2020-07-31 11:35:19 +02:00
Rigel Kent 7b3909644d test search for subscriptions and video-channels 2020-07-29 18:15:53 +02:00
Rigel Kent 4f5d045960 harmonize search for libraries 2020-07-29 18:15:53 +02:00
Rigel Kent bc99dfe54e variable columns for users list, more columns possible, badge display for statuses 2020-07-29 18:15:53 +02:00
Chocobozzz 310b5219b3 Add new abuses tests 2020-07-10 14:02:41 +02:00
Chocobozzz 4f32032fed Add migrations 2020-07-10 14:02:41 +02:00
Chocobozzz 57f6896f67 Implement abuses check params 2020-07-10 14:02:41 +02:00
Chocobozzz d95d155988 Use 3 tables to represent abuses 2020-07-10 14:02:41 +02:00
Rigel Kent ea7337cfde
add check-params test for user list
fixes #2918
2020-07-03 10:29:03 +02:00
Rigel Kent 8491293b02
add blocked filter in users list to filter banned users
fixes #2914
2020-07-02 22:50:33 +02:00
Rigel Kent 00494d6e2a
allow limiting video-comments rss feeds to an account or video channel 2020-06-27 13:20:59 +02:00
Rigel Kent 1ebddadd07
predefined report reasons & improved reporter UI (#2842)
- added `startAt` and `endAt` optional timestamps to help pin down reported sections of a video
- added predefined report reasons
- added video player with report modal
2020-06-22 13:00:39 +02:00
Chocobozzz 26d6bf6533
Split types and typings 2020-06-18 10:46:27 +02:00
Chocobozzz 67c604ae69
Fix server build 2020-06-17 12:42:16 +02:00
Chocobozzz faa9d434b4
Update server dependencies 2020-06-17 11:42:50 +02:00