Commit Graph

89 Commits

Author SHA1 Message Date
Stein Magnus Jodal
cfe93c244b scanner: Reject files with <100ms audio data 2013-10-20 16:43:04 +02:00
Stein Magnus Jodal
e6712bac93 Merge pull request #538 from adamcik/feature/gst-discoverer
scanner: Switch to gst.pbutils.Discoverer and refactor API
2013-10-20 07:03:47 -07:00
Thomas Adamcik
2f01fc4e46 scanner: Review comments and flake fixes
- Move ScannerError to exceptions module.
- Subclass ScannerError from MopidyException.
- Fix import sorting.
2013-10-20 15:51:39 +02:00
Stein Magnus Jodal
d8b0952f66 scanner: Remove support for running Python on the mopidy/scanner.py file
See commit 1a02b4d17f for details
2013-10-20 15:46:35 +02:00
Thomas Adamcik
a5a55952fb scanner: Switch to gst.pbutils.Discoverer and refactor API
- New API wraps gst.pbutils.Discoverer for mopidy use.
  - Custom scanner code removed.
- Callback based async API switched with simpler synchronous API
  - Scanner is feed one and one URI and returns the result or raises an error.
- Adds new ScannerError exception for error handling in scanner
- Limits local/scan_timeout to 1000-3600000 i.e. 1s to 1h
- Files with zero duration are now excluded.
- Mtime handling moved out of scanner so we can use it for streams etc.
2013-10-20 13:22:00 +02:00
Stein Magnus Jodal
5c7a496dc2 Fix flake8 warnings 2013-08-08 21:09:01 +02:00
Stein Magnus Jodal
80d122ff92 Merge branch 'develop' of github.com:mopidy/mopidy into develop
Conflicts:
	docs/changelog.rst
2013-08-05 23:33:08 +02:00
Stein Magnus Jodal
f35b45bf57 scanner: Fix time unit in log message. Formatting 2013-08-05 23:24:43 +02:00
Stein Magnus Jodal
022bcd089f scanner: Fix unregistering of the timeout callback 2013-08-05 23:18:37 +02:00
Stein Magnus Jodal
a5d8f02454 scanner: Fix local/scan_timeout value check 2013-08-05 23:18:07 +02:00
Tobias Sauerwein
dee0d01e20 Throw an error when scan_timeout config is not loaded. 2013-08-01 09:31:44 +02:00
Tobias Sauerwein
3c6a0543f5 Scanner: Fix deadlock on incorrectly identified files 2013-07-31 23:52:24 +02:00
Thomas Adamcik
6ac62c6869 local: Review fixes. 2013-07-30 22:59:22 +02:00
Thomas Adamcik
18ed7c6279 local: Convert mopidy-local extension to local: uris.
- Use local:playlist:<name>, local:track:<path> and local:search uris
- Adds LocalPlaybackProvider which translates to file uris.
- Switches to storing actual uris in playlists - so local: urls and not
  file:// or plain paths.
- Moved file:// to streaming plugin
- Cleaned up tests and imports for these changes.
2013-07-30 00:40:12 +02:00
Thomas Adamcik
c2cc9f027c local: Switch to using updater from extensions 2013-07-30 00:21:55 +02:00
Tobias Sauerwein
a372df8333 Scanner: Add disc number to album and track models (fixes #318) 2013-07-26 12:20:29 +02:00
Thomas Adamcik
71618f840f scanner: Fixing review comments. 2013-05-22 20:36:39 +02:00
Thomas Adamcik
98bb35d4d1 scanner: Convert to using library updater.
This version of the scanner switches to using the updater API, in other words
we are now fairly close to being able to plug in alternate libraries for local
files and populate them with mopidy-scan.
2013-05-20 23:54:48 +02:00
Thomas Adamcik
7f80a188c9 core: Add library updater.
Idea behind this class is to have a clear sub-set of our library API that is
only used for updating libraries. This makes it very clear what methods are
needed for just libaries and additionally updatable libraries.

Next couple of commits will build on this idea taking us closer to plugable
local libraries.
2013-05-20 23:50:46 +02:00
Thomas Adamcik
5961a1f5c8 scanner: Write tag cache to tmp file.
Tag cache is now output to a tmp file residing in the same folder as the real
one. Once generated the tmpfile is moved over the original file for an atomic
updated.
2013-05-20 22:56:09 +02:00
Thomas Adamcik
b4411ec877 scanner: Update based on review comments. 2013-05-20 15:28:41 +02:00
Thomas Adamcik
afb46b23de scanner: Respect mtime when picking files to scan.
Speedup scanning by checking what files exist, and which have been updated.
2013-05-20 01:45:52 +02:00
Thomas Adamcik
cb6634db8c scanner: Load existing tracks from local library. 2013-05-20 01:42:54 +02:00
Thomas Adamcik
c59f488b11 scanner: Pass in files to scan 2013-05-20 01:42:48 +02:00
Thomas Adamcik
802e6ad5ed scanner: Add last_modified to scanner data 2013-05-20 01:10:11 +02:00
Stein Magnus Jodal
1fb9634e47 argparse: Convert mopidy-scan command 2013-04-29 22:17:36 +02:00
Stein Magnus Jodal
de84fdfef4 Remove hacks required by #302 to run on older Python 2.6.x 2013-04-29 19:52:29 +02:00
Thomas Adacmik
085b44e52f path: Update with respect to review comments in #427 2013-04-27 02:21:27 +02:00
Thomas Adamcik
ba40c0032b scanner: Handle missing media_dir 2013-04-25 22:44:55 +02:00
Stein Magnus Jodal
222c5ae60d scanner: Remove GStreamer options support 2013-04-22 23:23:16 +02:00
Thomas Adamcik
08db8829af config: Move all code to new load function 2013-04-15 23:37:40 +02:00
Thomas Adamcik
1163d12306 scanner/config: Convert to new config system (fixes #405) 2013-04-13 23:15:47 +02:00
Stein Magnus Jodal
6076a0f117 Fix flake8 warnings 2013-04-13 00:28:45 +02:00
Stein Magnus Jodal
41d7ae9a2c Replace 'folder' with 'dir' 2013-04-08 21:13:59 +02:00
Stein Magnus Jodal
3339b79c1e local: Rename 'music_path' to 'music_dir', 'playlist_path' to 'playlists_dir' 2013-04-08 20:58:17 +02:00
Stein Magnus Jodal
a5d81b86c0 scanner: Use new config 2013-04-07 20:11:12 +02:00
Stein Magnus Jodal
c452f0115a mpd: Use new config system 2013-04-05 17:18:12 +02:00
Zan Dobersek
129894c01e Clean up gst.Caps initialization
There's no need for appending every audio/x-raw-* structure to the gst.Caps
individually, they can all be listed inline inside the gst.Caps initialization.
(cherry picked from commit 13f0bfffe17c07ddbc3a8e5fc1e29c0015502392)
2013-03-30 01:56:07 +01:00
Zan Dobersek
228f9bbf6b Scanner doesn't work with Ogg Vorbis files
Enhance the caps for the uridecodebin element by appending to them structures covering
both audio/x-raw-int and audio/x-raw-float formats.
(cherry picked from commit bc33fce7b1e30745a4d2fc7e96e1a3c2640cc40e)
2013-03-30 01:55:22 +01:00
Stein Magnus Jodal
358de3b088 Fix more unicode kwargs dict keys (#302) 2013-01-06 20:48:38 +01:00
Stein Magnus Jodal
ef3d5e92ce scanner: Fix optparse on early 2.6 (#302) 2013-01-03 13:14:21 +01:00
Stein Magnus Jodal
5ff8ea451f More **kwargs key fixing (#302) 2013-01-03 12:58:08 +01:00
Stein Magnus Jodal
d34ba24cfe Use bytestrings for the keys of **kwargs dicts
Python < 2.6.5rc1 does not work with unicode keys. Fixes #302.
2013-01-03 10:04:05 +01:00
Stein Magnus Jodal
3d86610dfe scanner: Better info logging 2012-12-12 12:22:53 +01:00
Stein Magnus Jodal
cdda3bc5dd scanner: Add -q and -v options for controlling log output 2012-12-11 11:00:42 +01:00
Stein Magnus Jodal
4889d2a928 scanner: Ignore invalid dates 2012-12-02 15:44:09 +01:00
Stein Magnus Jodal
bcaeca7acc scanner: Support multiple tag sets per track (fixes #236) 2012-11-14 22:51:12 +01:00
Stein Magnus Jodal
8a292bce58 scanner: Move main() function from bin/ to mopidy.scanner 2012-11-14 20:45:24 +01:00
Stein Magnus Jodal
6acaa490e9 Make all strings unicode by default (fixes #224) 2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
666800ec57 Fix most flake8 warnings (#211) 2012-10-16 14:00:34 +02:00