Commit Graph

38 Commits (22cd16bb463ee9083748f6337d11bb0d1f973223)

Author SHA1 Message Date
Christopher Snowhill c23bece62c Reintroducing App Sandbox, and more
- 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>
2022-06-20 03:35:29 -07:00
Christopher Snowhill f7dc6beda1 Plugin utilities: Moved encoding guesser to header
Moved the string encoding guesser/converter to the Plugin.h header, so
it may be accessible from any plugin. I may make it a global member of
something eventually, but a static inline for such a simple function
should be fine for now.

This function facilitates converting arbitrary 8 bit encoded strings to
Unicode NSString objects. It should be used anywhere that UTF-8 is
expected, but not necessarily guaranteed, and where other 8-bit
encodings may also be supplied by a user's files.

Not using this setup for string inputs has already led to failed UTF-8
decoding resulting in nil NSStrings being passed to the inline array or
dictionary initializers, which results in crashes due to uncaught
exceptions.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-05-24 01:05:43 -07:00
Christopher Snowhill 8c945b53de HTTP Reader: Guess encoding type of stream info
Stream metadata could be in any encoding, not necessarily UTF-8. Handle
this in an appropriate way.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-16 01:51:16 -08:00
Christopher Snowhill 3274bc9fe7 Revert "HTTP Reader: Support more stream info"
This reverts commit 33388918b3.
2022-02-15 15:00:11 -08:00
Christopher Snowhill 33388918b3 HTTP Reader: Support more stream info
For streams offering a three way split in their ICY metadata blocks,
support album/artist/title using that three way split. Otherwise do the
usual of artist/title, or blank artist if there's no hyphen to split on.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-15 00:57:22 -08:00
Christopher Snowhill 69506cd1d7 HTTP Reader: Replaced implementation with libCURL
New implementation largely based on the vfs_curl module from DeaDBeeF.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-09 13:41:01 -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 e0e7274339 HTTP Reader: Fix opening really tiny files
Tiny files complete fetching within the scope of the open function, so
the URL session task would have completed already. Now the function will
accept the data, and allow reading it.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-04 22:03:22 -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 8ad7e086a8 Update copyright year 2022-01-02 23:34:29 -08:00
Christopher Snowhill fd75e1b260 HTTP source: Fix API abuse by calling completion handler as requested 2021-12-22 16:27:41 -08:00
Christopher Snowhill 45ee8b01df HTTP reader: Keep track of task suspend/resume so we don't stall trying to resume an already running stream 2021-12-22 00:14:19 -08:00
Christopher Snowhill 483b8d6647 Don't load metadata for stream URLs 2021-02-28 18:48:21 -08:00
Christopher Snowhill 4aca4a9c77 - Increase HTTP buffer size to 256KB
- Support a different older flavor of ShoutCAST server
2020-04-11 00:30:27 -07:00
Christopher Snowhill a43ae5fc81 - Redo HTTP buffering mechanism
- Handle HTTP errors better
- Fix handling ShoutCAST servers responding ICY headers
2020-03-10 01:56:59 -07:00
Christopher Snowhill 18acc7fdd2 Handle HTTP redirection, including preventing circular redirects 2020-03-08 20:13:46 -07:00
Christopher Snowhill 443aa05f88 Replace HTTPSource with a new reader based on NSURLSession, which actually does support HTTPS. This portion of the player now requires macOS 10.9. 2020-03-07 16:08:47 -08:00
Christopher Snowhill eda1c9674a Add HTTPS scheme to HTTP source plugin. 2018-09-23 16:45:03 -07:00
Chris Moeller 0e3644177e Updated everything else to ARC, and plugged a release cycle. 2016-05-05 13:05:39 -07:00
Chris Moeller e5a648578b mamburu: Logging improved, no more excessive logging in release builds 2013-10-11 05:03:55 -07:00
Chris Moeller ec0e45381e Cleaned up most of the warnings, eliminated use of deprecated APIs, and fixed the hotkeys crashing. 2013-10-03 01:00:58 -07:00
vspader d391d8c616 Added a couple of explanatory comments. 2009-03-07 02:11:33 -08:00
vspader 54c0d3b38d Moved HTTPSource back to plain ol' objc. 2009-03-07 02:09:04 -08:00
vspader acf8f8f3be Updated HTTPSource to use JNetLib. 2009-03-05 00:01:36 -08:00
vspader 6c5ecf3701 Updated PlaylistView so status column header is blank. 2008-03-01 02:48:12 +00:00
vspader f1b9141f4b Added mime type support. 2007-10-14 18:12:15 +00:00
vspader c536ea06a5 Removed useless PropertiesReader classes.
PluginController now uses the decoder if a properties reader class is not found.
PropertiesReaders should still be created if performance can be improved if code is only reading properties.
2007-10-14 17:31:20 +00:00
vspader 7d53e8586a Fixed thread exit problem. 2007-10-14 16:57:32 +00:00
vspader 0e6f0a8576 Fixed up thread handling. 2007-10-14 16:37:06 +00:00
vspader 0091ccb447 HTTPSource now uses NSURLConnection. 2007-10-14 16:29:49 +00:00
vspader 97a278a143 Cleaned up memory leaks. 2007-10-13 07:09:46 +00:00
vspader 139bab5e0e Fixed up streaming a bit.
Removed debugging code for http source. Was that in 0.06? Whoops.
2007-10-12 02:55:59 +00:00
vspader daba91b462 Removed debugging messages. 2007-07-11 01:20:32 +00:00
vspader eb96a75a1f Modified CoreAudioDecoder to use new source based system. It just ignores the source and uses its own, since the ExtAudioFile API is absolutely hopeless when it comes to streaming. 2007-03-04 04:36:10 +00:00
vspader ebaf536339 Fix for boundary conditions. Corner cases are your friend. 2007-03-04 00:50:19 +00:00
vspader 6f8d1b8e99 HTTPSource header search fix for boundary conditions. 2007-03-04 00:30:11 +00:00
vspader 7d6c8fc6f5 MP3 streaming! 2007-03-04 00:17:05 +00:00
vspader 934840ace5 Added source plugin support. Things are incredibly broken. Besides Ogg Vorbis. That should still work. 2007-03-02 01:36:52 +00:00