diff --git a/docs/changelog.rst b/docs/changelog.rst index c999632b..0856437c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -38,12 +38,19 @@ Bug fix release. :file:`/var/lib/mopidy/.local` and :file:`/var/lib/mopidy/.cache`. (Fixes: :issue:`1259`, PR: :issue:`1266`) +- Core: Fix error in :meth:`~mopidy.core.TracklistController.get_eot_tlid` + docstring. (Fixes: :issue:`1269`) + - Local: Deprecate :confval:`local/data_dir` and respect :confval:`core/data_dir` instead. This does not change the defaults for desktop users, only system services installed from packages that properly set :confval:`core/data_dir`, like the Debian and Arch packages. (Fixes: :issue:`1259`, PR: :issue:`1266`) +- Local: Change default value of :confval:`local/scan_flush_threshold` from + 1000 to 100 to shorten the time Mopidy-Local-SQLite blocks incoming requests + while scanning the local library. + - M3U: Changed default for the :confval:`m3u/playlists_dir` from ``$XDG_DATA_DIR/mopidy/m3u`` to unset, which now means the extension's data dir. This does not change the defaults for desktop users, only system @@ -71,6 +78,16 @@ Bug fix release. clients, which no longer scan the files twice. (Fixes: :issue:`1260`, PR: :issue:`1261`) +- File: Allow looking up metadata about any ``file://`` URI, just like we did + in Mopidy 1.0.x, where Mopidy-Stream handled ``file://`` URIs. In Mopidy + 1.1.0, Mopidy-File did not allow one to lookup files outside the directories + listed in :confval:`file/media_dir`. This broke Mopidy-Local-SQLite when the + :confval:`local/media_dir` directory was not within one of the + :confval:`file/media_dirs` directories. For browsing of files, we still limit + access to files inside the :confval:`file/media_dir` directories. For lookup, + you can now read metadata for any file you know the path of. (Fixes: + :issue:`1268`, PR: :issue:`1273`) + - Audio: Fix timeout handling in scanner. This regression caused timeouts to expire before it should, causing scans to fail. @@ -137,7 +154,7 @@ Core API - Add ``tlid`` alternatives to methods that take ``tl_track`` and also add ``get_{eot,next,previous}_tlid`` methods as light weight alternatives to the - ``tl_track`` versions of the calls. (Fixes: :issue:`1131` PR: :issue:`1136`, + ``tl_track`` versions of the calls. (Fixes: :issue:`1131`, PR: :issue:`1136`, :issue:`1140`) - Add :meth:`mopidy.core.PlaybackController.get_current_tlid`. diff --git a/docs/conf.py b/docs/conf.py index cc760720..cbb2f228 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -78,7 +78,7 @@ def setup(app): # -- General configuration ---------------------------------------------------- -needs_sphinx = '1.0' +needs_sphinx = '1.3' extensions = [ 'sphinx.ext.autodoc', diff --git a/docs/ext/local.rst b/docs/ext/local.rst index d6e3b56a..ef9df5d7 100644 --- a/docs/ext/local.rst +++ b/docs/ext/local.rst @@ -35,6 +35,23 @@ To make a local library for your music available for Mopidy: #. Start Mopidy, find the music library in a client, and play some local music! +Updating the local library +========================== + +When you've added or removed music in your collection and want to update +Mopidy's index of your local library, you need to rescan:: + + mopidy local scan + +Note that if you are using the default local library storage, ``json``, you +need to restart Mopidy after the scan completes for the updated index to be +used. + +If you want index updates to come into effect immediately, you can try out +`Mopidy-Local-SQLite `_, which +will probably become the default backend in the near future. + + Pluggable library support ========================= diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index db4e2a69..13efe322 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -236,7 +236,7 @@ class TracklistController(object): def get_eot_tlid(self): """ - The TLID of the track that will be played after the given track. + The TLID of the track that will be played after the current track. Not necessarily the same TLID as returned by :meth:`get_next_tlid`. @@ -332,7 +332,7 @@ class TracklistController(object): def get_previous_tlid(self): """ - Returns the TLID of the track that will be played if calling + Returns the TLID of the track that will be played if calling :meth:`mopidy.core.PlaybackController.previous()`. For normal playback this is the previous track in the tracklist. If diff --git a/mopidy/file/library.py b/mopidy/file/library.py index b8531a6e..20ac0632 100644 --- a/mopidy/file/library.py +++ b/mopidy/file/library.py @@ -81,10 +81,6 @@ class FileLibraryProvider(backend.LibraryProvider): logger.debug('Looking up file URI: %s', uri) local_path = path.uri_to_path(uri) - if not self._is_in_basedir(local_path): - logger.warning('Ignoring URI outside base dir: %s', local_path) - return [] - try: result = self._scanner.scan(uri) track = utils.convert_tags_to_track(result.tags).copy( diff --git a/mopidy/local/__init__.py b/mopidy/local/__init__.py index 3ee2703e..552e5341 100644 --- a/mopidy/local/__init__.py +++ b/mopidy/local/__init__.py @@ -23,7 +23,7 @@ class Extension(ext.Extension): schema = super(Extension, self).get_config_schema() schema['library'] = config.String() schema['media_dir'] = config.Path() - schema['data_dir'] = config.Deprecated() + schema['data_dir'] = config.Path(optional=True) schema['playlists_dir'] = config.Deprecated() schema['tag_cache_file'] = config.Deprecated() schema['scan_timeout'] = config.Integer( diff --git a/mopidy/local/ext.conf b/mopidy/local/ext.conf index 6dd29147..c8fe6b86 100644 --- a/mopidy/local/ext.conf +++ b/mopidy/local/ext.conf @@ -2,8 +2,9 @@ enabled = true library = json media_dir = $XDG_MUSIC_DIR +data_dir = $XDG_DATA_DIR/mopidy/local scan_timeout = 1000 -scan_flush_threshold = 1000 +scan_flush_threshold = 100 scan_follow_symlinks = false excluded_file_extensions = .directory