Skip to content

Python project that updates metadata (including album art) and searches for lyrics from the Genius API.

License

Notifications You must be signed in to change notification settings

Fingolfin7/Music-Metadata-and-Lyrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music-Metadata-and-Lyrics

Python project that updates metadata (including album art) and searches for lyrics from the Genius API.

Requirements

Getting the project

Download the project or clone it with git. You can create a virtual environment if you can. Install the requisites by running

pip install -r requirements.txt

You will need to create an auth_token.txt file in the Source folder and paste a Genius token inside it. You can generate a genius token here

Update Metadata

Metadata.py takes in an mp3 file (or a folder path) and searches for the corresponding metadata from Genius.com using the Genius API and Eyed3 module.

Here is an example in a test folder I made:

image

Run Metadata Search (collected from Genius.com):

image

Finished Search:

image

Updated mp3 file:

image

Metadata.py contains the funtcion get_metadata,

get_metadata(song_file, art_option=0)

Which is called with a file path to an mp3 file, and an optional art_option which is set to 0 by default.

Setting art_option to 0 will update the file with the songs Album Art,

Setting it to 1 will update the file to the songs Song Art, which sometimes differ.

Search Song Lyrics

GeniusLyrics.py takes in a song name and artist name and searches Genius.com for the lyrics. The lyrics are saved to a json file called song_lyrics.json. Searches are performed on this saved data when offline. Here is an example, running GUI.py which is a simple gui for getting song lyrics

Example Search:

image

Output:

image

Contribute to the project

Take a look, run the code, and contribute if you'd like!

About

Python project that updates metadata (including album art) and searches for lyrics from the Genius API.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages