<commit_before>﻿#include "nowlivewaku.h"
#include "../../../ui/mainwindow.h"

NowLiveWaku::NowLiveWaku(MainWindow* mwin, NicoLiveManager* nlman, QObject* parent) :
  LiveWaku(mwin, nlman, parent),
  commtcp(nullptr),
  isConnected(false)
{
}

NowLiveWaku::NowLiveWaku(MainWindow* mwin, NicoLiveManager* nlman, QString broadID, QString community, QObject* parent) :
  LiveWaku(mwin, nlman, broadID, community, parent),
  commtcp(nullptr),
  isConnected(false)
{
}

void NowLiveWaku::broadDisconnect() {
  if (commtcp != nullptr) {
    if (commtcp->isConnected())
      commtcp->close();
    commtcp->deleteLater();
    commtcp = nullptr;
  }
  isConnected = false;
}

void NowLiveWaku::getPostKeyAPI(const QString& thread, int block_num)
{
  nlman->getPostKeyAPI(thread, block_num);
}

void NowLiveWaku::playerStatusFinished(QNetworkReply* reply)
{
  mwin->insLog("LiveWaku::playerStatusFinished :");<commit_msg>fix bug : initialization of 3 did variables in nowlivewaku.cpp<commit_after>﻿#include "nowlivewaku.h"
#include "../../../ui/mainwindow.h"

NowLiveWaku::NowLiveWaku(MainWindow* mwin, NicoLiveManager* nlman, QObject* parent) :
  LiveWaku(mwin, nlman, parent),
  didAlermCommand(false),
  didExtend(false),
  didUpdate(false),
  commtcp(nullptr),
  isConnected(false)
{
}

NowLiveWaku::NowLiveWaku(MainWindow* mwin, NicoLiveManager* nlman, QString broadID, QString community, QObject* parent) :
  LiveWaku(mwin, nlman, broadID, community, parent),
  didAlermCommand(false),
  didExtend(false),
  didUpdate(false),
  commtcp(nullptr),
  isConnected(false)
{
}

void NowLiveWaku::broadDisconnect() {
  if (commtcp != nullptr) {
    if (commtcp->isConnected())
      commtcp->close();
    commtcp->deleteLater();
    commtcp = nullptr;
  }
  isConnected = false;
}

void NowLiveWaku::getPostKeyAPI(const QString& thread, int block_num)
{
  nlman->getPostKeyAPI(thread, block_num);
}

void NowLiveWaku::playerStatusFinished(QNetworkReply* reply)
{
  mwin->insLog("LiveWaku::playerStatusFinished :");
{'fraction_non_alphanumeric': 0.1417873190214678, 'fraction_numerical': 0.0004992511233150275, 'mean_word_length': 5.702341137123746, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2641010', 'n_tokens_mistral': 714, 'n_tokens_neox': 724, 'n_words': 128}