Commit Graph

1929 Commits

Author SHA1 Message Date
Stein Magnus Jodal
c367d350f7 Merge pull request #1117 from adamcik/feature/models-memory-reduction
Improve models memory usage
2015-04-08 23:29:08 +02:00
Thomas Adamcik
2cc91c0a7f core: Fix review comments for PR#1111 2015-04-08 23:13:07 +02:00
Thomas Adamcik
e5f59495fc core: Update refresh test case to fail on multiple calls to same backend 2015-04-08 21:18:18 +02:00
Thomas Adamcik
511cf4e326 core: Catch exceptions when browsing in backends
Also splits browse into to method to better distinguish the two possible code
paths.
2015-04-08 21:17:44 +02:00
Thomas Adamcik
682c6b1c6c Merge branch 'develop' into feature/make-core-more-robust
Conflicts:
	docs/changelog.rst
2015-04-08 20:28:10 +02:00
Thomas Adamcik
05244f7e60 models: Deprecate copy and add replace method
Changed as with the memoization copy was lying, so replace is a better name.
2015-04-08 01:41:50 +02:00
Thomas Adamcik
b7375323e9 models: Memoize identical instances automatically
This combined with the previous changes has brought the memory use for a 14k
track test-set down from about 75MB to 17MB or so. Note that this does however,
mean that copy is now lying to us as it does not such thing whenever it can
avoid it.
2015-04-08 01:14:56 +02:00
Thomas Adamcik
86481b1d50 models: Shortcut case where copy didn't change anything
We no longer copy in this case and will just give you the same instance back.
2015-04-08 00:34:02 +02:00
Thomas Adamcik
0fee1b4b11 models: Switch to slots to reduce memory usage per instance 2015-04-08 00:30:53 +02:00
Thomas Adamcik
08fd99ffdb models: Add Identifer type which interns values.
This gives some moderate memory saving since the values are used in multiple
places.
2015-04-08 00:11:23 +02:00
Stein Magnus Jodal
7bda4f835f xdg: Add XDG dir utils 2015-04-07 23:50:59 +02:00
Thomas Adamcik
9b442e1563 review: Address review comments 2015-04-06 23:27:46 +02:00
Thomas Adamcik
50f68064be core: Update PlaylistsController to catch backend exceptions 2015-04-06 02:13:51 +02:00
Thomas Adamcik
66771dec68 core: Update LibraryController to catch backend exceptions 2015-04-06 02:12:56 +02:00
Thomas Adamcik
2d03cd7290 models: Make fields handle unsetting defaults in __dict__ 2015-04-05 13:09:19 +02:00
Thomas Adamcik
73415ce60f models: Make sure del on attributes does not work 2015-04-05 13:08:15 +02:00
Thomas Adamcik
07912e1091 models: Add fields for supporting validation of models
Feature makes use of python descriptors to hook in type checking and other
validation when fields get set.
2015-04-05 13:08:15 +02:00
Thomas Adamcik
5c0430ef4a tests: Move models tests into a directory 2015-04-05 13:08:15 +02:00
Thomas Adamcik
8f96bf0f39 tests: Fix some model use oddities 2015-04-05 13:08:15 +02:00
Stein Magnus Jodal
c4940cbea2 autopep8: Add space after class signature/docstring 2015-04-03 00:05:26 +02:00
Thomas Adamcik
83c3d0013f Merge pull request #1096 from jodal/feature/faster-travis-build
travis: Use new faster build infrastructure
2015-04-02 21:41:43 +02:00
Stein Magnus Jodal
2bc63ec027 audio: Skip MP3 tests if missing plugin 2015-04-02 20:53:29 +02:00
Thomas Adamcik
9ede14f4a1 tests: Convert to using deprecation helpers across the board. 2015-03-30 23:50:54 +02:00
Thomas Adamcik
f4c93619d1 core: Make core tracklist.add(tracks=...) deprecation safe 2015-03-29 23:11:00 +02:00
Thomas Adamcik
dc673d554c tests: Ignore deprecated tracklist.add(tracks=...) in local tests
Note, this is mostly because these tests are just core tests in disguise and
need a lot more love than I can give them right now.
2015-03-29 23:11:00 +02:00
Thomas Adamcik
c85689edad mpd: Make mpd warnings safe with respect to tracklist.add(tracks=...) 2015-03-29 23:11:00 +02:00
Thomas Adamcik
f7399c1849 tests: Stop using playlist filters in mpd music_db tests 2015-03-29 23:11:00 +02:00
Thomas Adamcik
79b0584887 tests: Stop using tracklist add tracks in mpd status test 2015-03-29 23:11:00 +02:00
Thomas Adamcik
7d42d028c6 tests: Stop using tracklist tracks in mpd playback tests 2015-03-29 23:11:00 +02:00
Thomas Adamcik
faf8174ef7 tests: Update mpd.test_status to not use tracklist.add(tracks=...) 2015-03-29 23:11:00 +02:00
Thomas Adamcik
a8860faa35 tests: Cleanup mpd.protocol.current_playlist tests
- Split into smaller test cases more or less per command
- Created a BasePopulatedTracklistTestCase with a sensible setUp
- Modified test cases to work with the common tracklist state
- Replaced all calls to tracklist.add(tracks=...) with uris=...
- Test tracklist ordering in more compact way that also gives better error
  messages
2015-03-29 23:11:00 +02:00
Thomas Adamcik
d3b275e1a4 core: Mark tracklist.add by URI as deprecated 2015-03-29 23:11:00 +02:00
Thomas Adamcik
49fc9941a1 core: Mark searching via keyword argument based query deprecated 2015-03-29 23:11:00 +02:00
Thomas Adamcik
0ab52a73fa core: Mark library.lookup by uri deprecated
Updates core, mpd and tests to not use deprecated calls or safely catch them
when running with -W error.
2015-03-29 23:11:00 +02:00
Thomas Adamcik
f5f9899db9 tests: Make bases test classes in core 2015-03-29 23:10:58 +02:00
Thomas Adamcik
a54551d985 core: Mark get_playlists and filter as deprecated 2015-03-29 23:10:19 +02:00
Thomas Adamcik
5a3fb64250 core: Emit deprecation warning for library.find_exact 2015-03-29 23:08:03 +02:00
Thomas Adamcik
b31f0c421f tests: Make tests warning safe 2015-03-26 21:58:44 +01:00
Stein Magnus Jodal
2c11344434 dummy: Make it obvious that method is test-only 2015-03-25 13:16:27 +01:00
Stein Magnus Jodal
c9f60170f8 Merge pull request #1084 from tkem/feature/m3u_replace_invalid_chars
m3u: Replace slashes in playlist names with pipes.
2015-03-25 09:48:39 +01:00
Stein Magnus Jodal
36fba3d67d flake8: Fix unussed import 2015-03-25 09:48:24 +01:00
Thomas Kemmer
a9393c3850 m3u: Replace slashes in playlist names with pipes. 2015-03-25 05:36:03 +01:00
Stein Magnus Jodal
d768a3b4f7 Merge pull request #1082 from adamcik/feature/only-support-new-style-search-in-backends
core/backend: Stop supporting old search signatures
2015-03-25 00:09:06 +01:00
Stein Magnus Jodal
f2a56edbf0 dummy: Replace playlists property with test-only helper 2015-03-25 00:03:56 +01:00
Thomas Adamcik
ead725e995 core/backend: Stop supporting old search signatures
All backends are expected to support the exact argument. A friendly log message
will be printed to prompt users to upgrade backends that fail due to this.
2015-03-24 23:54:49 +01:00
Stein Magnus Jodal
a8e6cd26dc core: Warn if backend does not implement as_list()
Fixes #1080
2015-03-24 23:40:50 +01:00
Thomas Adamcik
141c14ad45 core: Add exact to search() and deprecate find_exact()
Backends that still implement find_exact will be called without exact as an
argument to search, and we will continue to use find_exact. Please remove
find_exact from such backends and switch to the new search API.
2015-03-24 09:31:03 +01:00
Stein Magnus Jodal
23e2295c46 dummy: Fix playlists.get_items() bug 2015-03-24 01:54:07 +01:00
Thomas Adamcik
24fe242d56 core/backend: Remove find_exact from backends
Functionality has been replaced with an `exact` param in the search method.
Backends that still implement find_exact will continue being called via
the old method for now.
2015-03-23 23:55:03 +01:00
Stein Magnus Jodal
07cf962434 Merge branch 'develop' into feature/new-playlists-api
Conflicts:
	docs/changelog.rst
2015-03-23 21:45:32 +01:00