Commit Graph

177 Commits (d4fff51d96925b5704c97dd673dd779030b1aced)

Author SHA1 Message Date
Chocobozzz b96d21b744
Fix CLI build 2021-06-04 08:48: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 428ccb8b7a
Reorganize plugin models 2021-05-11 13:33:11 +02:00
Chocobozzz 1bcb03a100
Use a class for youtube-dl 2021-05-11 11:32:31 +02:00
John Livingston 1e0741d165 Fix CLI plugins list command: use command parameters. 2021-05-10 08:03:20 +02:00
Chocobozzz 13fec08ba3
Ugrade tools dependencies 2021-04-13 09:42:13 +02:00
Chocobozzz b5c361089f
Fix 404 AP status codes 2021-03-24 18:18:40 +01:00
Chocobozzz d7764e2eb7
Fix import script when using the search index 2021-02-19 15:04:58 +01:00
Chocobozzz f6267b6101
Upgrade tools dependencies 2021-02-03 13:49:56 +01:00
Chocobozzz ba5a8d89bb
Update server dependencies 2021-02-03 09:45:08 +01:00
Florent 82f5527fc3
add option for video-import CLI to wait between two video imports (#3310)
* peertube-import-videos: Add --wait-interval option

* peertube-import-videos: various code style improvements

Co-authored-by: Florent F <florent.fayolle69@gmail.com>
Co-authored-by: Rigel Kent <sendmemail@rigelk.eu>
2021-01-25 15:42:44 +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
Chocobozzz 24198e976f
Styling 2020-12-30 11:26:24 +01:00
Theodore R. Smith 8e76aa1d75
(#3520) [cli] Hardened `auth add`: No longer fails with extraneous characters.
**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue #3091.
2020-12-27 14:29:54 -06:00
Chocobozzz 5721fd8374
Fix channels import with a channel with playlists 2020-12-14 09:55:30 +01:00
Chocobozzz d8794cf855
More robust import script when using since/until 2020-12-14 09:55:30 +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 bd2e2f11d0
Add inspect to test script 2020-11-30 15:06:25 +01:00
Chocobozzz 5a547f69d5 Support encoding profiles 2020-11-25 10:07:51 +01:00
Rigel Kent 64b5c2476a
remove outdated badges, add authorization to caption routes 2020-11-20 11:29:37 +01:00
Chocobozzz de29e90c37
Fix CLI import script 2020-11-17 15:28:24 +01:00
Chocobozzz 5505981154
Fix auth add cli examples 2020-08-24 09:57:58 +02:00
Chocobozzz 26d6bf6533
Split types and typings 2020-06-18 10:46:27 +02:00
Chocobozzz faa9d434b4
Update server dependencies 2020-06-17 11:42:50 +02:00
Chocobozzz faf174d043
Fix CLI build 2020-05-07 15:40:22 +02:00
Chocobozzz bd65cf02ff
Fix import/upload CLI options 2020-04-16 16:20:56 +02:00
Chocobozzz f940e81469
Catch error in import script 2020-04-14 09:41:20 +02:00
Chocobozzz a388781916
Add log in peertube watch script on error 2020-04-14 09:09:11 +02:00
Chocobozzz 00c228363f
Fix repl script 2020-04-09 08:39:44 +02:00
Chocobozzz 3d3bb23816
Update CLI dependencies 2020-04-02 14:09:33 +02:00
Chocobozzz ded739eb38
Fix CLI tools typings 2020-04-01 17:04:12 +02:00
Chocobozzz bdd428a6d9
Update dependencies 2020-02-28 16:21:34 +01:00
Raphaël Droz 79ee77eab1 peertube-import-videos passes remaining options down to youtube-dl 2020-02-12 11:33:14 +01:00
Chocobozzz a15871560f
Move to eslint 2020-02-03 08:31:02 +01:00
Chocobozzz 2f1756a03c
Optimize peertube script 2020-01-28 14:30:10 +01:00
Chocobozzz 005b51b977
Force node 10 usage 2020-01-28 14:03:12 +01:00
Chocobozzz 26fcf2efeb Add redundancy CLI 2020-01-28 11:35:26 +01:00
Chocobozzz 4449d2695b
Fix URL normalization in import script 2019-12-30 10:44:50 +01:00
Chocobozzz da69b88638
Auto add https:// in import script URLs 2019-12-30 10:40:09 +01:00
Florent F 71056d0008 Fix hours in peertube-import-videos
Youtube doesn't store the hour of the publish date so
set it to zero in order to compare it.
2019-11-04 17:38:03 +01:00
Chocobozzz bcd4cf0586
Fix remove end slash function 2019-11-04 16:34:58 +01:00
Chocobozzz 2aaa1a3fdc
Use typescript paths in cli scripts too 2019-10-21 17:13:22 +02:00
Chocobozzz e199856bb7
Upgrade tools dep 2019-10-21 16:08:03 +02:00
Lukas Winkler 32d7f2b754 fix a few typos (#2141)
* fix a few typos

* apply changes to original files instead

* additional correction
2019-09-23 08:17:42 +02:00
Frank de Lange bda3b70537 peertube-import-videos.ts: add --tmpdir, --first, --last and --verbose [level] parameters (#2045)
* peertube-import-videos.ts: add --tmpdir <tmpdir> parameter, used to designate working directory for downloading and converting imported videos

* peertube-import-videos.ts: add --first and --last parameters to limit processing of the returned playlist to the first/last N elements

* peertube-import-videos.ts: add --verbose [verbosity] parameter, set this from 0 (only errors are reported) to 4 (for trace debugging), default is 2 (info). When --verbose is used without the optional parameter the logging level is set to 3 (debug). At level 1 (warn) it will only report on successfully uploaded videos (and/or errors), use this when running peertube-import-videos in a cron job to mirror a channel.

* package.json: remove dependency on loglevel

cli.ts: add getLogger(loglevel), to be used in CLI tools, add --verbose to set log level

peertube-import-videos: use getLogger (from cli) instead of loglevel, add error_exit (log error and exit), move --verbose to cli.ts, etc.

* cli.ts: remove superfluous reference to default logging level

* peertube-import-videos: exit_error -> exitError
2019-08-26 11:35:28 +02:00
Florent F d0198ff99f Add since parameter to peertube-import-videos (#1991)
* Add since parameter to peertube-import-videos

* PR remarks + --until <date>
2019-08-01 10:21:55 +02:00
Chocobozzz 6f530096cb
Correctly import tags in CLI 2019-07-29 14:10:31 +02:00
Chocobozzz 47e26ec761
Fix peertube auth help 2019-07-25 12:03:13 +02:00
Chocobozzz a353a4d77c
Upgrade tools dependencies 2019-07-25 11:00:42 +02:00
Chocobozzz 09071200c7 Add plugin API tests 2019-07-24 10:58:16 +02:00
Chocobozzz 9b474844e8 Add CLI plugins tests 2019-07-24 10:58:16 +02:00
Chocobozzz b5f919ac8e WIP plugins: update plugin 2019-07-24 10:58:16 +02:00
Chocobozzz 8d2be0ed7b WIP plugins: move plugin CLI in peertube script
Install/uninstall/list plugins remotely
2019-07-24 10:58:16 +02:00
Chocobozzz fd0bfc3ac4
peertube auth add wants a URL (and not a host) 2019-07-04 15:03:15 +02:00
Chocobozzz 6b226c3278
Fix CLI default boolean values 2019-06-17 08:16:09 +02:00
Chocobozzz 1205823fec
Add ability to override CLI import attributes 2019-06-13 13:53:28 +02:00
Chocobozzz 1a12f66d63
Add more CLI tests 2019-06-13 11:09:38 +02:00
Chocobozzz fc8c024a1b
Fix upload script 2019-06-11 10:39:30 +02:00
Chocobozzz 9f167f12aa
Fix netrc tools 2019-06-11 09:25:20 +02:00
Chocobozzz 46b2cec73c Remove summon install 2019-05-27 14:56:06 +02:00
Chocobozzz 7e9d3f259d Move CLI dependencies in their own package.json 2019-05-27 14:56:06 +02:00
Chocobozzz 2b4dd7e26d
Fix optional privacy in upload endpoint 2019-04-25 13:55:28 +02:00
Chocobozzz e8a739e880
Fix video import CLI script
Password is an optional argument
2019-04-24 16:51:25 +02:00
Chocobozzz 94565d52bb
Shared utils -> extra-utils
Because they need dev dependencies
2019-04-24 16:25:52 +02:00
Chocobozzz 74dc3bca2b
Don't expose constants directly in initializers/ 2019-04-11 14:26:41 +02:00
Chocobozzz c74c9be934
Refractor published date on video import 2019-02-12 11:47:23 +01:00
Andrés Maldonado 84929846e7
Import original publication date (CLI)
* Import original publication date when importing a video from YouTube using the CLI
* Fix lint issues
2019-02-12 11:19:19 +01:00
Chocobozzz 88108880bb
Merge branch 'develop' into pr/1217 2019-02-11 11:52:34 +01:00
Chocobozzz bb8f7872f5
Fix peertube CLI documentation 2019-01-14 11:01:40 +01:00
HesioZ ab4dbe3657 Remove the eventual trailing '/' at the end of urls (see #1453) (#1480)
remove eventual trailing '/' at the end of urls in import script (see #1453)
2018-12-15 01:43:04 +01:00
Chocobozzz 2a8c5d0af1
Merge branch 'move-utils-to-shared' of https://github.com/buoyantair/PeerTube into buoyantair-move-utils-to-shared 2018-12-07 16:25:29 +01:00
Chocobozzz 1b5e2d7290
Optimize config endpoint 2018-11-23 11:07:00 +01:00
buoyantair ae28cdf327 Merge from upstream 2018-11-16 02:37:16 +05:30
Chocobozzz e5cb43e071
Clean up peertube auth 2018-11-14 16:32:28 +01:00
buoyantair 9639bd1757 Move utils to /shared
Move utils used by /server/tools/* & /server/tests/**/* into
/shared folder.

Issue: #1336
2018-10-29 22:18:31 +05:30
BRAINS YUM fa27f07637 allow peertube-import-videos.ts CLI script to run concurrently (#1334)
allows running multiple imports at the same time, whereas previously a concurrent instance of the script deleted another processe's file.
2018-10-24 20:07:51 +02:00
Frank de Lange 8684f3c1f6 Fix #1328 - application-config initialisation in CLI tools (#1343)
Test for an empty object in `cli.ts` when no config data is present (i.e. when run on a new install).
2018-10-24 12:28:25 +02:00
Rigel Kent 7cf3e57376 (doc) add manpage to peertube cli 2018-10-20 19:16:56 +02:00
Rigel Kent c141f68be1
add repl to the cli wrapper, remove extraneous TOC in tools.md 2018-10-19 14:24:35 +02:00
BRAINS YUM 1e59ca3bac add REPL in server/tools/repl.ts (#1248) 2018-10-14 19:48:08 +02:00
Lucas Declercq 7f2cfe3a79 Rename downloadingEnabled property to downloadEnabled 2018-10-08 14:45:22 +02:00
Lucas Declercq 4ffdcfc63b Fix some defaults values + indentation 2018-10-08 14:42:55 +02:00
Lucas Declercq 156c50af30 Add downloadingEnabled property to video model 2018-10-06 19:17:39 +02:00
Chocobozzz 499d901595
Fix config endpoint 2018-10-03 14:36:00 +02:00
Rigel Kent abb2c7927c show last commit hash alongside server version in footer 2018-10-01 14:31:01 +02:00
Andrew Morgan 26b4151762 Define channelId property beforehand 2018-10-01 14:14:49 +02:00
Andrew Morgan c01cfce40b Allow specification of Channel ID in peertube-upload.js 2018-10-01 14:14:49 +02:00
Chocobozzz 542e73a26b
Improve upliad script error handling for token 2018-09-26 15:16:48 +02:00
Chocobozzz 5c142a4bab
Fix peertube script 2018-09-20 16:35:48 +02:00
Rigel Kent 8704acf49e
one cli to unite them all
Ash nazg thrakatulûk agh burzum-ishi krimpatul

- refactor import-videos to use the youtubeDL helper
- add very basic tests for the cli
2018-09-14 11:08:55 +02:00
Chocobozzz ea853b7282
Fix import videos duplicate detection 2018-09-04 11:25:40 +02:00
Chocobozzz d02911fadd
Fix thumbnail/preview in upload script 2018-09-03 11:12:53 +02:00
Chocobozzz 62689b942b
Correctly migrate to fs-extra 2018-08-27 16:23:34 +02:00
Rigel Kent c9d5c64f98 replace fs by fs-extra to prevent EMFILE error 2018-08-27 16:03:57 +02:00
Rigel Kent c1e791bad0
expliciting type checks and predicates (server only) 2018-07-25 22:01:25 +02:00
Chocobozzz 2186386cca
Add concept of video state, and add ability to wait transcoding before
publishing a video
2018-06-12 20:37:51 +02:00
John Livingston 8a2db2e8cb linting 2018-05-11 15:23:50 +02:00
John Livingston 7eb5f8cd32 fix reject 2018-05-11 15:23:50 +02:00
John Livingston e2b9d0ca56 Standard code 2018-05-11 15:23:50 +02:00
John Livingston 066fc8ba71 import-videos: prompt for password 2018-05-11 15:23:50 +02:00