Skip to content

Renames mp3 audiofiles using acoustid web-api

Notifications You must be signed in to change notification settings

TheLycaeum/Audio-renamer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Improperly named audio files are great sorrow while enjoying the music. This project renames mp3 files in a selected directory as the user prefers with the help of AcoustID web service.

AcoustID

AcoustID web service helps us to search our song in their audio database and get the details. In order to use the web service from your application, you need to register the application and collect the API key.

Background

This project is broken down in the following parts:

  • Gets a list of mp3 files from the given directory
  • Makes fingerprints of mp3 files
  • Checks the fingerprint in the database and get details
  • Asks user suggestion to rename
  • Renames the mp3file based on user input

Read more about the project in the blog.

Usage

Requires python3.x

 Renames mp3 files in a selected directory based on the data from
 acoustid web service.

positional arguments:
  audio_path       file-path of the mp3 directory

optional arguments:
  -h, --help       show this help message and exit
  --style [STYLE]  If 'style' is True, renames will have titles of the song. If
                   'style' is False, renames will be a combination of artists
                   and title. (default: False)

Requirements

Check ‘requirements.txt’ for dependencies

  • Install them with:
    pip install -r requirements.txt    
        
  • To add more dependencies, use pip and:
    pip freeze > requirements.txt
        

Tests

Tests can be run, once required dependencies are there. To test:

pytest test_audio_renamer

To check coverage of these tests:

pytest --cov=audio_renamer
  • `test_audio_renamer.py` contains tests for `audio_renamer`. It has 63% coverage.

About

Renames mp3 audiofiles using acoustid web-api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%