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>
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>
Clean up redundant paths automatically, and on startup. Also refresh the
preferences dialog path list every time it is opened.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
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>
Regular control size ends up being 13 points, rather than the previous
default of Small control size, which ended up being 11 points.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When opening files from external association, such as opening files, or
opening folders with Cog, correctly obey the configured clear and play
or enqueue and play actions, by playing the new additions.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Default time, fade, loop count, and sample rate may now be overridden.
Synchronized preferences strings tables. Spanish translation of new
options pending, new releases won't be pushed until they're complete.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Revert "Remove the file tree, as Sandbox does not permit"
This reverts commit 02ec735687.
This also changes how the File Tree choosing works.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Sample rate now has a locale independent formatting, and no longer uses
scientific notation for large numbers.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
The Path Suggester will now automatically open when new files are added
to the playlist and a given path is not in the sandbox settings. It will
also pop for both the File Tree and MIDI SoundFont path configuration
settings being changed.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remove the stale Updates check preferences pane, and remove the donation
option from the menu, as it is considered In App Purchases.
Consider adding actual App Store In App Purchase options of "Buy me a
coffee" or similar, with no guarantee of return for the purchase, other
than furthering development. Make them repeatable purchases.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Require asking user consent for data transmission on first launch, or
otherwise disable sending crash reports by default.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remember if play count was already tracked for the current file across
restarts, if resume playback after restart is enabled.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
- Implemented App Sandboxing in a more friendly manner.
- All sandboxed paths will need to be set in Preferences. Set as loose
a path as you want. The shortest path will be preferred.
- Removed Last.fm client support, as it was non-functional by now,
unfortunately. Maybe something better can come in the future.
- Added support for insecure SSL to the HTTP/S reader, in case anyone
needs streams which are "protected" by self-signed or expired
certificates, without having to futz around by adding certificates to
the system settings, especially for expired certificates that can't
otherwise be dodged this way.
If you want to import your old playlists to the new version, copy the
contents of `~/Library/Application Support/Cog` to the alternate sandbox
path: `~/Library/Containers/org.cogx.cog/Data/Library/Application `...
...continued...`Support/Cog`. The preferences file will migrate to the
new version automatically.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remove the AppCheck code from the debug builds, as it's not even enabled
on the project in Firebase anyway.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Remember last play position in the playlist, rather than using an index
variable to store its position and play time. Still store whether the
player was last playing in a configuration variable, though.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Sending reports is now handled synchronously on the startup path, so
that unsent reports can be sent before a startup crash causes further
crashes to occur. This is apparently needed to help one particular user
catch whatever is causing the app to crash for them.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Move the initializer to a function that will be called earlier in the
startup stage. Mainly to catch crashes in the playlist importer for
legacy playlist formats.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
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>
Long actions, such as file opening, playlist loading, metadata loading
and refreshing, etc, are now handled through NSProgress. Additionally,
a new status bar change displays the progress of the task instead of
the total duration of the playlist. Finally, app quit is blocked by a
running task, and if the app is quit while a task is running, it will
be delayed until the task completes, at which time the app will
terminate cleanly.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Add options to the Appearance preferences page to allow changing the
spectrum's projection between a 2D-like one and 3D perspective, and add
options to change the bar and peak dot colors.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Reverted 7f3da31b45, and reverted a past
commit of some sort. Now adding URLs and opening files from the Open...
option will obey the preferences for playlist adding, including modifier
keys, if used.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Added commands to control playback: play, pause, stop, previous, next.
Also added a spam property to PlaylistEntry, to return the formatted
spam string for the playlist entry, which is currently limited to the
playing item.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
When the option is enabled, and playback comes to a completion, the
player will quit on its own.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Disable automatic update checking on startup for debug builds. Prevents
a crash from occurring when it attempts to retrieve the version number.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>
Replace "midi.plugin" with "midiPlugin", as per the value naming
conventions that Apple set out. Migrate the old value if found.
Signed-off-by: Christopher Snowhill <kode54@gmail.com>