Commit Graph

22 Commits (9e2700b89d6ab06cb404005f062ba7e5d9c7c341)

Author SHA1 Message Date
Chocobozzz d3c9a2e5b9
Add script to move videos to file system 2023-11-02 09:21:49 +01:00
Chocobozzz 3a4992633e
Migrate server to ESM
Sorry for the very big commit that may lead to git log issues and merge
conflicts, but it's a major step forward:

 * Server can be faster at startup because imports() are async and we can
   easily lazy import big modules
 * Angular doesn't seem to support ES import (with .js extension), so we
   had to correctly organize peertube into a monorepo:
    * Use yarn workspace feature
    * Use typescript reference projects for dependencies
    * Shared projects have been moved into "packages", each one is now a
      node module (with a dedicated package.json/tsconfig.json)
    * server/tools have been moved into apps/ and is now a dedicated app
      bundled and published on NPM so users don't have to build peertube
      cli tools manually
    * server/tests have been moved into packages/ so we don't compile
      them every time we want to run the server
 * Use isolatedModule option:
   * Had to move from const enum to const
     (https://www.typescriptlang.org/docs/handbook/enums.html#objects-vs-enums)
   * Had to explictely specify "type" imports when used in decorators
 * Prefer tsx (that uses esbuild under the hood) instead of ts-node to
   load typescript files (tests with mocha or scripts):
     * To reduce test complexity as esbuild doesn't support decorator
       metadata, we only test server files that do not import server
       models
     * We still build tests files into js files for a faster CI
 * Remove unmaintained peertube CLI import script
 * Removed some barrels to speed up execution (less imports)
2023-08-11 15:02:33 +02:00
Wicklow 40346ead2b
Feature/password protected videos (#5836)
* Add server endpoints

* Refactoring test suites

* Update server and add openapi documentation

* fix compliation and tests

* upload/import password protected video on client

* add server error code

* Add video password to update resolver

* add custom message when sharing pw protected video

* improve confirm component

* Add new alert in component

* Add ability to watch protected video on client

* Cannot have password protected replay privacy

* Add migration

* Add tests

* update after review

* Update check params tests

* Add live videos test

* Add more filter test

* Update static file privacy test

* Update object storage tests

* Add test on feeds

* Add missing word

* Fix tests

* Fix tests on live videos

* add embed support on password protected videos

* fix style

* Correcting data leaks

* Unable to add password protected privacy on replay

* Updated code based on review comments

* fix validator and command

* Updated code based on review comments
2023-06-29 09:48:55 +02:00
Chocobozzz d0fbc9fd0a
Fix lint 2023-05-24 15:27:15 +02:00
treac1e b67580aa65 Update privacy-concerns.component.html
When translated, the white space after "Reminder:" is cut off, so in other languages there is no white space between the "Reminder:" and the following text, which looks ugly (e.g. in the German translation). A solution is to move the space behind the translated phrase (using the html-entity for space &#32).
2022-10-27 08:54:13 +02:00
Chocobozzz b13a0a48ba
Move alert into to pt-alert-primary 2022-06-15 14:43:33 +02:00
Chocobozzz 4c8749cb9e
Migrate to bootstrap 5 2022-06-10 09:21:00 +02:00
Chocobozzz 5a2f775a21
Handle playlist without videos available 2022-06-03 14:19:30 +02:00
Chocobozzz 57d6503286
Reorganize player files 2022-03-14 14:36:35 +01:00
Chocobozzz c729caf6cc Add basic video editor support 2022-02-28 10:42:19 +01:00
Chocobozzz dbd9fb44dd
Don't stuck state when move transcoding job failed 2021-12-23 11:13:06 +01:00
Chocobozzz a9bfa85d2c
Add ability for admins to set default p2p policy 2021-12-16 10:08:55 +01:00
Chocobozzz 221ee1adc9 Add transcoding fail message in client 2021-11-09 15:00:21 +01:00
Chocobozzz 2760b454a7 Deprecate filter video query
Introduce include and isLocal instead
2021-10-29 11:48:21 +02:00
Chocobozzz 5196817c5d
Fix privacy concern for remote videos 2021-10-21 09:24:22 +02:00
Chocobozzz 98ab5dc810
Remove useless async 2021-08-26 10:01:42 +02:00
Chocobozzz 9df52d660f
Migrate client to eslint 2021-08-18 08:35:06 +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
Kimsible 435990290a Correct privacymsg z-index to avoid hover dropdown on scroll 2021-07-21 15:33:59 +02:00
Chocobozzz c894a1ea72
Move watch attributes in a dedicated component 2021-06-30 09:49:45 +02:00
Chocobozzz 2453589a28
Move video alert in a dedicated component 2021-06-30 08:56:14 +02:00
Chocobozzz 6ebdd12f88
Move privacy concerns in a dedicated component 2021-06-29 17:36:28 +02:00