Skip to main content

Youtube Music package to upload your music library to Youtube Music

Project description

logo

Youtube Music Uploader

latest release PyPI version PayPal donation Buy me a coffee Buy me a cofee

DISCLAIMER: As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support on Patreon.

(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)

This program will create a Daemonic folder to upload your music library to Youtube Music

This work is based upon Sigma67’s Youtube Music API.

Installation

This program needs watchdog, ytmusicapi and requests Python libraries to work.

apt-get install python3-pip build-essential
pip3 install youtube-music-uploader

Once installed, You have to authenticate to Youtube Music via the youtube-music-auth command

# Usage youtube-music-auth [path_to_oauth_cred_file=~/oauth]

If first parameter is not defined, the script will try to store/load your oauth credentials through the ~/oauth file.

Then follow the setup instructions provided https://ytmusicapi.readthedocs.io/en/latest/setup.html#copy-authentication-headers.

Usage

Uploader

This program will scan a given directory for new elements to upload them to Youtube Music. First, launch the daemon to watch a directory new inputs.

usage: youtube-music-upload [-h] [-v] [--directory DIRECTORY] [--oauth OAUTH] [-r]
                          [-o] [--deduplicate_api DEDUPLICATE_API]

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show version number and exit
  --directory DIRECTORY, -d DIRECTORY
                        Music Folder to upload from (default: .)
  --oauth OAUTH, -a OAUTH
                        Path to oauth file (default: ~/oauth)
  -r, --remove          Remove the file on your hard drive if it was already successfully uploaded (default: False)
  -o, --oneshot         Upload folder and exit (default: False)
  -l, --listener_only   Only listen for new files, does not parse all files at launch (default: False)
  -e ERROR_FILE_PATH, --log ERROR_FILE_PATH
                        Log to a specified file path (Default stderr)
  -w DEDUPLICATE_API, --deduplicate_api DEDUPLICATE_API
                        Deduplicate API (should be HTTP and compatible with
                        the manifest (see README)) (default: None)

Deduplicate

This program will send all files or the specified file to the deduplication API

usage: youtube-music-upload-deduplicate [-h] --deduplicate_api DEDUPLICATE_API
                                   [--directory DIRECTORY] [--file FILE]
                                   [--remove]

optional arguments:
  -h, --help            show this help message and exit
  --directory DIRECTORY, -d DIRECTORY
                        Music Folder to deduplicate
  --file FILE, -f FILE
                        Music file path to deduplicate
  -r, --remove          Unmark specified file/folder (default: False)
  -w DEDUPLICATE_API, --deduplicate_api DEDUPLICATE_API
                        Deduplicate API (should be HTTP and compatible with
                        the manifest (see README)) (default: None)

Deduplication API

Preface

This API is completely optional. You don’t have to implement this. It will only help you to avoid useless Google calls

Thanks to Brian Doherty, a local snapshot is now made to avoid external deduplication calls on local updated files.

You can use your own API implementation to avoid multiple Youtube Music uploads. This API should match with the following requirements.

You may want to use this existing one : Google MusicManager Deduplicate API.

Exists

path

method

parameter

status code

/

GET

name

description

value

description

path

path of your file

200 or 204

Your file was already uploaded

404 (or whatever)

Your file was NOT uploaded

Saving

path

method

parameter

status code

/

POST

name

description

value

description

path

path of your file

whatever

Status code does not change anything

Removing

path

method

parameter

status code

/

DELETE

name

description

value

description

path

path of your file

whatever

Status code does not change anything

About

Requirements

Youtube Music Uploader works with Python 3 or above.

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Jay MOULIN See also the list of contributors which participated in this program.

License

Youtube Music Uploader is licensed under the MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

youtube_music_uploader-1.3.3.tar.gz (9.5 kB view details)

Uploaded Source

File details

Details for the file youtube_music_uploader-1.3.3.tar.gz.

File metadata

  • Download URL: youtube_music_uploader-1.3.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for youtube_music_uploader-1.3.3.tar.gz
Algorithm Hash digest
SHA256 07eca77c322b915d29eb99744095d24d42df3b97d5a7f628c767da9a9299ea55
MD5 aae2c588449206ebeea21f1eaa2d94ba
BLAKE2b-256 ad08ee4f8d8359928ffce7f077ca7d60dbdd44d61356415f44492c8b6e0ed795

See more details on using hashes here.

Provenance

The following attestation bundles were made for youtube_music_uploader-1.3.3.tar.gz:

Publisher: build.yml on jaymoulin/youtube-music-uploader

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page