Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0dec3adf9 | ||
|
|
f7eb63bed9 | ||
|
|
23f4f125db | ||
|
|
b3940f103a | ||
|
|
239527908f |
15
CHANGELOG.md
15
CHANGELOG.md
@@ -8,6 +8,17 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
||||
## [Unreleased]
|
||||
|
||||
|
||||
## [1.1.3] – 2020-12-18
|
||||
### Fixed
|
||||
- Recognize YouTube channel URLs in the format `/c/channel-name`
|
||||
|
||||
|
||||
## [1.1.2] – 2020-11-27
|
||||
### Fixed
|
||||
- Fixes hidden color option for marking unread entries. Unread menu entries did use `colorStatusIconTint` instead of `colorUnreadIndicator` (thanks @tchek)
|
||||
- Workaround for not displaying status bar highlight color in macOS 11.0 (issue #7)
|
||||
|
||||
|
||||
## [1.1.1] – 2020-08-31
|
||||
### Fixed
|
||||
- Feed indices weren't updated properly which resulted in empty feed menus (issue: #6)
|
||||
@@ -142,7 +153,9 @@ and this project does adhere to [Semantic Versioning](https://semver.org/spec/v2
|
||||
Initial release
|
||||
|
||||
|
||||
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.1.1...HEAD
|
||||
[Unreleased]: https://github.com/relikd/baRSS/compare/v1.1.3...HEAD
|
||||
[1.1.3]: https://github.com/relikd/baRSS/compare/v1.1.2...v1.1.3
|
||||
[1.1.2]: https://github.com/relikd/baRSS/compare/v1.1.1...v1.1.2
|
||||
[1.1.1]: https://github.com/relikd/baRSS/compare/v1.1.0...v1.1.1
|
||||
[1.1.0]: https://github.com/relikd/baRSS/compare/v1.0.2...v1.1.0
|
||||
[1.0.2]: https://github.com/relikd/baRSS/compare/v1.0.1...v1.0.2
|
||||
|
||||
@@ -108,7 +108,7 @@ ToDo
|
||||
The following list is not exhaustive but rather a collection of nice things that will be added eventually.
|
||||
I may postpone some until demand increases …
|
||||
|
||||
- [ ] Localizations
|
||||
- [ ] Localizations
|
||||
- [ ] Feed generator for websites without feeds
|
||||
- [ ] Automatically choose best update interval (e.g., avg)
|
||||
- [ ] Sync with online services
|
||||
@@ -180,7 +180,7 @@ This project uses a modified version of Brent Simmons' [RSXML](https://github.co
|
||||
##### Trivia
|
||||
|
||||
- Start of project: __July 19, 2018__
|
||||
- Estimated development time: __1953h+__
|
||||
- Estimated development time: __1965h+__
|
||||
- First prototype used __feedparser python__ library
|
||||
|
||||
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
54ACC27421061B3B0020715F /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0940;
|
||||
LastUpgradeCheck = 1200;
|
||||
ORGANIZATIONNAME = relikd;
|
||||
TargetAttributes = {
|
||||
54ACC27B21061B3B0020715F = {
|
||||
@@ -647,6 +647,7 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
@@ -702,6 +703,7 @@
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1000"
|
||||
LastUpgradeVersion = "1200"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
||||
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
// TODO: Make plugins extensible? community extensions.
|
||||
@interface YouTubePlugin : NSObject
|
||||
+ (NSString*)feedURL:(NSURL*)url;
|
||||
+ (NSString*)feedURL:(NSURL*)url data:(NSData*)html;
|
||||
+ (NSString*)videoImage:(NSString*)videoid;
|
||||
+ (NSString*)videoImageHQ:(NSString*)videoid;
|
||||
@end
|
||||
|
||||
@@ -33,12 +33,13 @@
|
||||
|
||||
@return @c nil if @c url is not properly formatted, YouTube feed URL otherwise.
|
||||
*/
|
||||
+ (NSString*)feedURL:(NSURL*)url {
|
||||
+ (NSString*)feedURL:(NSURL*)url data:(NSData*)html {
|
||||
if (![url.host hasSuffix:@"youtube.com"]) // 'youtu.be' & 'youtube-nocookie.com' will redirect
|
||||
return nil;
|
||||
// https://www.youtube.com/channel/[channel-id]
|
||||
// https://www.youtube.com/user/[user-name]
|
||||
// https://www.youtube.com/playlist?list=[playlist-id]
|
||||
// https://www.youtube.com/c/[channel-name]
|
||||
#if DEBUG && ENV_LOG_YOUTUBE
|
||||
printf("resolving YouTube url:\n");
|
||||
printf(" ↳ %s\n", url.absoluteString.UTF8String);
|
||||
@@ -62,6 +63,23 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else if ([type isEqualToString:@"c"]) {
|
||||
NSData *m_head = [@"<meta itemprop=\"channelId\" content=\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSRange tmp = [html rangeOfData:m_head options:0 range:NSMakeRange(0, html.length)];
|
||||
if (tmp.location == NSNotFound) {
|
||||
NSData *m_json = [@"\"channelId\":\"" dataUsingEncoding:NSUTF8StringEncoding];
|
||||
tmp = [html rangeOfData:m_json options:0 range:NSMakeRange(0, html.length)];
|
||||
}
|
||||
NSUInteger start = tmp.location + tmp.length;
|
||||
NSUInteger end = html.length - start;
|
||||
if (end > 50) end = 50; // no need to search till the end
|
||||
NSString *substr = [[NSString alloc] initWithData:[html subdataWithRange:NSMakeRange(start, end)] encoding:NSUTF8StringEncoding];
|
||||
if (substr) {
|
||||
NSUInteger to = [substr rangeOfString:@"\""].location;
|
||||
if (to != NSNotFound) {
|
||||
found = [ytBase stringByAppendingFormat:@"?channel_id=%@", [substr substringToIndex:to]];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#if DEBUG && ENV_LOG_YOUTUBE
|
||||
|
||||
@@ -178,7 +178,7 @@
|
||||
}
|
||||
else if (!meta || meta.feedLinks.count == 0) {
|
||||
if ([xml.url.host hasSuffix:@"youtube.com"])
|
||||
feedURL = [YouTubePlugin feedURL:xml.url];
|
||||
feedURL = [YouTubePlugin feedURL:xml.url data:xml.data];
|
||||
if (feedURL.length == 0)
|
||||
self.error = [NSError feedURLNotFound:xml.url];
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1.1</string>
|
||||
<string>1.1.3</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
<array>
|
||||
<dict>
|
||||
@@ -70,7 +70,7 @@
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>14624</string>
|
||||
<string>14644</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.news</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
@@ -83,7 +83,7 @@
|
||||
<true/>
|
||||
</dict>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2019 relikd. Public Domain.</string>
|
||||
<string>Copyright © 2020 relikd.</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string>AppHook</string>
|
||||
<key>UTImportedTypeDeclarations</key>
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
if (@available(macOS 10.14, *)) {
|
||||
color = UserPrefsColor(Pref_colorStatusIconTint, [NSColor controlAccentColor]);
|
||||
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor controlAccentColor]);
|
||||
} else {
|
||||
color = UserPrefsColor(Pref_colorStatusIconTint, [NSColor systemBlueColor]);
|
||||
color = UserPrefsColor(Pref_colorUnreadIndicator, [NSColor systemBlueColor]);
|
||||
}
|
||||
});
|
||||
return color;
|
||||
|
||||
@@ -121,7 +121,9 @@
|
||||
BOOL tint = (self.unreadCountTotal > 0 && hasNet && UserPrefsBool(Pref_globalTintMenuIcon));
|
||||
self.statusItem.button.image = [NSImage imageNamed:(hasNet ? RSSImageMenuBarIconActive : RSSImageMenuBarIconPaused)];
|
||||
|
||||
if (@available(macOS 10.14, *)) {
|
||||
if (@available(macOS 11, *)) {
|
||||
self.statusItem.button.image.template = !tint;
|
||||
} else if (@available(macOS 10.14, *)) {
|
||||
// There is no proper way to display tinted icon WITHOUT tinted text!
|
||||
// - using alternate image instead of tint:
|
||||
// icon & text stays black on highlight (but only in light mode)
|
||||
|
||||
Reference in New Issue
Block a user