]> Some of my projects - anidbudpclient.git/commitdiff
Add support for voting by EID
authorAPTX <redacted>
Sat, 7 Feb 2026 08:00:29 +0000 (17:00 +0900)
committerAPTX <redacted>
Sat, 7 Feb 2026 08:00:37 +0000 (17:00 +0900)
EpNo as string is not yet supported.

votecommand.cpp
votecommand.h

index 3b55c32fa1594a61f1b3cda303240eddd40c61e0..51f7cb9bcc22880ed7a57150457b68b1951911c3 100644 (file)
@@ -125,8 +125,9 @@ bool VoteCommand::waitForResult() const
 
 bool VoteCommand::isValid() const
 {
-       return (m_id || !m_name.isEmpty())
-                       && ((m_epno && m_voteType == AnimeVote) || !m_epno);
+       return ((m_id || !m_name.isEmpty()) &&
+                               ((m_epno && m_voteType == AnimeVote) || !m_epno) ||
+                       (m_voteType == EpisodeIdVote && m_id));
        // Value is set to 0 if not in valid range
 }
 
index 1ee16163e956c774aef1cf5efc4c6aba1e4f388b..5aaeef3ee6902c607faa86b423898c4ba9044e21 100644 (file)
@@ -11,12 +11,12 @@ class ANIDBUDPCLIENTSHARED_EXPORT VoteCommand : public AbstractCommand
 {
 
 public:
-
        enum VoteType
        {
                AnimeVote               = 1,
                AnimeTempVote   = 2,
                GroupVote               = 3,
+               EpisodeIdVote   = 6,
        };
 
        enum VoteAction {