瀏覽代碼

UI: Remove obsolete/unused struct members

derrod 4 年之前
父節點
當前提交
ee30a83a6f
共有 3 個文件被更改,包括 2 次插入18 次删除
  1. 2 7
      UI/window-youtube-actions.cpp
  2. 0 8
      UI/youtube-api-wrappers.cpp
  3. 0 3
      UI/youtube-api-wrappers.hpp

+ 2 - 7
UI/window-youtube-actions.cpp

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

+ 0 - 8
UI/youtube-api-wrappers.cpp

@@ -180,14 +180,6 @@ bool YoutubeApiWrappers::GetChannelDescription(
 
 	channel_description.id =
 		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(
 		json_out["items"][0]["snippet"]["title"].string_value().c_str());
 	return channel_description.id.isEmpty() ? false : true;

+ 0 - 3
UI/youtube-api-wrappers.hpp

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