Commit Graph

209 Commits (31820002d87ed072ea53e46672ba513f00432a95)

Author SHA1 Message Date
Chocobozzz f4110e0a72
Update server dependencies 2022-03-21 14:20:47 +01:00
Chocobozzz 119418b9d9
Upgrade lru-cache
The bug has been fixed on their side
2022-02-10 09:05:44 +01:00
Chocobozzz 9d8ef212ff
Fix broken dep 2022-02-09 17:48:15 +01:00
Chocobozzz c9f27d9881
Update server dependencies 2022-02-09 13:51:24 +01:00
Chocobozzz 0e00f894c6
Fix xml feed validity 2022-02-09 11:54:18 +01:00
Chocobozzz 4393b2552c
Move to peertube feed fork 2022-02-07 09:38:24 +01:00
Chocobozzz ebe4b3df5c
Remove fixed workaround 2022-01-21 11:11:03 +01:00
Chocobozzz 3b83faccff
Upgrade minor dependencies 2022-01-18 10:49:56 +01:00
Chocobozzz 2f0a0ae217
Upgrade uploadx dependency 2022-01-18 10:47:26 +01:00
Chocobozzz c0d2eac332
Update server dependencies 2022-01-14 14:15:23 +01:00
Chocobozzz f8360396ff
Stop using tsconfig register
Prefer to replace paths at compile time
2022-01-06 08:26:14 +01:00
Chocobozzz 9270bd3a7e
Migrate to --enable-source-maps option 2022-01-03 16:37:16 +01:00
Chocobozzz 81d02aac56
Fix types package dependencies 2021-12-28 15:10:55 +01:00
Chocobozzz fafc7c3cbd
Update resolve tspaths and enabled CI for types 2021-12-28 08:37:05 +01:00
Chocobozzz e5d91a9b9c
Upgrade redis dep 2021-12-24 14:52:24 +01:00
Chocobozzz 2d28b0c21d
Upgrade fast xml parser dep 2021-12-24 13:55:47 +01:00
Chocobozzz fe392059a8
Global server dep update 2021-12-24 13:38:00 +01:00
Chocobozzz b969539c83
Fix types dist paths 2021-12-24 13:28:33 +01:00
lutangar 8b03e2ce1a feat(types): create peertube-types package
Create dedicated Typescript "types" configuration file for each "projects".
Create a types folder which includes every useful ts definition:
- client
- server
- shared
Add tooling to create a proper package, extract dependencies, etc...
Add CI Github task.

refactor(types): publish types package in release script
2021-12-16 10:08:43 +01:00
Chocobozzz 2d4822e3af
Upgrade multer 2021-12-08 08:58:52 +01:00
Chocobozzz ca87d95bcb
Fix plugin upgrade
Correctly decache all plugin paths
2021-12-03 10:14:17 +01:00
Chocobozzz 3637306035
Update server dependencies 2021-11-22 16:12:01 +01:00
Chocobozzz 7fc1012ffd
Update server depencencies 2021-11-10 15:30:44 +01:00
Chocobozzz 605450a6f7
Fix dependency security alert 2021-10-26 16:04:09 +02:00
Chocobozzz 7c4f8e3b29
Update server dependencies 2021-10-26 15:15:27 +02:00
Chocobozzz 5842a85424
Remove unnecessary package
https://github.com/standard/standard/issues/1316
2021-10-26 15:08:58 +02:00
Chocobozzz d91a0341a7
Add missing dependency proxy-addr 2021-10-26 09:57:38 +02:00
Chocobozzz 62549e6c98
Rewrite youtube-dl import
Use python3 binary
Allows to use a custom youtube-dl release URL
Allows to use yt-dlp (youtube-dl fork)
Remove proxy config from configuration to use HTTP_PROXY and HTTPS_PROXY
env variables
2021-10-22 10:25:24 +02:00
Chocobozzz 05c0535df7
Update server dependencies 2021-10-12 14:31:59 +02:00
Chocobozzz 624e42fdf9
Remove peertube watch and peertube repl
I don't have time to maintain these scripts that cause some install
issues/maintenance difficulties
2021-09-10 15:06:57 +02:00
Chocobozzz 41fb13c330
esModuleInterop to true 2021-08-27 15:12:22 +02:00
Chocobozzz 8e72210829
Update server dependencies 2021-08-26 11:22:50 +02:00
smilekison 8729a87024
Support proxies for PeerTube (#4346)
* Updated with latest code

* Updated Support proxies for PeerTube

* Support Proxies for PeerTube (Updated with change request)

* Cleanup proxy PR

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-25 15:08:37 +02:00
Jelle Besseling 0305db28c9
Add support for saving video files to object storage (#4290)
* Add support for saving video files to object storage

* Add support for custom url generation on s3 stored files

Uses two config keys to support url generation that doesn't directly go
to (compatible s3). Can be used to generate urls to any cache server or
CDN.

* Upload files to s3 concurrently and delete originals afterwards

* Only publish after move to object storage is complete

* Use base url instead of url template

* Fix mistyped config field

* Add rudenmentary way to download before transcode

* Implement Chocobozzz suggestions

https://github.com/Chocobozzz/PeerTube/pull/4290#issuecomment-891670478

The remarks in question:
    Try to use objectStorage prefix instead of s3 prefix for your function/variables/config names
    Prefer to use a tree for the config: s3.streaming_playlists_bucket -> object_storage.streaming_playlists.bucket
    Use uppercase for config: S3.STREAMING_PLAYLISTS_BUCKETINFO.bucket -> OBJECT_STORAGE.STREAMING_PLAYLISTS.BUCKET (maybe BUCKET_NAME instead of BUCKET)
    I suggest to rename moveJobsRunning to pendingMovingJobs (or better, create a dedicated videoJobInfo table with a pendingMove & videoId columns so we could also use this table to track pending transcoding jobs)
    https://github.com/Chocobozzz/PeerTube/pull/4290/files#diff-3e26d41ca4bda1de8e1747af70ca2af642abcc1e9e0bfb94239ff2165acfbde5R19 uses a string instead of an integer
    I think we should store the origin object storage URL in fileUrl, without base_url injection. Instead, inject the base_url at "runtime" so admins can easily change this configuration without running a script to update DB URLs

* Import correct function

* Support multipart upload

* Remove import of node 15.0 module stream/promises

* Extend maximum upload job length

Using the same value as for redundancy downloading seems logical

* Use dynamic part size for really large uploads

Also adds very small part size for local testing

* Fix decreasePendingMove query

* Resolve various PR comments

* Move to object storage after optimize

* Make upload size configurable and increase default

* Prune webtorrent files that are stored in object storage

* Move files after transcoding jobs

* Fix federation

* Add video path manager

* Support move to external storage job in client

* Fix live object storage tests

Co-authored-by: Chocobozzz <me@florianbigard.com>
2021-08-17 08:26:20 +02:00
Chocobozzz eb8bd9ab1a
Try to fix openapi script 2021-08-11 14:38:07 +02:00
Chocobozzz 31aa391d13
Update server dependencies 2021-08-11 11:49:00 +02:00
Chocobozzz 7a397c7f15
Upgrade server dependencies 2021-07-22 12:01:58 +02:00
Chocobozzz 20bafcb61b
Move apicache in peertube
Allow us to upgrade to node 16
2021-07-22 11:48:24 +02:00
Chocobozzz d4a8e7a65f Support short uuid for GET video/playlist 2021-06-29 14:56:35 +02:00
Chocobozzz 8cc6120118
Upgrade server dependencies 2021-06-25 17:39:27 +02:00
Chocobozzz 071584c7d7
Upgrade server dep 2021-06-15 16:14:57 +02:00
Rigel Kent 1cfbdd30d9 refactor deprecated body-parser usage 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
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 c9783c7b72
Update server dependencies 2021-05-05 11:08:02 +02:00
Chocobozzz a0e69167ae
Remove scripty
It breaks our tests with the latest npm release
2021-05-05 10:51:32 +02:00
Chocobozzz 5182473faf
Upgrade server dep' 2021-04-12 16:35:04 +02:00
Chocobozzz bae9303726
Also decache config 2021-04-09 09:37:46 +02:00
Chocobozzz b70025bfdc
Remove libxmljs in favour of pure JS implem 2021-04-06 10:25:21 +02:00
Chocobozzz a784bd7fde
Upgrade to latest oauth2-server 2021-03-24 18:18:41 +01:00