<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_media_update_child_count</id>
	<title>Truxton media update child count - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://truxwiki.com/index.php?action=history&amp;feed=atom&amp;title=Truxton_media_update_child_count"/>
	<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_media_update_child_count&amp;action=history"/>
	<updated>2026-09-09T16:09:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_media_update_child_count&amp;diff=7075&amp;oldid=prev</id>
		<title>Sam: /* Sample */</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_media_update_child_count&amp;diff=7075&amp;oldid=prev"/>
		<updated>2024-01-28T12:44:34Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Sample&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 12:44, 28 January 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    printf( &amp;quot;Files were added, updating &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;full paths &lt;/del&gt;now...\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    printf( &amp;quot;Files were added, updating &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;child counts &lt;/ins&gt;now...\n&amp;quot; );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    truxton_media_update_child_count( media );&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    truxton_media_update_child_count( media );&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
	<entry>
		<id>https://truxwiki.com/index.php?title=Truxton_media_update_child_count&amp;diff=7071&amp;oldid=prev</id>
		<title>Sam: Created page with &quot;This will analyze the media and update the &lt;code&gt;[NumberOfChildren]&lt;/code&gt; column of the &lt;code&gt;&lt;nowiki&gt;[&lt;/nowiki&gt;File&lt;nowiki&gt;]&lt;/nowiki&gt;&lt;/code&gt; table. You would...&quot;</title>
		<link rel="alternate" type="text/html" href="https://truxwiki.com/index.php?title=Truxton_media_update_child_count&amp;diff=7071&amp;oldid=prev"/>
		<updated>2024-01-28T12:39:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This will analyze the media and update the &amp;lt;code&amp;gt;[NumberOfChildren]&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;&lt;a href=&quot;/File_Table&quot; title=&quot;File Table&quot;&gt;File&lt;/a&gt;&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; table. You would...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This will analyze the media and update the &amp;lt;code&amp;gt;[NumberOfChildren]&amp;lt;/code&amp;gt; column of the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;[[File Table|File]]&amp;lt;nowiki&amp;gt;]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; table.&lt;br /&gt;
You would use this API if you have added files to a media that has finished loading.&lt;br /&gt;
&lt;br /&gt;
=Syntax=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot;&amp;gt;&lt;br /&gt;
int truxton_media_update_child_count( uint64_t media_handle );&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Parameters=&lt;br /&gt;
==&amp;lt;code&amp;gt;media_handle&amp;lt;/code&amp;gt;==&lt;br /&gt;
The handle created by the [[truxton_media_open_id]] or [[truxton_media_create]] call.&lt;br /&gt;
&lt;br /&gt;
=Return value=&lt;br /&gt;
A non-zero value on success, zero on failure.&lt;br /&gt;
&lt;br /&gt;
=Sample=&lt;br /&gt;
&amp;lt;source lang=&amp;quot;C&amp;quot; highlight=&amp;quot;10&amp;quot;&amp;gt;&lt;br /&gt;
void update_if_needed( uint64_t media, uint64_t old_file_count, uint64_t new_file_count )&lt;br /&gt;
{&lt;br /&gt;
   if ( old_file_count &amp;gt;= new_file_count )&lt;br /&gt;
   {&lt;br /&gt;
      return;&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
   printf( &amp;quot;Files were added, updating full paths now...\n&amp;quot; );&lt;br /&gt;
&lt;br /&gt;
   truxton_media_update_child_count( media );&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Sam</name></author>
		
	</entry>
</feed>