diff --git a/DiscordManager.h b/DiscordManager.h
index 6a833bbe..6ddd9cf5 100644
--- a/DiscordManager.h
+++ b/DiscordManager.h
@@ -13,6 +13,6 @@
- (void)startDiscordRPC;
- (void)shutdownDiscordRPC;
-- (void)UpdatePresence:(NSString *)state withDetails:(NSString *)details;
+- (void)UpdatePresence:(NSString *)state withDetails:(NSString *)details isStreaming:(bool)isStreaming;
- (void)removePresence;
@end
diff --git a/Hachidori-Info.plist b/Hachidori-Info.plist
index fe36023c..7f562eee 100644
--- a/Hachidori-Info.plist
+++ b/Hachidori-Info.plist
@@ -17,11 +17,11 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 3.2-alpha2
+ $(MARKETING_VERSION)
CFBundleSignature
????
CFBundleVersion
- 20190605
+ $(CURRENT_PROJECT_VERSION)
LSApplicationCategoryType
public.app-category.entertainment
LSMinimumSystemVersion
diff --git a/Hachidori.m b/Hachidori.m
index 965d824a..72b0303f 100644
--- a/Hachidori.m
+++ b/Hachidori.m
@@ -891,7 +891,9 @@ - (void)setNotifier {
- (void)sendDiscordPresence:(LastScrobbleStatus *)lscrobble {
if ([NSUserDefaults.standardUserDefaults boolForKey:@"usediscordrichpresence"] && self.discordmanager.discordrpcrunning) {
- [self.discordmanager UpdatePresence:[NSString stringWithFormat:@"%@ Episode %@ ", lscrobble.WatchStatus,self.lastscrobble.LastScrobbledEpisode] withDetails:[NSString stringWithFormat:@"%@", lscrobble.LastScrobbledActualTitle]];
+ OnigRegexp *regex = [OnigRegexp compile:@"(Safari|Webkit|Omniweb|Roccat|Chrome|Chromium|Edge)" options:OnigOptionIgnorecase];
+ bool isStreaming = [regex search:lscrobble.LastScrobbledSource].strings.count > 0;
+ [self.discordmanager UpdatePresence:[NSString stringWithFormat:@"%@ Episode %@ ", lscrobble.WatchStatus,self.lastscrobble.LastScrobbledEpisode] withDetails:[NSString stringWithFormat:@"%@", lscrobble.LastScrobbledActualTitle] isStreaming:isStreaming];
}
}
diff --git a/Hachidori.xcodeproj/project.pbxproj b/Hachidori.xcodeproj/project.pbxproj
index 49566257..c223b856 100644
--- a/Hachidori.xcodeproj/project.pbxproj
+++ b/Hachidori.xcodeproj/project.pbxproj
@@ -1667,6 +1667,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 20190812;
DEVELOPMENT_TEAM = 9HDZTER525;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
@@ -1693,6 +1694,7 @@
"$(PROJECT_DIR)",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MARKETING_VERSION = "3.2-alpha3";
PRODUCT_BUNDLE_IDENTIFIER = "moe.ateliershiori.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Hachidori;
PROVISIONING_PROFILE = "";
@@ -1713,6 +1715,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
+ CURRENT_PROJECT_VERSION = 20190812;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 9HDZTER525;
ENABLE_HARDENED_RUNTIME = YES;
@@ -1737,6 +1740,7 @@
"$(PROJECT_DIR)",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
+ MARKETING_VERSION = "3.2-alpha3";
PRODUCT_BUNDLE_IDENTIFIER = "moe.ateliershiori.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = Hachidori;
PROVISIONING_PROFILE = "";