beets-moreart 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: beets-moreart
3
+ Version: 0.1.0
4
+ Summary: Fetch additional album artwork for beets
5
+ Author: Jaedon D. Swanson
6
+ Keywords: beets,music,album-art,artwork
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: beets>=2.0.0
10
+
11
+ # beets-moreart
12
+
13
+ A [beets](https://beets.io) plugin that fetches extra album artwork from
14
+ Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB.
15
+
16
+ ## Quick Start
17
+
18
+ Install from the MoreArt project directory for local testing:
19
+
20
+ ```bash
21
+ pipx inject beets .
22
+ ```
23
+
24
+ Enable the plugin in your Beets configuration:
25
+
26
+ ```yaml
27
+ plugins:
28
+ - moreart
29
+ ```
30
+
31
+ Fetch artwork for your library:
32
+
33
+ ```bash
34
+ beet moreart
35
+ ```
36
+
37
+ Artwork is saved in each album directory:
38
+
39
+ ```text
40
+ Artist/
41
+ └── Album/
42
+ ├── back.jpg
43
+ ├── discart.png
44
+ └── spine.jpg
45
+ ```
46
+
47
+ ## What does this do?
48
+
49
+ Beets' built-in `fetchart` plugin fetches front-cover artwork. **beets-moreart**
50
+ looks for additional artwork: disc art, spine images, and back covers. It searches Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB, then saves the results beside the album's music files.
51
+
52
+ MusicBrainz lookups use the album's release ID. Fanart.tv and TheAudioDB credentials are optional; sources without a configured key are skipped.
53
+
54
+ ## Installation
55
+
56
+ ### With pip
57
+
58
+ After the package has been published to PyPI:
59
+
60
+ ```bash
61
+ pip install beets-moreart
62
+ ```
63
+
64
+ ### With pipx
65
+
66
+ After the package has been published to PyPI:
67
+
68
+ ```bash
69
+ pipx inject beets beets-moreart
70
+ ```
71
+
72
+ ### From this checkout
73
+
74
+ Run these commands from the MoreArt project directory. Use the `pipx` command
75
+ when Beets is installed in a pipx-managed environment; otherwise use pip with
76
+ the same Python environment as Beets.
77
+
78
+ ```bash
79
+ pipx inject beets .
80
+ # Or, when Beets and the plugin share a Python environment:
81
+ python -m pip install .
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ Add the plugin to your Beets configuration file (`config.yaml`):
87
+
88
+ ```yaml
89
+ plugins:
90
+ - moreart
91
+
92
+ moreart:
93
+ fanarttv_key: YOUR_API_KEY
94
+ theaudiodb_key: YOUR_API_KEY
95
+ sources: [fanarttv, theaudiodb, musicbrainz]
96
+ types: [discart, spine, back]
97
+ run_on_import: yes
98
+ timeout: 15
99
+ cache_results: yes
100
+ recheck_days: 30
101
+ resize:
102
+ enabled: yes
103
+ discart: [1000, 1000]
104
+ back: [750, 750]
105
+ spine: [35, 700]
106
+ fuzz: 15%
107
+ background:
108
+ multi_corner: yes
109
+ ```
110
+
111
+ Adjust options as desired:
112
+
113
+ | Parameter | Default | Description |
114
+ | :--- | :--- | :--- |
115
+ | `fanarttv_key` | `null` | Optional Fanart.tv API key |
116
+ | `theaudiodb_key` | `null` | Optional TheAudioDB API key |
117
+ | `sources` | `[fanarttv, theaudiodb, musicbrainz]` | Sources to try, in order |
118
+ | `types` | `[discart, spine, back]` | Artwork types to fetch |
119
+ | `run_on_import` | `yes` | Fetch artwork after an album is imported |
120
+ | `timeout` | `15` | Seconds to wait for each HTTP request |
121
+ | `cache_results` | `yes` | Remember artwork types that had no usable result |
122
+ | `recheck_days` | `30` | Days to wait before retrying cached no-artwork results |
123
+ | `resize.enabled` | `yes` | Resize fetched images when ImageMagick is available |
124
+ | `resize.discart` | `[1000, 1000]` | Disc art dimensions |
125
+ | `resize.back` | `[750, 750]` | Back-cover dimensions |
126
+ | `resize.spine` | `[35, 700]` | Spine dimensions |
127
+ | `fuzz` | `15%` | ImageMagick color tolerance for disc-art background removal |
128
+ | `background.multi_corner` | `yes` | Remove the background from multiple disc-art edges |
129
+
130
+ ## Usage
131
+
132
+ ### Automatic (during import)
133
+
134
+ When `run_on_import` is enabled, MoreArt checks for artwork after an album is
135
+ imported. Existing artwork is left alone.
136
+
137
+ ### Manual (on demand)
138
+
139
+ | Command | Description |
140
+ | :--- | :--- |
141
+ | `beet moreart` | Fetch configured artwork for all albums |
142
+ | `beet moreart beatles` | Fetch artwork for matching albums |
143
+ | `beet moreart --pretend` | Show planned source/type attempts without downloading or saving |
144
+ | `beet moreart --force` | Ignore cached no-artwork results and search again |
145
+
146
+ Only negative results are cached. Existing artwork is checked on disk each
147
+ time, and changing the configured sources, API keys, or album metadata triggers
148
+ a fresh lookup. `--force` bypasses cached misses; it does not overwrite artwork
149
+ that already exists.
150
+
151
+ After a manual run, MoreArt prints a summary:
152
+
153
+ ```text
154
+ ========================================
155
+ MoreArt summary
156
+ Albums checked: 12
157
+ Artwork saved: 18
158
+ Already present: 14
159
+ Cached no-image: 2
160
+ No image saved: 4
161
+ Would fetch (pretend): 0
162
+ Albums missing path: 0
163
+ ========================================
164
+ ```
165
+
166
+ ## How it Works
167
+
168
+ 1. Checks the album directory and skips artwork that is already present.
169
+ 2. Uses configured sources in order, falling back when no usable image is returned.
170
+ 3. Saves valid images beside the album files.
171
+ 4. Caches missing-artwork searches on the album record and retries after the configured interval.
172
+ 5. Converts back and spine artwork to JPEG when ImageMagick is installed.
173
+ 6. Keeps disc art as PNG when ImageMagick is installed so transparency is preserved.
174
+
175
+ ## Requirements
176
+
177
+ - Beets 2.0.0 or newer
178
+ - Python 3.9 or later
179
+ - Internet access
180
+
181
+ The plugin uses Python's standard library for HTTP requests and adds no
182
+ third-party Python runtime dependency beyond Beets. ImageMagick (`magick` or
183
+ `convert`) is optional; it enables conversion, resizing, and disc-art background
184
+ removal. Without it, images are saved in their original format.
@@ -0,0 +1,174 @@
1
+ # beets-moreart
2
+
3
+ A [beets](https://beets.io) plugin that fetches extra album artwork from
4
+ Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB.
5
+
6
+ ## Quick Start
7
+
8
+ Install from the MoreArt project directory for local testing:
9
+
10
+ ```bash
11
+ pipx inject beets .
12
+ ```
13
+
14
+ Enable the plugin in your Beets configuration:
15
+
16
+ ```yaml
17
+ plugins:
18
+ - moreart
19
+ ```
20
+
21
+ Fetch artwork for your library:
22
+
23
+ ```bash
24
+ beet moreart
25
+ ```
26
+
27
+ Artwork is saved in each album directory:
28
+
29
+ ```text
30
+ Artist/
31
+ └── Album/
32
+ ├── back.jpg
33
+ ├── discart.png
34
+ └── spine.jpg
35
+ ```
36
+
37
+ ## What does this do?
38
+
39
+ Beets' built-in `fetchart` plugin fetches front-cover artwork. **beets-moreart**
40
+ looks for additional artwork: disc art, spine images, and back covers. It searches Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB, then saves the results beside the album's music files.
41
+
42
+ MusicBrainz lookups use the album's release ID. Fanart.tv and TheAudioDB credentials are optional; sources without a configured key are skipped.
43
+
44
+ ## Installation
45
+
46
+ ### With pip
47
+
48
+ After the package has been published to PyPI:
49
+
50
+ ```bash
51
+ pip install beets-moreart
52
+ ```
53
+
54
+ ### With pipx
55
+
56
+ After the package has been published to PyPI:
57
+
58
+ ```bash
59
+ pipx inject beets beets-moreart
60
+ ```
61
+
62
+ ### From this checkout
63
+
64
+ Run these commands from the MoreArt project directory. Use the `pipx` command
65
+ when Beets is installed in a pipx-managed environment; otherwise use pip with
66
+ the same Python environment as Beets.
67
+
68
+ ```bash
69
+ pipx inject beets .
70
+ # Or, when Beets and the plugin share a Python environment:
71
+ python -m pip install .
72
+ ```
73
+
74
+ ## Configuration
75
+
76
+ Add the plugin to your Beets configuration file (`config.yaml`):
77
+
78
+ ```yaml
79
+ plugins:
80
+ - moreart
81
+
82
+ moreart:
83
+ fanarttv_key: YOUR_API_KEY
84
+ theaudiodb_key: YOUR_API_KEY
85
+ sources: [fanarttv, theaudiodb, musicbrainz]
86
+ types: [discart, spine, back]
87
+ run_on_import: yes
88
+ timeout: 15
89
+ cache_results: yes
90
+ recheck_days: 30
91
+ resize:
92
+ enabled: yes
93
+ discart: [1000, 1000]
94
+ back: [750, 750]
95
+ spine: [35, 700]
96
+ fuzz: 15%
97
+ background:
98
+ multi_corner: yes
99
+ ```
100
+
101
+ Adjust options as desired:
102
+
103
+ | Parameter | Default | Description |
104
+ | :--- | :--- | :--- |
105
+ | `fanarttv_key` | `null` | Optional Fanart.tv API key |
106
+ | `theaudiodb_key` | `null` | Optional TheAudioDB API key |
107
+ | `sources` | `[fanarttv, theaudiodb, musicbrainz]` | Sources to try, in order |
108
+ | `types` | `[discart, spine, back]` | Artwork types to fetch |
109
+ | `run_on_import` | `yes` | Fetch artwork after an album is imported |
110
+ | `timeout` | `15` | Seconds to wait for each HTTP request |
111
+ | `cache_results` | `yes` | Remember artwork types that had no usable result |
112
+ | `recheck_days` | `30` | Days to wait before retrying cached no-artwork results |
113
+ | `resize.enabled` | `yes` | Resize fetched images when ImageMagick is available |
114
+ | `resize.discart` | `[1000, 1000]` | Disc art dimensions |
115
+ | `resize.back` | `[750, 750]` | Back-cover dimensions |
116
+ | `resize.spine` | `[35, 700]` | Spine dimensions |
117
+ | `fuzz` | `15%` | ImageMagick color tolerance for disc-art background removal |
118
+ | `background.multi_corner` | `yes` | Remove the background from multiple disc-art edges |
119
+
120
+ ## Usage
121
+
122
+ ### Automatic (during import)
123
+
124
+ When `run_on_import` is enabled, MoreArt checks for artwork after an album is
125
+ imported. Existing artwork is left alone.
126
+
127
+ ### Manual (on demand)
128
+
129
+ | Command | Description |
130
+ | :--- | :--- |
131
+ | `beet moreart` | Fetch configured artwork for all albums |
132
+ | `beet moreart beatles` | Fetch artwork for matching albums |
133
+ | `beet moreart --pretend` | Show planned source/type attempts without downloading or saving |
134
+ | `beet moreart --force` | Ignore cached no-artwork results and search again |
135
+
136
+ Only negative results are cached. Existing artwork is checked on disk each
137
+ time, and changing the configured sources, API keys, or album metadata triggers
138
+ a fresh lookup. `--force` bypasses cached misses; it does not overwrite artwork
139
+ that already exists.
140
+
141
+ After a manual run, MoreArt prints a summary:
142
+
143
+ ```text
144
+ ========================================
145
+ MoreArt summary
146
+ Albums checked: 12
147
+ Artwork saved: 18
148
+ Already present: 14
149
+ Cached no-image: 2
150
+ No image saved: 4
151
+ Would fetch (pretend): 0
152
+ Albums missing path: 0
153
+ ========================================
154
+ ```
155
+
156
+ ## How it Works
157
+
158
+ 1. Checks the album directory and skips artwork that is already present.
159
+ 2. Uses configured sources in order, falling back when no usable image is returned.
160
+ 3. Saves valid images beside the album files.
161
+ 4. Caches missing-artwork searches on the album record and retries after the configured interval.
162
+ 5. Converts back and spine artwork to JPEG when ImageMagick is installed.
163
+ 6. Keeps disc art as PNG when ImageMagick is installed so transparency is preserved.
164
+
165
+ ## Requirements
166
+
167
+ - Beets 2.0.0 or newer
168
+ - Python 3.9 or later
169
+ - Internet access
170
+
171
+ The plugin uses Python's standard library for HTTP requests and adds no
172
+ third-party Python runtime dependency beyond Beets. ImageMagick (`magick` or
173
+ `convert`) is optional; it enables conversion, resizing, and disc-art background
174
+ removal. Without it, images are saved in their original format.
@@ -0,0 +1,184 @@
1
+ Metadata-Version: 2.4
2
+ Name: beets-moreart
3
+ Version: 0.1.0
4
+ Summary: Fetch additional album artwork for beets
5
+ Author: Jaedon D. Swanson
6
+ Keywords: beets,music,album-art,artwork
7
+ Requires-Python: >=3.9
8
+ Description-Content-Type: text/markdown
9
+ Requires-Dist: beets>=2.0.0
10
+
11
+ # beets-moreart
12
+
13
+ A [beets](https://beets.io) plugin that fetches extra album artwork from
14
+ Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB.
15
+
16
+ ## Quick Start
17
+
18
+ Install from the MoreArt project directory for local testing:
19
+
20
+ ```bash
21
+ pipx inject beets .
22
+ ```
23
+
24
+ Enable the plugin in your Beets configuration:
25
+
26
+ ```yaml
27
+ plugins:
28
+ - moreart
29
+ ```
30
+
31
+ Fetch artwork for your library:
32
+
33
+ ```bash
34
+ beet moreart
35
+ ```
36
+
37
+ Artwork is saved in each album directory:
38
+
39
+ ```text
40
+ Artist/
41
+ └── Album/
42
+ ├── back.jpg
43
+ ├── discart.png
44
+ └── spine.jpg
45
+ ```
46
+
47
+ ## What does this do?
48
+
49
+ Beets' built-in `fetchart` plugin fetches front-cover artwork. **beets-moreart**
50
+ looks for additional artwork: disc art, spine images, and back covers. It searches Fanart.tv, MusicBrainz Cover Art Archive, and TheAudioDB, then saves the results beside the album's music files.
51
+
52
+ MusicBrainz lookups use the album's release ID. Fanart.tv and TheAudioDB credentials are optional; sources without a configured key are skipped.
53
+
54
+ ## Installation
55
+
56
+ ### With pip
57
+
58
+ After the package has been published to PyPI:
59
+
60
+ ```bash
61
+ pip install beets-moreart
62
+ ```
63
+
64
+ ### With pipx
65
+
66
+ After the package has been published to PyPI:
67
+
68
+ ```bash
69
+ pipx inject beets beets-moreart
70
+ ```
71
+
72
+ ### From this checkout
73
+
74
+ Run these commands from the MoreArt project directory. Use the `pipx` command
75
+ when Beets is installed in a pipx-managed environment; otherwise use pip with
76
+ the same Python environment as Beets.
77
+
78
+ ```bash
79
+ pipx inject beets .
80
+ # Or, when Beets and the plugin share a Python environment:
81
+ python -m pip install .
82
+ ```
83
+
84
+ ## Configuration
85
+
86
+ Add the plugin to your Beets configuration file (`config.yaml`):
87
+
88
+ ```yaml
89
+ plugins:
90
+ - moreart
91
+
92
+ moreart:
93
+ fanarttv_key: YOUR_API_KEY
94
+ theaudiodb_key: YOUR_API_KEY
95
+ sources: [fanarttv, theaudiodb, musicbrainz]
96
+ types: [discart, spine, back]
97
+ run_on_import: yes
98
+ timeout: 15
99
+ cache_results: yes
100
+ recheck_days: 30
101
+ resize:
102
+ enabled: yes
103
+ discart: [1000, 1000]
104
+ back: [750, 750]
105
+ spine: [35, 700]
106
+ fuzz: 15%
107
+ background:
108
+ multi_corner: yes
109
+ ```
110
+
111
+ Adjust options as desired:
112
+
113
+ | Parameter | Default | Description |
114
+ | :--- | :--- | :--- |
115
+ | `fanarttv_key` | `null` | Optional Fanart.tv API key |
116
+ | `theaudiodb_key` | `null` | Optional TheAudioDB API key |
117
+ | `sources` | `[fanarttv, theaudiodb, musicbrainz]` | Sources to try, in order |
118
+ | `types` | `[discart, spine, back]` | Artwork types to fetch |
119
+ | `run_on_import` | `yes` | Fetch artwork after an album is imported |
120
+ | `timeout` | `15` | Seconds to wait for each HTTP request |
121
+ | `cache_results` | `yes` | Remember artwork types that had no usable result |
122
+ | `recheck_days` | `30` | Days to wait before retrying cached no-artwork results |
123
+ | `resize.enabled` | `yes` | Resize fetched images when ImageMagick is available |
124
+ | `resize.discart` | `[1000, 1000]` | Disc art dimensions |
125
+ | `resize.back` | `[750, 750]` | Back-cover dimensions |
126
+ | `resize.spine` | `[35, 700]` | Spine dimensions |
127
+ | `fuzz` | `15%` | ImageMagick color tolerance for disc-art background removal |
128
+ | `background.multi_corner` | `yes` | Remove the background from multiple disc-art edges |
129
+
130
+ ## Usage
131
+
132
+ ### Automatic (during import)
133
+
134
+ When `run_on_import` is enabled, MoreArt checks for artwork after an album is
135
+ imported. Existing artwork is left alone.
136
+
137
+ ### Manual (on demand)
138
+
139
+ | Command | Description |
140
+ | :--- | :--- |
141
+ | `beet moreart` | Fetch configured artwork for all albums |
142
+ | `beet moreart beatles` | Fetch artwork for matching albums |
143
+ | `beet moreart --pretend` | Show planned source/type attempts without downloading or saving |
144
+ | `beet moreart --force` | Ignore cached no-artwork results and search again |
145
+
146
+ Only negative results are cached. Existing artwork is checked on disk each
147
+ time, and changing the configured sources, API keys, or album metadata triggers
148
+ a fresh lookup. `--force` bypasses cached misses; it does not overwrite artwork
149
+ that already exists.
150
+
151
+ After a manual run, MoreArt prints a summary:
152
+
153
+ ```text
154
+ ========================================
155
+ MoreArt summary
156
+ Albums checked: 12
157
+ Artwork saved: 18
158
+ Already present: 14
159
+ Cached no-image: 2
160
+ No image saved: 4
161
+ Would fetch (pretend): 0
162
+ Albums missing path: 0
163
+ ========================================
164
+ ```
165
+
166
+ ## How it Works
167
+
168
+ 1. Checks the album directory and skips artwork that is already present.
169
+ 2. Uses configured sources in order, falling back when no usable image is returned.
170
+ 3. Saves valid images beside the album files.
171
+ 4. Caches missing-artwork searches on the album record and retries after the configured interval.
172
+ 5. Converts back and spine artwork to JPEG when ImageMagick is installed.
173
+ 6. Keeps disc art as PNG when ImageMagick is installed so transparency is preserved.
174
+
175
+ ## Requirements
176
+
177
+ - Beets 2.0.0 or newer
178
+ - Python 3.9 or later
179
+ - Internet access
180
+
181
+ The plugin uses Python's standard library for HTTP requests and adds no
182
+ third-party Python runtime dependency beyond Beets. ImageMagick (`magick` or
183
+ `convert`) is optional; it enables conversion, resizing, and disc-art background
184
+ removal. Without it, images are saved in their original format.
@@ -0,0 +1,11 @@
1
+ README.md
2
+ pyproject.toml
3
+ beets_moreart.egg-info/PKG-INFO
4
+ beets_moreart.egg-info/SOURCES.txt
5
+ beets_moreart.egg-info/dependency_links.txt
6
+ beets_moreart.egg-info/entry_points.txt
7
+ beets_moreart.egg-info/requires.txt
8
+ beets_moreart.egg-info/top_level.txt
9
+ beetsplug/moreart/__init__.py
10
+ beetsplug/moreart/plugin.py
11
+ tests/test_moreart.py
@@ -0,0 +1,2 @@
1
+ [beets.plugins]
2
+ moreart = beetsplug.moreart:MoreArtPlugin
@@ -0,0 +1 @@
1
+ beets>=2.0.0
@@ -0,0 +1 @@
1
+ beetsplug
@@ -0,0 +1,5 @@
1
+ """Beets plugin for fetching additional album artwork."""
2
+
3
+ from .plugin import MoreArtPlugin
4
+
5
+ __all__ = ["MoreArtPlugin"]