convert, tag cover images, and import music files into Apple Music
Project description
Apple Music Import
App to bulk import music from multiple folders into Apple Music.
Please consider purchasing music you download if you want to support small, weird and independent artists!
Requirements
This has only been tested on MacOS 15.4.1 on Apple M1 Max
Setup
- Clone this repository locally
- Run
uv venvto set up and activate virtual env - Run
uv pip install -r pyproject.tomlto install all packages
Run App
Run poe run to run the app and import all files found give the configuration
(see Configuration section).
During the run, the app will search for folders containing music based on the configuration, then it will attempt the following steps for each folder:
- Convert music files in the folder to Apple Lossless mp4 if they aren't already, using the Apple Lossless Audio Codec, carrying over all of the ID3 metadata
- Find all Apple Lossless mp4s in the folder
- Check and see if a cover image has been provided for the album
- if there is a cover image named as specified in the config, the app will tag the music files with this image
- if there are multiple images in the folder, it will display them and ask you to choose one, or provide a URL to an image
- if there are no image files in the folder, it will ask you to provide a URL to an image
- Import all files in the folder into Apple Music
- If the app is configured to delete the folder after successfully importing all files, it will do so. Some of the existing folder types in this repo (bandcamp, Soulseek) available in this app will also delete the parent folder if there are no other files in it beside the album that was uploaded
Configuration
Delete Folder After Import
src/config.py:DELETE_FOLDER_AFTER_IMPORT - set boolean to determine delete behavior
after folder contents are imported.
Music Folders Search Space
src/config.py:FOLDER_TYPE_GLOB_MAPPINGS - for a given concrete class of
AbstractAlbumFolder, set a list of unix-style glob strings that will locate folders
that should be processes by said concrete class.
Music Folder Types
You can create new concrete class instances of AbstractAlbumFolder abstract class
and place them in src/folder_classes/. Each of these classes represent a type of
folder containing an album of music files, with or without a cover image. The concrete
class can optionally set the name of cover images in the folder (if they exist and
have consistent naming), and must specify a method for deleting the folder when the
import is done.
Development
poethepoet is used as a task runner to
simplify common operations.
Linting
poe lintto lint codepoe lint:fixif you want automatic fixing of linting issues
poe doclintto lint docstrings
Formatting
poe formatto format code
Testing
Testing is done with pytest
poe testto run all tests
Building
poe buildto build the app intodist/
Publishing
poe publishto publish to PyPi. You must have an API token for PyPi to do this
Contributing
Please read and follow these guidelines to help keep the project consistent and maintainable
General Rules
- Do NOT open pull requests directly against
main.- Fork a copy of the repo and open your PR against
devon the main repo
- Fork a copy of the repo and open your PR against
- All pull requests should be focused, small, and ideally scoped to a single change or fix
- Ensure your branch is up to date with the base branch before opening a PR
Test Coverage
- If you’re adding a new feature, include full test coverage
- Run
poe testto ensure all tests pass
Code Style
This repo contains pre-commit hooks to make sure code passes above lint and format checks as well as making sure that commit message is formatted as a conventional commit
- Run
poe lint:fixto auto-fix linting issues andpoe formatto auto-format code - Use conventional commit messages
Docs
- Update documentation for any new feature or behavior change
- Ensure docstrings are present and lint them using
poe doclint
Communication
- For significant changes, please open an issue first to discuss your ideas.
- PRs may be reviewed and require changes before being merged.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apple_music_import-0.1.2.tar.gz.
File metadata
- Download URL: apple_music_import-0.1.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3543c63b5e98e7357c3a040c80d36712cc55650b53eba3840da818c2a318de3f
|
|
| MD5 |
4bb68ab76bfeb1be15d0fb6d886fcd2c
|
|
| BLAKE2b-256 |
143ed2097761cf0fabb7d2aec1a86efd6cfb5e22634e769e577815416765a663
|
File details
Details for the file apple_music_import-0.1.2-py3-none-any.whl.
File metadata
- Download URL: apple_music_import-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5cb6c919fbd6496020e1e2c1c82b89fbb34127ba3520a11196bf9c977dc7f36
|
|
| MD5 |
00af91932884a03026accb324629d7ff
|
|
| BLAKE2b-256 |
cb902bb8e517999573a94881766450b251c4f84e9316973cd49d3ec4ff75e329
|