Coder Social home page Coder Social logo

pasansandeepa / manzana-apple-music-tagger Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dropcreations/manzana-apple-music-tagger

0.0 0.0 0.0 122 KB

A python script to fetch credits info from apple music about albums, songs and music-videos and tag MP4 and M4A files using those credits info.

Home Page: https://music.apple.com/us/browse

License: MIT License

Python 100.00%

manzana-apple-music-tagger's Introduction

Manzana-Apple-Music-Tagger

A python script to fetch credits info from apple music about albums, songs and music-videos and tag MP4 and M4A files using those credits info.

Apple Music

Features

  • Can tag an album or a single track or a music-video
  • Tags and saves artworks
  • Saves animated artworks if available
  • Saves time-synced lyrics if you have an Apple Music subscription
  • Also tags the lyrics to the media file if available

Required

How to use?

# for all users

First of all clone this project or download the project as a zip file and extract it to your pc.

git clone https://github.com/dropcreations/Manzana-Apple-Music-Tagger.git && cd Manzana-Apple-Music-Tagger

Install required modules for python (use pip3 if pip doesn't work for you)

pip install -r requirements.txt

You have to ready your files for tagging. So, if you are tagging a complete album you must have the tracks in M4A format (with AAC or ALAC codec) and then rename each file as 1, 2, 3,... respectively to the order of tracks in Apple Music. For an example, assume you have an album called "Doja Cat - Planet Her" in M4A format and they are currently renamed as below

Doja Cat - Planet Her (https://music.apple.com/us/album/planet-her/1573475827)
  │
  ├── Alone.m4a
  ├── Been Like This.m4a
  ├── Get Into It (Yuh).m4a
  ├── I Don't Do Drugs.m4a
  ├── Imagine.m4a
  ├── Kiss Me More.m4a
  ├── Love To Dream.m4a
  ├── Naked.m4a
  ├── Need to Know.m4a
  ├── Options.m4a
  ├── Payday.m4a
  ├── Women.m4a
  └── You Right.m4a

So, now you have to rename those as below.

Doja Cat - Planet Her (https://music.apple.com/us/album/planet-her/1573475827)
  │
  ├── Alone.m4a               as  12.m4a
  ├── Been Like This.m4a      as  9.m4a
  ├── Get Into It (Yuh).m4a   as  4.m4a
  ├── I Don't Do Drugs.m4a    as  6.m4a
  ├── Imagine.m4a             as  11.m4a
  ├── Kiss Me More.m4a        as  13.m4a
  ├── Love To Dream.m4a       as  7.m4a
  ├── Naked.m4a               as  2.m4a
  ├── Need to Know.m4a        as  5.m4a
  ├── Options.m4a             as  10.m4a
  ├── Payday.m4a              as  3.m4a
  ├── Women.m4a               as  1.m4a
  └── You Right.m4a           as  8.m4a

After renaming tracks, open terminal inside the folder that tracks included and run below command (Use py or python3 if python doesn't work for you)

python manzana.py [album_url]

or if you are opening the terminal outside that folder, use below command

python manzana.py --path [folder_path] [album_url]

If you are tagging a single file, don't need to rename it. just use below command

python manzana.py --path [file_path] [song_url]

If you want to get animated cover if available, use --animated argument

python manzana.py --animated [album or song url]

Get help using -h or --help command

usage: manzana.py [-h] [-sp {2,3}] [-an] [-cn] [-ln] [-p PATH] url

Manzana: Apple Music albums, songs, music-videos tagger

positional arguments:
  url                               URL from Apple Music for a album, song or music-video

optional arguments:
  -h, --help                        Show this help message and exit
  -sp {2,3}, --sync-points {2,3}    Miliseconds point count in synced lyrics
  -an, --animated                   Download the animated artwork if available
  -cn, --no-cache                   Don't look for cache
  -ln, --no-sync-lrc                Don't save synced lyrics as a '.lrc'
  -p PATH, --path PATH              Folder or file path for media

# for subscribed users

Get your Apple Music cookies from web browser and paste it in ./config/cookies folder. Doesn't matter if cookies in .txt or .json format, both are accepted. You need to add cookies to get lyricist and lyrics and also to save time-synced-lyrics as a .lrc file.

When saving time synced lyrics, timestamps are in 00:00.000 format. If you want to get it in 00:00.00 format set --sync-points as 2 as below

python manzana.py --sync-points 2 [album or song url]

If you don't want to use the previous cache, use --no-cache argument.

python manzana.py --no-cache [album or song url]

If you don't want to get time synced lyrics as .lrc file, use --no-sync-lrc argument.

python manzana.py --no-sync-lrc [album or song url]

About me

Hi, I'm Dinitha. You might recognize me as GitHub's dropcreations.

Other usefull python scripts done by me

Project Github location
MKVExtractor https://github.com/dropcreations/MKVExtractor
FLAC-Tagger https://github.com/dropcreations/FLAC-Tagger
MP4/M4A-Tagger https://github.com/dropcreations/MP4-Tagger
MKV-Tagger https://github.com/dropcreations/MKV-Tagger

  • NOTE: If you found any issue using this script mention in issues section

manzana-apple-music-tagger's People

Contributors

dropcreations avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.