UI: Remove obsolete/unused struct members

This commit is contained in:
derrod 2021-09-04 06:58:38 +02:00 committed by Jim
parent d5f3ddabd1
commit ee30a83a6f
3 changed files with 2 additions and 18 deletions

View File

@ -110,8 +110,6 @@ OBSYoutubeActions::OBSYoutubeActions(QWidget *parent, Auth *auth)
QVector<CategoryDescription> category_list; QVector<CategoryDescription> category_list;
if (!apiYouTube->GetVideoCategoriesList(category_list)) { if (!apiYouTube->GetVideoCategoriesList(category_list)) {
blog(LOG_DEBUG, "Could not get video category for country; %s.",
channel.country.toStdString().c_str());
ShowErrorDialog( ShowErrorDialog(
parent, parent,
apiYouTube->GetLastError().isEmpty() apiYouTube->GetLastError().isEmpty()
@ -383,7 +381,7 @@ bool OBSYoutubeActions::StreamNowAction(YoutubeApiWrappers *api,
blog(LOG_DEBUG, "No broadcast created."); blog(LOG_DEBUG, "No broadcast created.");
return false; return false;
} }
stream = {"", "", "OBS Studio Video Stream", ""}; stream = {"", "", "OBS Studio Video Stream"};
if (!apiYouTube->InsertStream(stream)) { if (!apiYouTube->InsertStream(stream)) {
blog(LOG_DEBUG, "No stream created."); blog(LOG_DEBUG, "No stream created.");
return false; return false;
@ -465,15 +463,12 @@ bool OBSYoutubeActions::ChooseAnEventAction(YoutubeApiWrappers *api,
auto streamName = item["cdn"]["ingestionInfo"]["streamName"] auto streamName = item["cdn"]["ingestionInfo"]["streamName"]
.string_value(); .string_value();
auto title = item["snippet"]["title"].string_value(); auto title = item["snippet"]["title"].string_value();
auto description =
item["snippet"]["description"].string_value();
stream.name = streamName.c_str(); stream.name = streamName.c_str();
stream.title = title.c_str(); stream.title = title.c_str();
stream.description = description.c_str();
api->SetBroadcastId(selectedBroadcast); api->SetBroadcastId(selectedBroadcast);
} else { } else {
stream = {"", "", "OBS Studio Video Stream", ""}; stream = {"", "", "OBS Studio Video Stream"};
if (!apiYouTube->InsertStream(stream)) { if (!apiYouTube->InsertStream(stream)) {
blog(LOG_DEBUG, "No stream created."); blog(LOG_DEBUG, "No stream created.");
return false; return false;

View File

@ -180,14 +180,6 @@ bool YoutubeApiWrappers::GetChannelDescription(
channel_description.id = channel_description.id =
QString(json_out["items"][0]["id"].string_value().c_str()); QString(json_out["items"][0]["id"].string_value().c_str());
channel_description.country =
QString(json_out["items"][0]["snippet"]["country"]
.string_value()
.c_str());
channel_description.language =
QString(json_out["items"][0]["snippet"]["defaultLanguage"]
.string_value()
.c_str());
channel_description.title = QString( channel_description.title = QString(
json_out["items"][0]["snippet"]["title"].string_value().c_str()); json_out["items"][0]["snippet"]["title"].string_value().c_str());
return channel_description.id.isEmpty() ? false : true; return channel_description.id.isEmpty() ? false : true;

View File

@ -8,15 +8,12 @@
struct ChannelDescription { struct ChannelDescription {
QString id; QString id;
QString title; QString title;
QString country;
QString language;
}; };
struct StreamDescription { struct StreamDescription {
QString id; QString id;
QString name; QString name;
QString title; QString title;
QString description;
}; };
struct CategoryDescription { struct CategoryDescription {