- Moved SQLDatabase to a SQL specific file
- Database class is now an abstract base class
- Cursor moved into SQL specific file
- Allowed for multi-database support in the future
Changes in no particular order:
- Replaced all use cases of wavfile/wave and extract_channels with the new decoder.read function
- Added a 'recognize' method to the Dejavu class. This is a shortcut for recognizing songs.
- Renamed 'do_fingerprint' into 'fingerprint_directory'
- Removed parameters not required anymore from fingerprint_directory
- Cleaned up fingerprint.py
- Made fingerprint.generate_hashes a generator
- WaveFileRecognizer is now FileRecognizer and can take any formats supported by pydub
- Fixed MicrophoneRecognizer to actually run, previous version had many small mistakes
- Renamed 'fingerprint_worker' to '_fingerprint_worker' to signify it is not to be used publicly
- Moved 'chunkify' outside the Dejavu class
- Cleaned up pep8 styling mistakes in all edited files.
- 'Converter' class removed
- 'ensure_folder' removed
- 'find_files' changed into a generator and made it work with spaces
- 'convert' renamed into 'read'
- 'convert' now handles any supported file by pydub
- 'convert' now returns the data instead of saving it to a file (same format as 'extract_channels')
- generic cleanup of formatting in the file
- Fixes SQL queries for table creations
- Table creation is now down in reverse order to accompany the foreign key
- Fixed a typo in the BaseRecognizer that caused it to not work
- Changed configuration passed to Dejavu into a (nested) dictionary
- Recognizers now use a class structure
- Generic code for matching is in BaseRecognizer
- Two recognizers are available:
- Wave file recognizer
- Recording recognizer
- MySQL will also use the InnoDB engine now.
- Added a ping call in the MySQL Cursor cache mechanism
- Added a rollback call when a MySQLError occurs
- Removed 'delete_orphans' which is not needed anymore due to foreign key constraints and delete on cascade
- Changed SQLDatabase to accept options to create a cursor factory, instead of taking a pre-created cursor factory
- The SQLDatabase class now uses a context manager for mysql access.
- Most of the error handling is done by the context manager now
- Optimized several methods that returned a list into returning a generator
- Optimized return_matches to use an IN query instead.
- Other small fixes.