[ADC-Ext 1.0.8] New parameters for partial lists
-
- Junior Member
- Posts: 23
- Joined: 26 Nov 2010, 19:36
- Contact:
[ADC-Ext 1.0.8] New parameters for partial lists
Both parameters should only be used with directories that have been marked with the "Incomplete" flag.
"Size" - Shows the recursive size for directories, uses the same format as the Size parameter for files
"Children" - a flag that is used with directories that contain sub-directories. AirDC++ 2.50 uses this flag to determine whether an incomplete directory should have an expand sign (+) in the tree view. Used as "Children=1".
"Size" - Shows the recursive size for directories, uses the same format as the Size parameter for files
"Children" - a flag that is used with directories that contain sub-directories. AirDC++ 2.50 uses this flag to determine whether an incomplete directory should have an expand sign (+) in the tree view. Used as "Children=1".
-
- Junior Member
- Posts: 27
- Joined: 23 Feb 2011, 13:50
Re: New parameters for partial lists
Does the "Size" parameter count duplicate files multiple times or just once?
-
- Junior Member
- Posts: 23
- Joined: 26 Nov 2010, 19:36
- Contact:
Re: New parameters for partial lists
I'd say that it should behave similar to reporting directory sizes for search results (but the spec doesn't say anything about duplicate files). AirDC++ currently includes duplicate files in different real paths in that size but that's not really the optimal case because the duplicates aren't show in the actual file list.
-
- Junior Member
- Posts: 27
- Joined: 23 Feb 2011, 13:50
Re: New parameters for partial lists
If you're talking about the SI perameter to RES, I was under the impression that it is only included for files, not directories. But the spec doesn't even mention that, heh. There's also the SS flag in INF - the spec doesn't say anything about duplicates there, either, but if I remember correctly all clients do count dupes only once in that field.maksis wrote:I'd say that it should behave similar to reporting directory sizes for search results (but the spec doesn't say anything about duplicate files).
Wait, are duplicate files hidden in the file browser?maksis wrote:[..] because the duplicates aren't show in the actual file list.
As for whether or not to include duplicate files in the directory sizes, I'm mostly neutral. If it's only going to be used for displaying purposes, then it probably doesn't even matter that much if different implementations will behave differently in this aspect. In any case, I believe it's a good idea to allow implementations to count duplicates multiple times, since excluding duplicates for each directory may complicate the code somewhat.
-
- Junior Member
- Posts: 23
- Joined: 26 Nov 2010, 19:36
- Contact:
Re: New parameters for partial lists
I understand the specs in a way that the SI should be added for all RES commands. Even ncdc seems to add that parameter for directories already? :p DC++ won't even count TTH duplicates in the total share size but AirDC does that.Ayo wrote: If you're talking about the SI perameter to RES, I was under the impression that it is only included for files, not directories. But the spec doesn't even mention that, heh. There's also the SS flag in INF - the spec doesn't say anything about duplicates there, either, but if I remember correctly all clients do count dupes only once in that field.
I'm talking about duplicates determined by the file/directory name on the same level that are also forbidden in file lists by the spec.Ayo wrote: Wait, are duplicate files hidden in the file browser?
As for whether or not to include duplicate files in the directory sizes, I'm mostly neutral. If it's only going to be used for displaying purposes, then it probably doesn't even matter that much if different implementations will behave differently in this aspect. In any case, I believe it's a good idea to allow implementations to count duplicates multiple times, since excluding duplicates for each directory may complicate the code somewhat.
-
- Site Admin
- Posts: 214
- Joined: 21 Jul 2009, 10:21
Re: New parameters for partial lists
The following is what I intend to push to ADC-Ext with.
=== 'Size' attribute in file list
This extension adds a 'Size' attribute to directories in a file list. The attribute is the size of the directory as indicated in a RES.
Implementations should be conservative when it includes the Size attribute. Only including the attribute in partial file lists can decrease overall network load requirements.
The following change is done to the file list XML schema:
The Size attribute from BASE is referenced in the Directory element:
----
<xs:attribute ref="Size" use="optional" />
----
=== 'Children' attribute in file list
This extension adds a 'Children' attribute to directories in a file list. The attribute indicates whether there are additional sub-directories.
Value '1' indicate that there are children.
This attribute only makes sense in partial file lists.
The following changes are done to the file list XML schema:
A new attribute is defined:
----
<xs:attribute name="Children" type="zeroOne" />
----
The attribute is then referenced in the Directory element:
----
<xs:attribute ref="Children" use="optional" />
----
-
- Junior Member
- Posts: 23
- Joined: 26 Nov 2010, 19:36
- Contact:
Re: New parameters for partial lists
That comment kind of suggests the reader to search the specs for how the size indicated in a RES... but that's not specified anywhere. Feels like an unnecessary comment to me.Pretorian wrote:The attribute is the size of the directory as indicated in a RES.
-
- Junior Member
- Posts: 23
- Joined: 26 Nov 2010, 19:36
- Contact:
Re: New parameters for partial lists
It doesn't even seem to be clear that it should be included for directories (which can be understood as directory search results don't have size in NMDC) :pAyo wrote:If you're talking about the SI perameter to RES, I was under the impression that it is only included for files, not directories. But the spec doesn't even mention that, heh