Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: Mopidy-Local
3 Version: 3.3.0
4 Summary: Mopidy extension for playing music from your local music archive
5 Home-page: https://github.com/mopidy/mopidy-local
6 Author: Stein Magnus Jodal
7 Author-email: [email protected]
8 License: Apache License, Version 2.0
9 Classifier: Environment :: No Input/Output (Daemon)
10 Classifier: Intended Audience :: End Users/Desktop
11 Classifier: License :: OSI Approved :: Apache Software License
12 Classifier: Operating System :: OS Independent
13 Classifier: Programming Language :: Python :: 3
14 Classifier: Programming Language :: Python :: 3.9
15 Classifier: Programming Language :: Python :: 3.10
16 Classifier: Programming Language :: Python :: 3.11
17 Classifier: Topic :: Multimedia :: Sound/Audio :: Players
18 Requires-Python: >=3.9
19 License-File: LICENSE
20 Requires-Dist: Mopidy>=3.0.0
21 Requires-Dist: Pykka>=2.0.1
22 Requires-Dist: setuptools
23 Requires-Dist: uritools>=1.0
24 Provides-Extra: lint
25 Requires-Dist: black; extra == "lint"
26 Requires-Dist: check-manifest; extra == "lint"
27 Requires-Dist: flake8; extra == "lint"
28 Requires-Dist: flake8-black; extra == "lint"
29 Requires-Dist: flake8-bugbear; extra == "lint"
30 Requires-Dist: flake8-import-order; extra == "lint"
31 Requires-Dist: isort[pyproject]; extra == "lint"
32 Provides-Extra: test
33 Requires-Dist: pytest; extra == "test"
34 Requires-Dist: pytest-cov; extra == "test"
35 Provides-Extra: dev
36 Requires-Dist: black; extra == "dev"
37 Requires-Dist: check-manifest; extra == "dev"
38 Requires-Dist: flake8; extra == "dev"
39 Requires-Dist: flake8-black; extra == "dev"
40 Requires-Dist: flake8-bugbear; extra == "dev"
41 Requires-Dist: flake8-import-order; extra == "dev"
42 Requires-Dist: isort[pyproject]; extra == "dev"
43 Requires-Dist: pytest; extra == "dev"
44 Requires-Dist: pytest-cov; extra == "dev"
45
46 ************
47 Mopidy-Local
48 ************
49
50 .. image:: https://img.shields.io/pypi/v/Mopidy-Local
51 :target: https://pypi.org/project/Mopidy-Local/
52 :alt: Latest PyPI version
53
54 .. image:: https://img.shields.io/github/actions/workflow/status/mopidy/mopidy-local/ci.yml?branch=main
55 :target: https://github.com/mopidy/mopidy-local/actions
56 :alt: CI build status
57
58 .. image:: https://img.shields.io/codecov/c/gh/mopidy/mopidy-local
59 :target: https://codecov.io/gh/mopidy/mopidy-local
60 :alt: Test coverage
61
62 `Mopidy`_ extension for playing music from your local music archive.
63
64 .. _Mopidy: https://www.mopidy.com/
65
66
67 Table of contents
68 =================
69
70 - `Maintainer wanted`_
71 - Installation_
72 - Configuration_
73 - Usage_
74
75 - `Generating a library`_
76 - `Updating the library`_
77 - `Clearing the library`_
78 - `Library layout`_
79
80 - `Project resources`_
81 - Credits_
82
83
84 Maintainer wanted
85 =================
86
87 Mopidy-Local is currently kept on life support by the Mopidy core
88 developers. It is in need of a more dedicated maintainer.
89
90 If you want to be the maintainer of Mopidy-Local, please:
91
92 1. Make 2-3 good pull requests improving any part of the project.
93
94 2. Read and get familiar with all of the project's open issues.
95
96 3. Send a pull request removing this section and adding yourself as the
97 "Current maintainer" in the "Credits" section below. In the pull request
98 description, please refer to the previous pull requests and state that
99 you've familiarized yourself with the open issues.
100
101 As a maintainer, you'll be given push access to the repo and the authority to
102 make releases to PyPI when you see fit.
103
104
105 Installation
106 ============
107
108 Install by running::
109
110 sudo python3 -m pip install Mopidy-Local
111
112 See https://mopidy.com/ext/local/ for alternative installation methods.
113
114
115 Configuration
116 =============
117
118 Before starting Mopidy, you must add configuration for
119 Mopidy-Local to your Mopidy configuration file::
120
121 [local]
122 media_dir = /path/to/your/music/archive
123
124 The following configuration values are available:
125
126 - ``local/enabled``: If the local extension should be enabled or not.
127 Defaults to ``true``.
128
129 - ``local/media_dir``: Path to directory with local media files.
130
131 - ``local/max_search_results``: Number of search results that should be returned. Default is 100.
132
133 - ``local/scan_timeout``: Number of milliseconds before giving up scanning a
134 file and moving on to the next file.
135
136 - ``local/scan_follow_symlinks``: If we should follow symlinks found in
137 ``local/media_dir``.
138
139 - ``local/scan_flush_threshold``: Number of tracks to wait before telling
140 library it should try and store its progress so far. Some libraries might not
141 respect this setting. Set this to zero to disable flushing.
142
143 - ``local/included_file_extensions``: File extensions to include when scanning
144 the media directory. Values should be separated by either comma or newline.
145 Each file extension should start with a dot, .e.g. ``.flac``. Setting any
146 values here will override the existence of ``local/excluded_file_extensions``.
147
148 - ``local/excluded_file_extensions``: File extensions to exclude when scanning
149 the media directory. Values should be separated by either comma or newline.
150 Each file extension should start with a dot, .e.g. ``.html``. Defaults to a
151 list of common non-audio file extensions often found in music collections.
152 This config value has no effect if ``local/included_file_extensions`` is set.
153
154 - ``local/directories``: List of top-level directory names and URIs
155 for browsing. See below.
156
157 - ``local/timeout``: Database connection timeout in seconds.
158
159 - ``local/use_artist_sortname``: Whether to use the sortname field for
160 ordering artist browse results. Disabled by default, since this may
161 give confusing results if not all artists in the library have proper
162 sortnames.
163
164 - ``local/album_art_files``: List of file names to check for when searching
165 for external album art. These may contain UNIX shell patterns,
166 i.e. ``*``, ``?``, etc.
167
168
169 Usage
170 =====
171
172
173 Generating a library
174 --------------------
175
176 The command ``mopidy local scan`` will scan the path set in the
177 ``local/media_dir`` config value for any audio files and build a
178 library of metadata.
179
180 To make a local library for your music available for Mopidy:
181
182 #. Ensure that the ``local/media_dir`` config value points to where your
183 music is located. Check the current setting by running::
184
185 mopidy config
186
187 #. Scan your media library.::
188
189 mopidy local scan
190
191 #. Start Mopidy, find the music library in a client, and play some local music!
192
193
194 Updating the library
195 --------------------
196
197 When you've added or removed music in your collection and want to update
198 Mopidy's index of your local library, you need to rescan::
199
200 mopidy local scan
201
202 Options can be specified to control the behavior of the scan command:
203
204 - ``--force`` Force rescan of all media files
205 - ``--limit <number>`` Maximum number of tracks to scan
206
207 Example::
208
209 mopidy local scan --limit 50
210
211
212 Clearing the library
213 --------------------
214
215 To delete your local images and clear your local library::
216
217 mopidy local clear
218
219 A prompt will ask you to confirm this irreversible operation.
220
221
222 Library layout
223 --------------
224
225 The exposed library has a root directory and nine top-level directories defined
226 under the root directory:
227
228 - Albums
229 - Artists
230 - Composers
231 - Genres
232 - Performers
233 - Release Years
234 - Tracks
235 - Last Week's Updates
236 - Last Month's Updates
237
238 This can be configured through the ``directories`` setting. It's expected to be a
239 list of space separated name and URI supported for browsing, eg::
240
241 directories =
242 Albums local:directory?type=album
243 Artists local:directory?type=artist
244 Composers local:directory?type=artist&role=composer
245 Tracks local:directory?type=track
246 Last Week's Updates local:directory?max-age=604800
247
248 URIs supported for browsing
249 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
250
251 *Remember that URIs are opaque values that neither Mopidy’s core layer or Mopidy
252 frontends should attempt to derive any meaning from.* That said, it's necessary
253 to have a sufficient knowledge of Mopidy-Local URIs to customize the
254 ``directories`` setting properly.
255
256 Browsing URIs starting with ``local:artist`` returns references to
257 albums and tracks with the given artist. Browsing URIs starting with
258 ``local:album`` returns references to the album tracks. Browsing URIs
259 starting with ``local:track`` is not supported.
260
261 Other URIs supported for browsing start with ``local:directory``. The returned
262 references are specified through "query parameters":
263
264 - ``local:directory``: References to the top levels directories.
265
266 - ``local:directory?type=tracks``: References all tracks. Multiple
267 parameters can be added to filter the referenced tracks: ``album``,
268 ``albumartist``, ``artist``, ``composer``, ``date``, ``genre``,
269 ``performer``, and ``max-age``.
270
271 - ``local:directory?type=date``: References to directories grouping tracks by
272 date and album. Dates are transformed according to the optional parameter
273 ``FORMAT`` which default to ``%Y-%m-%d``. The URIs of the references start
274 with ``local:directory?date=``.
275
276 - ``local:directory?type=genre``: References to directories named after genres
277 found among all tracks. Their URIs start with ``local:directory?genre=``.
278
279 - ``local:directory?type=album``: References to all albums.
280
281 - ``local:directory?type=album&PARAM=VALUE``: References to
282 directories grouping tracks matching the given criteria. ``PARAM``
283 must be one of ``albumartist``, ``artist``, ``composer``, ``date``,
284 ``genre``, ``performer``, ``max-age``. The referenced directories
285 group the selected tracks by album; Their URIs start with
286 ``local:directory?PARAM=VALUE&type=track&album=local:album:``.
287
288 - ``local:directory?type=artist``: References to all artists.
289
290 - ``local:directory?type=artist&role=ROLE``: References to directories with URIs
291 ``local:directory?ROLE=URI`` where ``URI`` varies among all URIs starting with
292 ``local:artist`` build from all tracks tag corresponding to ``ROLE``. ``ROLE``
293 is one of ``albumartist``, ``artist``, ``composer``, or ``performer``.
294
295 - ``local:directory?album=URI``: A reference to a directory grouping the tracks
296 of the album with given URI. Its URI starts with
297 ``local:directory?album=URI&type=track``.
298
299 - ``local:directory?albumartist=URI``: References to directories
300 grouping tracks whose albumartist tag has given URI. The referenced
301 directories group the selected tracks by album; Their URIs start
302 with
303 ``local:directory?albumartist=URI&type=track&album=local:album:``.
304
305 - ``local:directory?artist=URI``: References to directories grouping
306 tracks whose artist has given URI. The referenced directories group
307 the selected tracks by album; Their URIs start with
308 ``local:directory?artist=URI&type=track&album=local:album:``.
309
310 - ``local:directory?composer=URI``: References to directories grouping
311 tracks whose composer has given URI. The referenced directories
312 group the selected tracks by album; Their URIs start with
313 ``local:directory?composer=URI&type=track&album=local:album:``.
314
315 - ``local:directory?date=DATE``: References to directories grouping
316 tracks whose date match DATE. The referenced directories group the
317 selected tracks by album; Their URIs start with
318 ``local:directory?date=DATE&type=track&album=local:album:``. The
319 match is to be interpreted as in a ``LIKE`` SQL statement.
320
321 - ``local:directory?genre=GENRE``: References to directories grouping
322 tracks whose genre is GENRE. The referenced directories group the
323 selected tracks by album; Their URIs start with
324 ``local:directory?genre=GENRE&type=track&album=local:album:``.
325
326 - ``local:directory?performer=URI``: References to directories
327 grouping tracks whose performer has given URI. The referenced
328 directories group the selected tracks by album; Their URIs start
329 with
330 ``local:directory?performer=URI&type=track&album=local:album:``.
331
332 - ``local:directory?max-age=SECONDS``: References to directories
333 grouping tracks whose "last modified" date is newer than SECONDS
334 seconds. The referenced directories group the selected tracks by
335 album; Their URIs start with
336 ``local:directory?max-age=SECONDS&type=track&album=local:album:``.
337
338 Project resources
339 =================
340
341 - `Source code <https://github.com/mopidy/mopidy-local>`_
342 - `Issue tracker <https://github.com/mopidy/mopidy-local/issues>`_
343 - `Changelog <https://github.com/mopidy/mopidy-local/releases>`_
344
345
346 Credits
347 =======
348
349 - Original authors:
350 `Stein Magnus Jodal <https://github.com/jodal>`__ and
351 `Thomas Adamcik <https://github.com/adamcik>`__ for the Mopidy-Local extension in Mopidy core.
352 `Thomas Kemmer <https://github.com/tkem>`__ for the SQLite storage and support for embedded album art.
353 - Current maintainer: None. Maintainer wanted, see section above.
354 - `Contributors <https://github.com/mopidy/mopidy-local/graphs/contributors>`_