Commit graph

8 commits

Author SHA1 Message Date
Tom Jaspers
94edc7a2a4 MetaSync: minor improvements for iTunes source
- Use path as an key to find items (over artist/title/album tuples)
- Sensible default library location
2015-05-13 20:02:34 +02:00
Tom Jaspers
02bec1bdd7 MetaSync: Remove auto-discovery of sources
In favor of simpler, hard-coded, list of sources, to avoid unneccesary magic.

Also: check to see if query has results before instantiating the meta sources
2015-05-13 11:01:52 +02:00
Tom Jaspers
abd02052b9 MetaSync: small refactoring + enhancements
- `sync_data` -> `sync_from_source`
- properly catch ConfigValueError
- avoiding iterating through library if we couldn't instantiate any meta sources
- fix create_temporary_copy to actually make a tempdir
2015-05-10 14:44:37 +02:00
Tom Jaspers
bba8647bac MetaSync: rename 'cls' variable to '_cls' 2015-05-09 12:22:51 +02:00
Tom Jaspers
cb13d21ad6 MetaSync: automatic load of sources and item_types
- MetaSources get loaded from the modules automatically
- The MetaSources can define their own item_types, that get loaded for the plugin
- __init__ doesn't need any changes to accept new metasources
- Fix the --sources option to actually accept sources
  (it was being interpreted as boolean flag before, crashing the plugin)
- More safety w.r.t. external dependencies
2015-05-09 11:31:39 +02:00
Tom Jaspers
de5db7068b MetaSync: sources need to subclass MetaSource
- allows for the logging to integrate better
- renamed `get_data` to `sync_data`, to better reflect that its not returning anything,
  but that the item's data is being set by the function
2015-05-08 16:48:38 +02:00
Tom Jaspers
3dc2beda41 MetaSync: add iTunes synchronization
Uses plistlib to read a temp copy of `iTunes Library.xml`
2015-05-06 22:01:00 +02:00
Heinz Wiesinger
c50d59f7e7 Rename metadata sync plugin. 2015-04-18 14:02:51 +02:00