Commit Graph

27 Commits (4bed0af868a76a3d82301a1733c6e0574dd9d0d4)

Author SHA1 Message Date
Christopher Snowhill 4bed0af868 Core Data Store: Handle concurrency properly
All concurrency from other threads should pass through the viewContext's
performBlock or performBlockAndWait functions, and no other way. So now,
all access to Core Data is either happening on the main thread, or by
using these code blocks, all of which will wait for their access to
proceed.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-10-30 16:54:52 -07:00
Christopher Snowhill c9181f571f Better locking behavior for playlist storage
This should fix up potential locking issues with maintaining a copy of
the results set while certain other background actions may happen, such
as the player updating play counts while playing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-10-11 23:09:05 -07:00
Christopher Snowhill 47258b02b1 [Core Data] Add access locking
Apparently we need this to prevent Core Data from stomping on itself
when another thread accesses it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-15 07:00:11 -07:00
Christopher Snowhill 4df50c7fc3 Fix the Spotlight search panel
It was previously crashing horribly on adding search results. This makes
it actually functional, and renders it using a view-based table instead.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-07-15 06:18:01 -07:00
Christopher Snowhill 5cb08291bf [Sandbox / Core Data] Refine global variable usage
Refine the global variable usage, eliminating double underscore prefixes
and trusting that static global variables will exist in the object where
the class was created. Got rid of that nasty NSApplication extension
hack that was previously in use.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-21 00:01:07 -07:00
Christopher Snowhill 333c6c7e8b [Spotlight Panel] Fixed to work with new Core Data
Fixed the implementation to work correctly with the new Core Data
storage system. Tracks will be garbage collected later.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 17:37:11 -07:00
Christopher Snowhill 4c95c943ef [Playlist Storage] Rewrite to use Core Data
Completely rewrite the playlist storage once again, this time with a
much faster Core Data implementation. It still uses a little magic for
Album Artwork consolidation, but string consolidation doesn't seem to be
needed to reduce the disk storage size. Works much faster than my silly
implementation, too.

Old implementations are still kept for backwards compatibility with
existing playlists.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-16 07:14:33 -07:00
Christopher Snowhill b927f4c02b Replace more NSDictionary use with literals
Use literals to initialize fixed NSDictionary objects in various places.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-08 19:56:04 -08:00
Christopher Snowhill 85c7073649 Reformat my own source code with clang-format
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-06 21:49:27 -08:00
Christopher Snowhill 684951bdc0 Change a bunch of NSArray declarations to const collection literals 2022-01-18 18:12:57 -08:00
Chris Moeller 0e3644177e Updated everything else to ARC, and plugged a release cycle. 2016-05-05 13:05:39 -07:00
vspader 208065494c Fix for spotlight playlistentry dealloc and added missing fields to playlistentry dealloc. 2008-03-09 02:05:00 +00:00
matthewleon c94d31f6d9 Dealloc for PlaylistEntry seems to shrink memory leak. 2008-03-09 00:22:48 +00:00
matthewleon 2124066761 Wrote dealloc for SpotlightPlaylistEntry. Still need to find large leak. 2008-03-08 23:47:29 +00:00
matthewleon 69e802052e Spotlight sorts by track number properly. 2008-03-03 23:02:52 +00:00
matthewleon 9e8173bc74 PlaylistEntry cleanup. 2008-02-29 21:54:09 +00:00
vspader eeba50f6e1 Cleaned up PlaylistEntry. 2008-02-20 00:44:40 +00:00
matthewleon aa3b716e09 Fixed Spotlight import. 2008-02-18 16:55:31 +00:00
matthewleon b68a2c3a69 Overhauled Spotlight metadata importing to make it more easily expandable and reuse NSValueTransformer code. 2008-02-18 12:59:20 +00:00
matthewleon d6e7efd2c1 Cleaned up the Spotlight code considerably and added the ability to do simple searches for artist, album and title using %a, %l and %t respectively. For example searching "%awaits" will return all tracks by Tom Waits, etc... 2008-02-14 14:07:10 +00:00
matthewleon 62c446160c Spotlight uses NSScanner to parse search strings, eliminating most crashes resulting from unusual search strings. 2008-02-13 18:47:24 +00:00
matthewleon 4f9ac97dfc Spotlight can now search form multiple terms properly. Songs can be imported into the playlist again. 2008-02-12 16:24:09 +00:00
matthewleon 7c2d290871 Fixed major spotlight bug by retaining static key array (duh). Spotlight doesn't crash anymore and works very quickly. 2008-02-12 11:11:26 +00:00
matthewleon a5c8447b8d Fixed mpcdec framework settings to get it to compile in debug configuration on case-sensitive FS. (Modified case from MPCDec to mpcdec, as I already did for release configuration). 2008-02-12 10:30:32 +00:00
matthewleon 0e6a9ee966 Spotlight gets all necessary tags from metadata now. Some interface tweaks. 2008-02-11 16:39:19 +00:00
matthewleon d8ac96afbf Spotlight importing fixed. 2008-02-11 14:42:13 +00:00
matthewleon a624165bc9 Spotlight now works with its own SpotlightPlaylistEntry class, drastically increasing performance and permitting it to gracefully handle corrupt metadata. 2008-02-11 14:10:25 +00:00