file: Allow lookup() of any file URI

Fixes #1268
This commit is contained in:
Stein Magnus Jodal 2015-09-01 21:21:02 +02:00
parent b480de77e1
commit 715a989a5a
2 changed files with 10 additions and 4 deletions

View File

@ -63,6 +63,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.

View File

@ -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(