Commit Graph

220 Commits

Author SHA1 Message Date
Thomas Adamcik
4c0b54317b local: Add new library interface to local backend.
This forms the basis of our plugable local libraries that we intend to ship.
2013-12-23 22:16:03 +01:00
Thomas Adamcik
8a94d81c42 ext: Move away from global registry to ease testing.
Extension's setup method are now passed the active registry allowing them to
"steal" a list of the registry items they care about. In the case of commands
the registry is passed via args.registry.
2013-12-23 21:46:24 +01:00
Thomas Adamcik
353782e2c8 local: Add local/data_dir config value.
Not in use yet but, needed for future changes planed in this branch.
2013-12-23 21:40:35 +01:00
Thomas Adamcik
decce4ccf6 ext: Add basic global registry and switch to Extension.setup() 2013-12-22 15:11:15 +01:00
Thomas Adamcik
0d7fea0a43 ext: Convert commands to use new registry system.
Creates a placeholder registry using the existing hooks, and updates the
commands to use these. The actual registry still needs to be created.
2013-12-22 15:11:15 +01:00
Thomas Adamcik
9794826f26 local: Review changes 2013-12-04 22:52:24 +01:00
Thomas Adamcik
4f7176cac8 local: Cleanup uri conversion helper naming and implementation. 2013-12-04 22:48:37 +01:00
Thomas Adamcik
ad53a067ae local: Split out library reading and writting
- Create $XDG_DATA_DIR/mopidy/local in the local extension's validate env.
- Make sure we handle bad data causing ValueError in JSON decoding
- Initializing empty file causes more harm than good as it just leads to a
  ValueError. Switched to doing write_library(json_file, {})
- Helpers have been updated to be library oriented, not track. This paves the
  way for having {tracks: {uri: ...}, artist: {uri: ...}, ...} type
  denormalized data.
2013-12-04 22:38:16 +01:00
Thomas Adamcik
9c2d38e989 local: Remove tag cache support
- Updates doc references to tag cache
- Removes tag cache from config and marks it deprecated
- Removes tag cache from setup.py
- Removes tag cache from config converter
- Removes tag cache from tests
- Converts local library tests to use JSON.
2013-12-04 22:38:16 +01:00
Thomas Adamcik
3bbcb4d121 local: Review comment fixes 2013-11-28 23:20:03 +01:00
Thomas Adamcik
118095e522 local: Add new json based library
- Sets local-tagcache as disabled
- Implements new library that uses a gzip compressed json as storage.
- Thanks to reuse of existing serialization code this is a fairly small change.
2013-11-27 23:39:53 +01:00
Thomas Adamcik
ca358e05db local: Move find_exact and search out of tag cache. 2013-11-27 23:27:31 +01:00
Thomas Adamcik
4161c2bf27 local: Fix inconsistent uri handling in local scanner
We now only operate on local track uris, instead of a funny mix of local and
file uris. To achieve this we instead maintain a uri->path mapping to use for
the actual scanning.
2013-11-27 23:19:10 +01:00
Thomas Adamcik
603b57ef3c utils: Remove find_uris and update find_files
- find_uris is no more
- find_files now returns file paths relative to path being searched
- find_files now only works on directories
- find_files tests have been updated to reflect changes
- local scanner has gotten a minimal update to reflect this alteration
2013-11-27 22:50:35 +01:00
Thomas Adamcik
c025b87076 tagcache: Split out to own extension for eventual deletion. 2013-11-27 00:04:51 +01:00
Thomas Adamcik
3c1c6bac71 local: Always return track with just uri for local playlist tracks
This is related to #527, but is only a stop gap until we fix it right. Note
that this actually causes a regression, as not playlist tracks will have any
metadata after this change.
2013-11-27 00:04:51 +01:00
Thomas Adamcik
ff9f473c2f local: Move tag cache translators and tests out. 2013-11-26 17:47:52 +01:00
Thomas Adamcik
03f5ff6f57 local: Start moving tag cache code out of main local 2013-11-26 17:15:26 +01:00
Stein Magnus Jodal
e25705f8fa local: Ignore *.nfo and *.html when scanning 2013-11-16 15:19:48 +01:00
Thomas Adamcik
087dc5065d local: Remove argument that was simply added for testing help formatting 2013-11-16 03:13:22 +01:00
Thomas Adamcik
ea28e91f63 Merge branch 'develop' into feature/subcommands
Conflicts:
	mopidy/scanner.py
2013-11-16 03:08:38 +01:00
Thomas Adamcik
03c301705d commands: Move mopidy.utils.command to mopidy.commands
- Also adds documenation to Command class.
- Moves scan command to commands to match naming.
2013-11-16 03:02:45 +01:00
Thomas Adamcik
2f6ecd9171 commands: Move to using a help attribute instead of __doc__ 2013-11-16 02:26:47 +01:00
Thomas Adamcik
f89169d551 commands: Review changes for wording etc (#570) 2013-11-16 02:23:04 +01:00
Thomas Adamcik
209a6659f6 local: Print number of tracks in library 2013-11-14 23:44:43 +01:00
Thomas Adamcik
37ba3ca01d Merge branch 'develop' into feature/commands-helper-tmp
Conflicts:
	mopidy/utils/log.py
2013-11-14 23:36:27 +01:00
Thomas Adamcik
5f5c6a841c ext/backend: Use utils.command directly.
Commands don't "belong" to backends or frontends so just leave it at an ext
level and start using mopidy.utils.command directly.
2013-11-14 23:34:06 +01:00
Thomas Adamcik
a6c3b78a6f local: Convert local scanning to new commands.
Also moves mopidy.backends.local.scan to .command
2013-11-14 23:32:55 +01:00
Thomas Adamcik
d839a0d1ba local: Fix flake mistakes in scan sub-command. 2013-11-10 13:03:53 +01:00
Thomas Adamcik
4e6ebbe955 local/docs: Update based on review comments
- Bunch of typos and wording improvements from review.
- Fixed mopidy.backends.local.scan botched merge.
- Document and enforce that sub-command name needs to be bytes.
2013-11-09 18:20:22 +01:00
Thomas Adamcik
df953ea1e6 Merge branch 'develop' into feature/subcommands
Conflicts:
	mopidy/scanner.py
2013-11-09 13:40:47 +01:00
Lasse Bigum
8b7621c3e3 Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags 2013-11-09 02:37:44 +01:00
Thomas Adamcik
b5f8480eea local: Add 'mopidy scan' command via extension sub-commands. 2013-11-08 23:20:19 +01:00
Thomas Adamcik
93918cb1e0 local: flake8 fixes 2013-11-07 23:25:55 +01:00
Thomas Adamcik
e7dd7e2677 local/scanner: Make checking mtime and skipping known files work again
This change just patches over the worst of the inconsistencies in how the
scanner mixes local and file uris to get us to a working state again. Ideally,
this still needs a real cleanup when we finish the plugable library providers
and/or json library work.
2013-11-07 00:03:00 +01:00
Thomas Adamcik
f8dedc0b84 local: Add local_to_file_uri translator 2013-11-06 21:46:41 +01:00
Lasse Bigum
a516d2051d Added a ton of extra tests and expanded a few to include new tags 2013-11-03 01:01:42 +01:00
Lasse Bigum
e12a75c880 Merge branch 'develop' of https://github.com/mopidy/mopidy into feature/extra_tags 2013-11-02 23:39:19 +01:00
Lasse Bigum
7339d4839c Update filter name to match track_name change 2013-11-02 22:34:54 +01:00
Lasse Bigum
9593da08b6 Rename track in MPD to track_name to avoid confusion 2013-11-02 22:34:26 +01:00
Lasse Bigum
24944bd8e3 Split artist and albumartist dependency, update tests based on this 2013-11-02 22:13:54 +01:00
Lasse Bigum
e7746dac1b Remove debug, make track_no more robust 2013-11-02 21:54:46 +01:00
Lasse Bigum
efc9fc75b5 Fix track_no 2013-11-02 21:49:44 +01:00
Lasse Bigum
df1820f0a7 Add genre, composer, and performer tags and use them 2013-11-02 02:29:37 +01:00
Stein Magnus Jodal
15554ea062 Merge pull request #550 from adamcik/fix/bug-516-blacklist-extensions-in-scanner
local: Add file ext blacklist (fixes #516).
2013-10-27 13:36:32 -07:00
Thomas Adamcik
3884da2d7e local: Rename scan_blacklist_extensions to excluded_file_extensions 2013-10-27 21:27:11 +01:00
Stein Magnus Jodal
f0aff669c6 local: Order search filters consistently 2013-10-27 21:26:07 +01:00
Stein Magnus Jodal
4a9552fc15 local: Bring the corner case close to the condition 2013-10-27 21:25:36 +01:00
Stein Magnus Jodal
f7e85b1f12 Merge branch 'develop' into feature/track_and_count 2013-10-27 21:04:09 +01:00
Thomas Adamcik
3a1d4db227 local: Add file ext blacklist (fixes #516).
Adds a new local/scan_blacklist_extensions config value for controlling file
extensions to ignore.
2013-10-27 14:26:06 +01:00