Przeglądaj źródła

Allow file names to be used instead of URLs

jp9000 12 lat temu
rodzic
commit
faabeff743
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 1 1
      obs/forms/OBSBasicSettings.ui
  2. 3 2
      obs/window-basic-main.cpp

+ 1 - 1
obs/forms/OBSBasicSettings.ui

@@ -155,7 +155,7 @@
          <item row="3" column="0">
          <item row="3" column="0">
           <widget class="QLabel" name="label_18">
           <widget class="QLabel" name="label_18">
            <property name="text">
            <property name="text">
-            <string>URL:</string>
+            <string>URL/Filename:</string>
            </property>
            </property>
           </widget>
           </widget>
          </item>
          </item>

+ 3 - 2
obs/window-basic-main.cpp

@@ -813,11 +813,12 @@ void OBSBasic::on_streamButton_clicked()
 		int aBitrate = config_get_uint(basicConfig, "OutputTemp",
 		int aBitrate = config_get_uint(basicConfig, "OutputTemp",
 				"ABitrate");
 				"ABitrate");
 
 
-		if (!url || !key)
+		if (!url)
 			return;
 			return;
 
 
 		string fullURL = url;
 		string fullURL = url;
-		fullURL = fullURL + "/" + key;
+		if (key && *key)
+			fullURL = fullURL + "/" + key;
 
 
 		obs_data_t data = obs_data_create();
 		obs_data_t data = obs_data_create();
 		obs_data_setstring(data, "filename", fullURL.c_str());
 		obs_data_setstring(data, "filename", fullURL.c_str());