Skip to content

Commit 2e798a4

Browse files
committedJan 27, 2023
Fixed a bug where max SR amount for Subscribers wouldn't save correctly
Added a check to the "open website" button on the webserver config to only work when the webserver is runnin
1 parent 593644f commit 2e798a4

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed
 

‎Getting Started.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ The app's main window shows a menu at the top with multiple entries (we will go
6262
* Twitch Login => `Opens the website to login with Twitch`
6363
* Connect => `Connects the chat bot`
6464
* Disconnect => `Disconnects the chat bot`
65+
* Check Online Status => `Checks if the stream is live. The PubSub event will not trigger when the stream is already live when Songify starts, so this is a way to check if the stream is live`
6566
* [Bot Config](#bot-responses--commands) => `Opens the bot config window`
6667
* Songrequests => `Brings up this menu`
6768
* Queue => `Opens the queue sub-menu`
@@ -74,14 +75,14 @@ The app's main window shows a menu at the top with multiple entries (we will go
7475
* History Browser => `Opens a website that shows your listening history`
7576
* View => `Brings up this menu`
7677
* [Console](#console-window) => `Opens a consoel window that is attached to the main window and shows some logging information`
77-
* [☕ Buy Us A Coffee](https://ko-fi.com/overcodetv) => `Links to our Ko-Fi`
7878
* Dropdown Menu to the top right => `This used to select which player you want to grab information from`
7979

8080
#### Center area
81-
In the middle you'll see the current playing song as well as the album cover (if enabled)
81+
- In the middle you'll see the current playing song as well as the album cover (if enabled)
82+
- [☕ Buy Us A Coffee](https://ko-fi.com/overcodetv) => `Links to our Ko-Fi`
8283

8384
#### Footer
84-
- The footer will display a number of icons on the lower left which represent the status of services like Twitch API / Pubsub / Chatbot and web server.
85+
- The footer will display a number of icons on the lower left which represent the status of services like Twitch Chat / Twitch API / Pubsub / Spotify and web server.
8586
- In the middle of the bar are some informations shown
8687
- On the right side is the current version and a link to our website.
8788

‎Songify Slim/Util/Settings/Settings.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ private static void SetTwSrMaxReqModerator(int value)
15951595

15961596
private static void SetTwSrMaxReqSubscriber(int value)
15971597
{
1598-
currentConfig.AppConfig.TwSrMaxReqModerator = value;
1598+
currentConfig.AppConfig.TwSrMaxReqSubscriber = value;
15991599
ConfigHandler.WriteConfig(ConfigHandler.ConfigTypes.AppConfig, currentConfig.AppConfig);
16001600
}
16011601

‎Songify Slim/Util/Songify/TwitchHandler.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ await Application.Current.Dispatcher.Invoke(async () =>
114114
if (x.Result != MessageDialogResult.Affirmative) return Task.CompletedTask;
115115
Settings.Settings.TwOAuth = $"oauth:{Settings.Settings.TwitchAccessToken}";
116116
Settings.Settings.TwAcc = Settings.Settings.TwitchUser.Login;
117-
118117
return Task.CompletedTask;
119118
});
120119
((Window_Settings)window).SetControls();
@@ -133,10 +132,10 @@ await Application.Current.Dispatcher.Invoke(async () =>
133132
if (x.Result != MessageDialogResult.Affirmative) return Task.CompletedTask;
134133
Settings.Settings.TwOAuth = $"oauth:{Settings.Settings.TwitchAccessToken}";
135134
Settings.Settings.TwAcc = Settings.Settings.TwitchUser.Login;
136-
137135
return Task.CompletedTask;
138136
});
139137
}
138+
BotConnect();
140139
});
141140
};
142141

@@ -234,6 +233,8 @@ private static async void PubSub_OnChannelPointsRewardRedeemed(object sender, On
234233
{
235234
if (!Settings.Settings.IsLive && Settings.Settings.BotOnlyWorkWhenLive)
236235
return;
236+
if (Client == null || !Client.IsConnected)
237+
return;
237238
var redemption = e.RewardRedeemed.Redemption;
238239
var reward = e.RewardRedeemed.Redemption.Reward;
239240
var redeemedUser = e.RewardRedeemed.Redemption.User;
@@ -345,7 +346,6 @@ private static async void PubSub_OnChannelPointsRewardRedeemed(object sender, On
345346
if (!string.IsNullOrWhiteSpace(trackId))
346347
{
347348
ReturnObject returnObject = AddSong2(trackId, Settings.Settings.TwChannel, redeemedUser.DisplayName);
348-
//Send a Message to the user, that his Userlevel is too low
349349
msg = returnObject.Msg;
350350
if (Settings.Settings.RefundConditons.Any(i => i == returnObject.Refundcondition) && isManagable)
351351
{

‎Songify Slim/Views/SettingsWindow.xaml.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -958,7 +958,8 @@ private void TglBetaUpdates_Toggled(object sender, RoutedEventArgs e)
958958

959959
private void BtnWebserverOpenUrl_OnClick(object sender, RoutedEventArgs e)
960960
{
961-
Process.Start($"http://localhost:{Settings.WebServerPort}");
961+
if (GlobalObjects.WebServer.run)
962+
Process.Start($"http://localhost:{Settings.WebServerPort}");
962963
}
963964

964965
private void Tgl_OnlyWorkWhenLive_OnToggled(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)