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.
Metadata
Release files for apple-music-import 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| apple_music_import-0.1.2.tar.gz | 12.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apple_music_import-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.2 kB
Release files / apple_music_import-0.1.2.tar.gz
| Download URL | apple_music_import-0.1.2.tar.gz |
|---|---|
| Size | 12.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3543c63b5e98e7357c3a040c80d36712cc55650b53eba3840da818c2a318de3f
|
|
BLAKE2b-256 checksum How to use checksums |
143ed2097761cf0fabb7d2aec1a86efd6cfb5e22634e769e577815416765a663
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|
Release files / apple_music_import-0.1.2-py3-none-any.whl
| Download URL | apple_music_import-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5cb6c919fbd6496020e1e2c1c82b89fbb34127ba3520a11196bf9c977dc7f36
|
|
BLAKE2b-256 checksum How to use checksums |
cb902bb8e517999573a94881766450b251c4f84e9316973cd49d3ec4ff75e329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.2
|