Преглед изворни кода

#106 - video transcoder: setting option for remote video conversion

Alex Trofimov пре 12 година
родитељ
комит
3931b72fca

+ 2 - 2
inc/classes/BxDolTranscoderVideo.php

@@ -31,7 +31,7 @@ bx_import('BxDolTranscoderVideoQuery');
  *
  * Video conversion can be performed on separate server or multiple servers, to do it:
  * - install dolphin on separate server(s), but connect to the same DB which your main site is using
- * - enable (TODO: create option) option (when it is enabled it takes a little longer to convert videos)
+ * - enable 'sys_transcoder_queue_files' option (when it is enabled it takes a little longer to convert videos)
  * - add the following code to the begining of inc/header.inc.php file on the main site, where your actual site in installed:
  *   @code
  *     define('BX_TRANSCODER_PROCESS_COMPLETED', '');
@@ -86,7 +86,7 @@ class BxDolTranscoderVideo extends BxDolTranscoder implements iBxDolFactoryObjec
     protected function __construct($aObject, $oStorage)
     {
         parent::__construct($aObject, $oStorage);
-        $this->_sQueueStorage = '';//'sys_transcoder_queue_files'; // TODO: add to param - enable/disable queue storage
+        $this->_sQueueStorage = getParam('sys_transcoder_queue_storage') ? 'sys_transcoder_queue_files' : '';
         $this->_oDb = new BxDolTranscoderVideoQuery($aObject);
         $this->_sQueueTable = $this->_oDb->getQueueTable();
     }

+ 3 - 1
install/sql/system.sql

@@ -310,7 +310,9 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'currency_sign', '_adm_stg_cpt_option_currency_sign', '$', 'digit', '', 'Avail', '_adm_stg_err_option_currency_sign', 31),
 
 (@iCategoryId, 'enable_gd', '_adm_stg_cpt_option_enable_gd', 'on', 'checkbox', '', '', '', 40),
-(@iCategoryId, 'useLikeOperator', '_adm_stg_cpt_option_use_like_operator', 'on', 'checkbox', '', '', '', 45);
+(@iCategoryId, 'useLikeOperator', '_adm_stg_cpt_option_use_like_operator', 'on', 'checkbox', '', '', '', 45),
+
+(@iCategoryId, 'sys_transcoder_queue_storage', '_adm_stg_cpt_option_sys_transcoder_queue_storage', '', 'checkbox', '', '', '', 50);
 
 
 --

+ 1 - 0
modules/boonex/english/data/langs/system.xml

@@ -1162,6 +1162,7 @@
 	<string name="_adm_stg_cpt_option_sys_template_cache_js_enable"><![CDATA[Enable cache for JS files]]></string>
 	<string name="_adm_stg_cpt_option_sys_template_page_width_max"><![CDATA[Max page width(in pixels)]]></string>
 	<string name="_adm_stg_cpt_option_sys_template_page_width_min"><![CDATA[Min page width(in pixels)]]></string>
+	<string name="_adm_stg_cpt_option_sys_transcoder_queue_storage"><![CDATA[Remote video transcoding]]></string>
 	<string name="_adm_stg_cpt_option_template"><![CDATA[Default Template]]></string>
 	<string name="_adm_stg_err_option_template"><![CDATA[Template cannot be empty and must have a valid name.]]></string>
 	<string name="_adm_stg_cpt_option_use_like_operator"><![CDATA[Use operator LIKE for search (recommended for small content)]]></string>