Git Product home page Git Product logo

artgetter's Introduction

About

artgetter is a python module for batch searching and downloading album arts for music file that doesn't have id3 tag or tags in general, therefore it's searching using the file name.

How to use it

To search and download

There are two methods for searching album arts:

  • Search from folder

    • This method will scan through your music library and automatically search for each track and download the art (if it found any).
  • Search from list

    • This method requires a list of each path to your tracks, and then artgetter will scan that list and automatically search and download it.

Examples

Folder Mode:

from artgetter import AlbumArtGetter  # import the module

music_library_path = r'C:\Users\Kevin\Music\OneDirectory'
art_size = 128

getter = AlbumArtGetter()  # instantiate the class (you can optionally pass the image output path to this class)
getter.set_output_path("D:/img/")  # set the image output path
getter.get_art(music_library_path, art_size, folder_mode=True)  # initiate search

Non Folder Mode:

from artgetter import AlbumArtGetter  # import the module

music_list = [r'C:\Users\Kevin\Music\OneDirectory\Didrick - Ready To Fly (feat. Adam Young).mp3',
              r'C:\Users\Kevin\Music\OneDirectory\TheFatRat - MAYDAY feat. Laura Brehm.mp3',
              r'C:\Users\Kevin\Music\OneDirectory\AURORA - Runaway.mp3']
art_size = 128

getter = AlbumArtGetter()  # instantiate the class (you can optionally pass the image output path to this class)
getter.set_output_path("D:/img/")  # set the image output path
getter.get_art(music_list, art_size, folder_mode=False)  # initiate search

To get the image path

To get the path of each downloaded image, see the code below:

from artgetter import AlbumArtGetter  # import the module

music_list = [r'C:\Users\Kevin\Music\OneDirectory\Didrick - Ready To Fly (feat. Adam Young).mp3',
              r'C:\Users\Kevin\Music\OneDirectory\TheFatRat - MAYDAY feat. Laura Brehm.mp3',
              r'C:\Users\Kevin\Music\OneDirectory\AURORA - Runaway.mp3']
art_size = 128

getter = AlbumArtGetter()  # instantiate the class (you can optionally pass the image output path to this class)
getter.set_output_path("D:/img/")  # set the image output path
getter.get_art(music_list, art_size, folder_mode=False)  # initiate search

paths = getter.get_arts_path()  # get the path of each image
print(paths)

The function get_arts_path() will return a list.

['D:/img/0.jpg', 'D:/img/1.jpg', 'D:/img/2.jpg']

if the image is not found or failed to download, the path will look like this inside the list:

['D:/img/0 null', 'D:/img/1 null', 'D:/img/2 null']

artgetter's People

Contributors

blitpxl avatar

Watchers

 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.