{"id":274629,"date":"2016-02-19T20:23:01","date_gmt":"2016-02-19T17:23:01","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=274629"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=274629","title":{"rendered":"\u041a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 DLNA-\u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c Mediatomb"},"content":{"rendered":"<p>       \u0423\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e DLNA-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Mediatomb. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043e-\u0430\u0443\u0434\u0438\u043e-\u0444\u043e\u0442\u043e \u0430\u0440\u0445\u0438\u0432\u0443 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e DLNA.<br \/>  Mediatomb \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c WEB-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0441 \u043c\u0435\u0434\u0438\u0430-\u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u0430\u043f\u043a\u0438 \u0441 \u043c\u0435\u0434\u0438\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 CURL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. <\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0435\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435. <br \/>  <a name=\"habracut\"><\/a><br \/>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e: <\/p>\n<ul>\n<li>\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e Mediatomb;<\/li>\n<li>\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Mediatomb \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 MySQL \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430;<\/li>\n<\/ul>\n<p>  \u0437\u0434\u0435\u0441\u044c \u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443, \u0430 \u043f\u0435\u0440\u0435\u0439\u0434\u0443 \u0441\u0440\u0430\u0437\u0443 \u043a \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043d\u0430 bash, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u043c\u0435\u0434\u0438\u0430-\u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u043c\u0438 Mediatomb.<\/p>\n<h2>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f MYSQL \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0411\u0414 Mediatomb<\/h2>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 MYSQL \u043e\u0441\u043e\u0431\u043e\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0440\u0435\u043a\u0432\u0438\u0437\u0438\u0442\u0430\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 <strong>\/etc\/mediatomb\/config.xml<\/strong>: <\/p>\n<pre><code class=\"xml\">&lt;mysql enabled=&quot;yes&quot;&gt;     &lt;host&gt;localhost&lt;\/host&gt;     &lt;username&gt;mediatomb&lt;\/username&gt;     &lt;database&gt;mediatomb&lt;\/database&gt; &lt;\/mysql&gt;<\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c <strong>mediatomb<\/strong> \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u043f\u0430\u0440\u043e\u043b\u044f \u0438 \u0435\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0441 <strong>localhost<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430 \u0445\u043e\u0441\u0442\u0435 \u0434\u0430\u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0442 \u0442\u043e\u0433\u043e, \u0433\u0434\u0435 \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d \u0441\u0430\u043c Mediatomb, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432 \u0411\u0414 MySQL mediatomb \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>mt<\/strong> \u0441 \u043f\u0430\u0440\u043e\u043b\u0435\u043c <strong>mt<\/strong>:<\/p>\n<pre><code class=\"sql\">\u0441reate user 'mt'@'%' identified by 'mt'; grant select on mediatomb.* to 'mt'@'%';<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Mediatomb<\/h2>\n<p>  \u041f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u043c \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u043c \u043e\u0431\u0445\u043e\u0434\u043e\u043c \u0432 \u043c\u0435\u0434\u0438\u0430-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 Mediatomb \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>http:\/\/&lt;mediatomb_ip&gt;:50500\/content\/interface?req_type=autoscan&amp;return_type=xml&amp;sid=33a2c429c3c4c82e03baca9564f05908&amp;action=as_edit_save&amp;object_id=2f6d6e742f566964656f&amp;from_fs=1&amp;scan_mode=inotify&amp;scan_level=full&amp;recursive=true&amp;hidden=true&amp;cancel=Cancel<\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043a\u0430\u043a \u0442\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435: <\/p>\n<ul>\n<li>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0421\u0435\u0441\u0441\u0438\u0438: <strong>sid=33a2c429c3c4c82e03baca9564f05908<\/strong><\/li>\n<li>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430: <strong>object_id=2f6d6e742f566964656f<\/strong><\/li>\n<\/ul>\n<p>  <strong>\u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0441\u0435\u0441\u0441\u0438\u0438<\/strong>, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0432\u0445\u043e\u0434\u0435 \u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 Mediatomb, \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441:<\/p>\n<pre><code>http:\/\/&lt;mediatomb_ip&gt;:50500\/content\/interface?req_type=auth&amp;return_type=xml&amp;sid=null&amp;action=get_sid<\/code><\/pre>\n<p>  \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442:<\/p>\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;root sid_was_valid=&quot;0&quot; sid=&quot;a8ffd95c341aa410a44afaeaf354e105&quot; logged_in=&quot;1&quot; success=&quot;1&quot;\/&gt;<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0441 sid, \u043f\u043e\u043f\u0443\u0442\u043d\u043e \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0430\u044f \u0435\u0435 \u043e\u0442 \u043a\u0430\u0432\u044b\u0447\u0435\u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"bash\">sid=`curl -s &quot;http:\/\/&lt;mediatomb_ip&gt;:50500\/content\/interface?req_type=auth&amp;return_type=xml&amp;sid=null&amp;action=get_sid&quot; | grep sid | awk '{print $3}' | sed -e 's\/\\&quot;\/\/g'`<\/code><\/pre>\n<p>  \u0421 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0447\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 <strong>2f6d6e742f566964656f<\/strong> \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0430\u0439\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441 \u043f\u0443\u0442\u0435\u043c \u043a \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443 (\u0444\u0430\u0439\u043b\u0443 \u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443), \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u044b\u0439 \u0432\u0438\u0434. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043d\u0430\u0448\u0430 \u0448\u0435\u0441\u0442\u043d\u0430\u0434\u0446\u0430\u0442\u0435\u0440\u0438\u0447\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u0430 <strong>\/mnt\/Video<\/strong> (\u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u043a\u0430\u043a \u0440\u0430\u0437 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0432 Mediatomb).<\/p>\n<p>  \u0422.\u0435. \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f object_Id, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u043c:<\/p>\n<pre><code class=\"bash\">catalog=$2 oid=&quot;&quot; for ((i=0;$i&lt;${#catalog};i=$(($i+1)))) do   sym=`printf '%0.2x' &quot;'${catalog:$i:1}&quot;`   oid=$oid$sym done<\/code><\/pre>\n<p>  \u041d\u0443 \u0438 \u0441\u043e\u0431\u0438\u0440\u0430\u044f \u0432\u0441\u0435 \u0432\u044b\u0448\u0435 \u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0432 CURL-\u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0449\u0443\u044e \u043a\u0430\u0442\u0430\u043b\u043e\u0433 <strong>\/mnt\/Video<\/strong> \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 MediaTomb:<\/p>\n<pre><code class=\"bash\">curl -s -o \/dev\/null &quot;http:\/\/&lt;mediatomb_ip&gt;:50500\/content\/interface?req_type=autoscan&amp;return_type=xml&amp;$sid&amp;action=as_edit_save&amp;object_id=$oid&amp;from_fs=1&amp;scan_mode=inotify&amp;scan_level=full&amp;recursive=true&amp;hidden=true&amp;cancel=Cancel&quot;<\/code><\/pre>\n<p>  <\/p>\n<h2>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Mediatomb<\/h2>\n<p>  \u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 Mediatomb \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e:<\/p>\n<pre><code>http:\/\/&lt;mediatomb_ip&gt;:50500\/content\/interface?req_type=remove&amp;return_type=xml&amp;sid=ea2d65d2dbc72d96ed1ed37dc1d2bbf6&amp;object_id=686994&amp;all=0&amp;updates=check<\/code><\/pre>\n<p>  \u041e\u0434\u043d\u0430\u043a\u043e <strong>object_id<\/strong> \u0437\u0434\u0435\u0441\u044c \u2014 \u044d\u0442\u043e \u0443\u0436\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 MYSQL. \u0414\u043e\u0441\u0442\u0430\u0442\u044c <strong>object_id<\/strong>, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 <strong>\/mnt\/Video<\/strong>, \u0438\u0437 \u0411\u0414 \u043c\u043e\u0436\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c SQL-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c:<\/p>\n<pre><code class=\"sql\">select id from mt_cds_object where location=&quot;D\/mnt\/Video&quot;<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438\u0437 2\u0433\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 bash-\u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">catalog=$2 oid=`echo &quot;select id from mt_cds_object where location=\\&quot;D$catalog\\&quot;&quot; | mysql mediatomb | grep -v id`<\/code><\/pre>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430 CURL-\u0437\u0430\u043f\u0440\u043e\u0441, \u0443\u0436\u0435 \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0438\u0437 \u043c\u0435\u0434\u0438\u0430-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"bash\">curl -s -o \/dev\/null &quot;http:\/\/&lt;meditomb_ip&gt;:50500\/content\/interface?req_type=remove&amp;return_type=xml&amp;$sid&amp;object_id=$oid&amp;all=0&amp;updates=check&quot;<\/code><\/pre>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u043f\u043e\u0436\u0430\u043b\u0443\u0439 \u0438 \u0432\u0441\u0435. \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u043f\u0440\u0438\u0432\u0435\u0434\u0443 \u043f\u043e\u043b\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <strong>mtomb<\/strong>, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0449\u0438\u0439 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <\/p>\n<pre><code class=\"bash\">mtomb &lt;add | del&gt; &lt;\u041f\u0443\u0442\u044c \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443&gt;<\/code><\/pre>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041a\u041e\u0414 **BASH**:<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">#!\/bin\/bash  cmd=$1 catalog=$2 meditomb_ip=192.168.7.10 mtombdb=&quot;mysql -h $mediatomb_ip mediatomb -umt -pmt&quot;  # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0441\u043b\u044d\u0448 \u0432 \u043f\u043e\u043b\u043d\u043e\u043c \u043f\u0443\u0442\u0438 \u043a \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443 \u0435\u0441\u043b\u0438 \u043e\u043d \u0435\u0441\u0442\u044c if [ &quot;${catalog:(-1):1}&quot; = &quot;\/&quot; ]; then   catalog=${catalog:0:(-1)} fi  if [ &quot;$cmd&quot; = &quot;add&quot; ]; then    echo &quot;Try add $catalog in mediatomb&quot;     # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c object_id (\u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043c \u043f\u0443\u0442\u044c \u0432 16-\u0440\u0438\u0447\u043d\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443)    oid=&quot;&quot;    for ((i=0;$i&lt;${#catalog};i=$(($i+1))))    do      sym=`printf '%0.2x' &quot;'${catalog:$i:1}&quot;`      oid=$oid$sym    done     # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c SID (Session ID)    sid=`curl -s &quot;http:\/\/$meditomb_ip:50500\/content\/interface?req_type=auth&amp;return_type=xml&amp;sid=null&amp;action=get_sid&quot; | grep sid | awk '{print $3}' | sed -e 's\/\\&quot;\/\/g'`     # \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0443    if [ -a &quot;$catalog&quot; ];    then      curl -s -o \/dev\/null &quot;http:\/\/$meditomb_ip:50500\/content\/interface?req_type=autoscan&amp;return_type=xml&amp;$sid&amp;action=as_edit_save&amp;object_id=$oid&amp;from_fs=1&amp;scan_mode=inotify&amp;scan_level=full&amp;recursive=true&amp;hidden=true&amp;cancel=Cancel&quot;    else      echo &quot;Nothing to add...&quot;    fi fi  if [ &quot;$cmd&quot; = &quot;del&quot; ]; then    echo &quot;Try delete $catalog from mediatomb&quot;     # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c SID (Session ID)    sid=`curl -s &quot;http:\/\/$meditomb_ip:50500\/content\/interface?req_type=auth&amp;return_type=xml&amp;sid=null&amp;action=get_sid&quot; | grep sid | awk '{print $3}' | sed -e 's\/\\&quot;\/\/g'`     # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0430\u043f\u043a\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c (object_id)    oid=`echo &quot;select id from mt_cds_object where location=\\&quot;D$catalog\\&quot;&quot; | $mtombdb | grep -v id`     # \u0423\u0434\u0430\u043b\u044f\u0435\u043c \u043f\u0430\u043f\u043a\u0443    if [ -n &quot;$oid&quot; ];    then      curl -s -o \/dev\/null &quot;http:\/\/$meditomb_ip:50500\/content\/interface?req_type=remove&amp;return_type=xml&amp;$sid&amp;object_id=$oid&amp;all=0&amp;updates=check&quot;    else      echo &quot;Nothing to delete...&quot;    fi fi<\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 GIST: <a href=\"https:\/\/gist.github.com\/mitshel\/6b140467182c3377c000\">https:\/\/gist.github.com\/mitshel\/6b140467182c3377c000<\/a>                 <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/277585\/\"> https:\/\/habrahabr.ru\/post\/277585\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0423\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u0433\u043e DLNA-\u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e Mediatomb. \u042d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0438 \u043b\u0435\u0433\u043a\u0438\u0439 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0432\u0438\u0434\u0435\u043e-\u0430\u0443\u0434\u0438\u043e-\u0444\u043e\u0442\u043e \u0430\u0440\u0445\u0438\u0432\u0443 \u0441 \u043b\u044e\u0431\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0435\u0433\u043e DLNA.<br \/>  Mediatomb \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c WEB-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0438 \u0441 \u043c\u0435\u0434\u0438\u0430-\u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u043d\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u043b\u0430\u0441\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0435 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e, \u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u044c\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u0430\u043f\u043a\u0438 \u0441 \u043c\u0435\u0434\u0438\u0430-\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0448\u0442\u0430\u0442\u043d\u044b\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0434\u043b\u044f \u044d\u0442\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u043d\u0435 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b \u0441\u043e\u0437\u0434\u0430\u043d \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 CURL, \u043a\u043e\u0442\u043e\u0440\u044b\u0439, \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0438\u043c\u0438\u0442\u0438\u0440\u0443\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0441 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u043c \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b \u043c\u043d\u0435 \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. <\/p>\n<p>  \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u0435\u0449\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0438\u043b \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u0435\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.   <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-274629","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=274629"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/274629\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=274629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=274629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=274629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}