Commit Graph

113 Commits (1c2ecc1c7ccd54b545e6abdf0ff5e75138f1e97d)

Author SHA1 Message Date
Christopher Snowhill 1c2ecc1c7c [Playlist] Handle invalid files in a better way
Invalid files may include nil URLs, which should be skipped or stop
playback altogether. Invalid files will be marked as an error, and
stop playback.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-18 16:09:41 -07:00
Christopher Snowhill 88b7cd6352 [Crashlytics] Added logging of track events
Added logging of track metadata load and track playback events, to aid
with crash logging.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 22:34:51 -07:00
Christopher Snowhill e9b02d54f4 [Core Storage] Apply index sort to fetch request
Apply the index sort to the fetch request itself, rather than applying
it to the resulting array afterward.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 17:20:45 -07:00
Christopher Snowhill 39f4d09c1a Use NSNumber Literals as much as possible
Replaced a bunch of [NSNumber numberWith...] with NSNumber Literals.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 06:39:02 -07:00
Christopher Snowhill d972a6eaf5 [Playlist] Correctly handle deleted items
The member that I set myself to indicate deletion has one capital letter
to differentiate it from the built-in "delete" property of managed
objects, which doesn't do what I want, so I had to dodge it with that
capitalization thing.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-17 04:34:17 -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 5bca70d141 [Job Queue] Prevent multiple jobs from stacking
Jobs are meant to be serialized, so prevent multiple jobs from queueing
simultaneously, as they are not designed to interact with each other.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-15 01:10:53 -07:00
Christopher Snowhill 92573ec088 [Job Queue] Overhauled long action handling
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>
2022-06-15 01:01:45 -07:00
Christopher Snowhill 6c7a3e581c [Playlist/Metadata] Prevent a race condition
Prevent a race condition with deleting playlist entries while their
metadata is still being loaded by the player.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-06-14 21:27:51 -07:00
Christopher Snowhill 5611d08df1 Reduce memory usage of adding tracks
Significantly reduce the memory footprint of adding tracks to the
playlist, by coalescing the NSString and NSData objects in the info
dictionaries as they are being loaded in the background, into a common
data set which will then be discarded when the whole job is completed.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 21:38:43 -08:00
Christopher Snowhill b8a98e301e Metadata loading: Correctly merge over empty tags
Metadata versus properties merging, correctly merge over empty fields if
they are assigned with empty strings or zeroed numbers, instead of only
merging over completely missing fields.

Fixes emailed bug, CUE Sheet metadata reading, primarily.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-14 20:02:18 -08:00
Christopher Snowhill d7becdf01a Add a nil pointer check for metadata read
No idea if this is needed or not.
2022-02-11 06:00:36 -08:00
Christopher Snowhill df63726128 Track properties take priority over metadata read from tag readers
This allows inputs to override things with self-read tags and such, such
as ReplayGain tags.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 21:26:17 -08: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 85fd3836c0 Debug logging: Added logging of playback and tags
Added a logging method that indicates starting playback of a given URL,
and added a debug build only logging of every metadata load event.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-01-29 16:34:43 -08:00
Christopher Snowhill a4c3509e75 Playlist View: Refresh entire rows on status changes to refresh tooltips 2022-01-20 15:51:24 -08:00
Christopher Snowhill 2b4de1033d Playlist View: Replace Cell-based table with View-based table. It needs some work still, though. 2022-01-20 14:59:26 -08:00
Christopher Snowhill 684951bdc0 Change a bunch of NSArray declarations to const collection literals 2022-01-18 18:12:57 -08:00
Christopher Snowhill 74cd0f7da9 SQLite playlist store: Greatly improved performance of playlist sync operations 2022-01-14 22:42:57 -08:00
Christopher Snowhill 8a91bc1d09 Playlist loader: Allocate larger properties dictionary 2022-01-11 19:35:59 -08:00
Christopher Snowhill 7fe67b1630 Implement dock icon progress bar indicator for many processing operations, including adding tracks, removing tracks, and loading or reloading track metadata 2022-01-09 02:10:08 -08:00
Christopher Snowhill b40b506cc3 Remove unneeded header import 2022-01-07 02:16:55 -08:00
Christopher Snowhill 00052130a0 Revert ea589b2635, and fix reloading info for entries on Intel, by invoking the reloader in the background instead of directly calling it from the UI thread 2022-01-07 02:12:49 -08:00
Christopher Snowhill ea589b2635 Playlist loader: No longer do background metadata reading on Intel machines, where VGMStream mysteriously clobbers the stack at random when run in the background 2022-01-07 01:35:59 -08:00
Christopher Snowhill 098650099e Fix SQL playlist loader so it doesn't crash on an empty playlist 2021-12-25 16:42:28 -08:00
Christopher Snowhill 2445cc94a9 - Retrieve profile paths properly instead of hard coding
- Display playlist total duration in units up to weeks and down to just seconds, and only pluralize units as necessary
- Major change: Implemented a SQLite disk backed playlist, track data, and queue storage system, which will be synchronized from the player in real time, and will hopefully survive system or app crashes. Existing plist playlist will be imported on first run, and removed on shutdown.
2021-12-24 01:01:21 -08:00
Christopher Snowhill 5df4035568 Brought back background metadata and file info loading, still needs a progress indicator somewhere 2021-05-07 17:19:10 -07:00
Christopher Snowhill 13bd399b31 Clean up most warnings and update some dependencies 2021-04-29 18:16:24 -07:00
Christopher Snowhill ce8a1c230d Fix Playlist Loader so it only attempts to process track info for tracks that need it, and not the entire playlist every time 2021-04-06 16:50:17 -07:00
Christopher Snowhill 59477130bb Get rid of background tag loading, as it never worked properly anyway 2021-02-25 02:42:44 -08:00
Christopher Snowhill 0f543a1b52 Guard background file info retrieval to prevent it in case only a single entry was added 2020-02-17 19:50:32 -08:00
Christopher Snowhill 7308aa5f7b Fall back on non-container file parsing, since VGMStream is too greedy with its extension list 2020-02-17 19:50:32 -08:00
Christopher Snowhill 61c6cf3285 Hopefully fixed metadata parsing for newly added tracks showing up in notifications 2019-12-05 19:04:46 -08:00
Christopher Snowhill 4c955ef806 Simplify metadata loader 2019-11-08 15:03:26 -08:00
Christopher Snowhill 6eeb8a60da Add a safety check for attempting to add unsupported URLs. 2018-09-23 16:44:44 -07:00
Christopher Snowhill d9529d04a8 Fix refreshing table values when adding tracks to the playlist. 2018-09-22 03:10:44 -07:00
Christopher Snowhill 0513639842 Tidy up playlist info loader a bit. 2018-07-22 02:00:30 -07:00
Christopher Snowhill 67495009ff Updates for new build system. 2018-06-28 04:03:37 -07:00
Christopher Snowhill d14d69e3c4 Correctly invalidate playlist view's data when background metadata loader completes. 2018-05-23 00:34:22 -07:00
Christopher Snowhill 3b8e498e7f Fix total time display on startup, when all metadata is correctly loaded. 2018-05-23 00:32:47 -07:00
Christopher Snowhill 200701a2a3 Fix playlist info loading threading magic. 2018-02-18 20:19:18 -08:00
Chris Moeller 1b1721736e Fix PlaylistLoader to sort the contents of directories by the file path. 2017-12-16 19:05:17 -08:00
Christopher Snowhill bf501d9e12 Add error receiver for debugging. 2017-09-17 20:03:30 -07:00
Christopher Snowhill ac44ca33b0 Hopefully fixed total play time synchronizing with adding new tracks to the playlist. 2016-09-01 17:20:53 -07:00
Chris Moeller 86a6b2c22d Fix playlist metadata loading. 2016-07-02 02:58:38 -07:00
Chris Moeller 0d12f9e4e3 Fix file info load batching to operations of 16 files at a time. 2016-06-29 22:13:32 -07:00
Chris Moeller 17272ce43c Clean up lots of warnings and minor issues. 2016-06-29 22:10:29 -07:00
Chris Moeller 7876a4492f Handle background track metadata loading in a saner manner. 2016-06-28 19:33:48 -07:00
Chris Moeller 03b825ced3 Hopefully fix the last of the Automatic Reference Counting issues that remained. 2016-06-19 12:57:18 -07:00