An overly complex tool to mirror youtube content to LBRY
Find a file
dependabot[bot] b22f9ad5f4
Bump golang.org/x/text from 0.3.7 to 0.3.8
Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-23 09:31:59 +00:00
blobs_reflector upgrade reflector to switch to wasabi 2021-04-12 23:31:37 +02:00
configs refactor get video time 2021-12-30 13:17:11 -05:00
downloader fix nil ptr? 2022-08-16 02:41:14 +02:00
e2e fix api failures 2022-05-04 19:17:36 +02:00
ip_manager revert aria2c usage 2021-06-25 19:09:00 +02:00
manager fix channel update process 2022-08-15 22:42:06 +02:00
metrics refactor get video time 2021-12-30 13:17:11 -05:00
namer fix issues with unicode claim names 2021-03-23 01:18:26 +01:00
scripts fix modules pollution 2019-02-27 20:19:29 +01:00
sdk fix api failures 2022-05-04 19:17:36 +02:00
shared never retry those hardcoded errors 2022-08-16 03:06:39 +02:00
sources idk... let's work around this for now 2022-08-16 02:51:35 +02:00
tags_manager refactor tags_mapping name 2019-10-21 15:44:24 +02:00
thumbs switch from env vars to a config file 2021-11-24 05:54:08 +01:00
timing fix semver 2020-06-11 18:45:56 +02:00
util improve error handling 2021-12-02 16:59:14 +01:00
ytapi this is actually necessary 2022-08-16 02:14:33 +02:00
.gitignore update gitignore 2021-11-24 18:37:04 +01:00
.goreleaser.yml update goreleaser 2020-01-11 22:11:44 -05:00
.travis.yml fix go version in travis 2022-05-04 19:22:19 +02:00
0001-lbry-patch.patch add new throttling detection 2019-12-16 00:29:56 +01:00
config.json.example add example config 2021-11-24 18:39:24 +01:00
go.mod Bump golang.org/x/text from 0.3.7 to 0.3.8 2023-02-23 09:31:59 +00:00
go.sum Bump golang.org/x/text from 0.3.7 to 0.3.8 2023-02-23 09:31:59 +00:00
LICENSE Update LICENSE 2020-02-03 04:08:28 +07:00
main.go add language to channels 2022-08-09 22:11:42 +02:00
Makefile Add retry on IP failures 2020-08-05 15:47:53 -04:00
README.md update readme 2021-11-24 18:58:38 +01:00

YTSync Tool

Build Status

This tool serves lbry to parse youtube channels that want their content mirrored on LBRY.

The tool downloads the entire set of public videos from a given channel, publishes them to LBRY and populates our private database in order to keep track of what's publishes. With the support of said database, the tool is also able to keep all the channels updated.

Requirements

  • lbrynet SDK https://github.com/lbryio/lbry-sdk/releases (We strive to keep the latest release of ytsync compatible with the latest major release of the SDK)
  • a lbrycrd node running (localhost or on a remote machine) with credits in it
  • internal-apis (you cannot run this one yourself)
  • python3-pip
  • yt-dlp (pip3 install -U yt-dlp)
  • ffmpeg (latest)

Setup

  • make sure daemon is stopped and can be controlled through systemctl (find example below)
  • extract the ytsync binary anywhere
  • create and fill config.json using this example

systemd script example

/etc/systemd/system/lbrynet.service

[Unit]
Description="LBRYnet daemon"
After=network.target

[Service]
Environment="HOME=/home/lbry"
ExecStart=/opt/lbry/lbrynet start
User=lbry
Group=lbry
Restart=on-failure
KillMode=process

[Install]
WantedBy=multi-user.target

Instructions

Publish youtube channels into LBRY network automatically.

Usage:
  ytsync [flags]

Flags:
      --after int                   Specify from when to pull jobs [Unix time](Default: 0)
      --before int                  Specify until when to pull jobs [Unix time](Default: current Unix time) (default 1669311891)
      --channelID string            If specified, only this channel will be synced.
      --concurrent-jobs int         how many jobs to process concurrently (default 1)
  -h, --help                        help for ytsync
      --limit int                   limit the amount of channels to sync
      --max-length int              Maximum video length to process (in hours) (default 2)
      --max-size int                Maximum video size to process (in MB) (default 2048)
      --max-tries int               Number of times to try a publish that fails (default 3)
      --no-transfers                Skips the transferring process of videos, channels and supports
      --quick                       Look up only the last 50 videos from youtube
      --remove-db-unpublished       Remove videos from the database that are marked as published but aren't really published
      --run-once                    Whether the process should be stopped after one cycle or not
      --skip-space-check            Do not perform free space check on startup
      --status string               Specify which queue to pull from. Overrides --update
      --status2 string              Specify which secondary queue to pull from.
      --takeover-existing-channel   If channel exists and we don't own it, take over the channel
      --update                      Update previously synced channels instead of syncing new ones
      --upgrade-metadata            Upgrade videos if they're on the old metadata version
      --videos-limit int            how many videos to process per channel (leave 0 for automatic detection)

Running from Source

Clone the repository and run make

License

This project is MIT licensed. For the full license, see LICENSE.

Contributing

Contributions to this project are welcome, encouraged, and compensated. For more details, see CONTRIBUTING.

Security

We take security seriously. Please contact security@lbry.io regarding any security issues. Our PGP key is here if you need it.

Contact

The primary contact for this project is Niko Storni (niko@lbry.com).