-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # foo_nowplayingv2/SDK
- Loading branch information
Showing
376 changed files
with
247 additions
and
54,916 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "FluentWPF"] | ||
path = FluentWPF | ||
url = https://github.com/tumugin/FluentWPF.git | ||
[submodule "foo_nowplayingv2/SDK"] | ||
path = foo_nowplayingv2/SDK | ||
url = https://github.com/tumugin/foobar2000_sdk.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using NowPlayingV2.Core; | ||
|
||
namespace NowPlayingV2.NowPlaying | ||
{ | ||
public class ManualTweet | ||
{ | ||
public static Task RunManualTweet() | ||
{ | ||
return Task.Run(() => | ||
{ | ||
//check playing song | ||
if (!(NowPlaying.PipeListener.staticpipelistener.LastPlayedSong?.Clone() is SongInfo songcache)) | ||
throw new Exception("何を再生されていなかったため、投稿できませんでした。"); | ||
//list up all accounts | ||
if (!ConfigStore.StaticConfig.accountList.Any()) | ||
throw new Exception("アカウントが何も追加されていません。アカウントを追加してからこの操作を行ってください。"); | ||
if (!ConfigStore.StaticConfig.accountList.Any(itm => itm.Enabled)) | ||
throw new Exception("有効化されているアカウントが一つもありません。最低限一つのアカウントを有効化してください。"); | ||
ConfigStore.StaticConfig.accountList.Where(itm => itm.Enabled).ToList().ForEach(account => | ||
{ | ||
//make tweet string | ||
var tweettext = Tsumugi.TweetConverter.SongInfoToString(ConfigStore.StaticConfig.TweetFormat, | ||
songcache, | ||
ConfigStore.StaticConfig.EnableAutoDeleteText140, account); | ||
if (account.CountText(tweettext) > account.MaxTweetLength) | ||
throw new Exception($"投稿可能な最大文字数({account.MaxTweetLength}文字)を超えたため、投稿出来ませんでした。"); | ||
//tweet | ||
if (ConfigStore.StaticConfig.EnableTweetWithAlbumArt) | ||
{ | ||
account.UpdateStatus(tweettext, songcache.AlbumArtBase64); | ||
} | ||
else | ||
{ | ||
account.UpdateStatus(tweettext); | ||
} | ||
}); | ||
}); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.