I never used the returned ChildCount value so I do not know if it
returned 0..
I already did what you proposed with filtering only what I needed,
its
even better solution because less unused data is returned.
Feel free to file a bug, its no longer issue for me, thanks
On 13.03.2016 11:09, Jens Georg wrote:
> Hi,
>
> ok, can reproduce it now. And on top of being annoying and
> potentially
> very harmful behaviour it even seems broken as it still returns a
> child
> count of 0. Do you want to file an issue for it?
>
> Unfortunately there is no such thing as a filter without child
> count;
> so as a work-around you would need to figure out a subset of all
> the
> things you need for yourself.
>
> > I am using git repo dleyna-linux which automatically selects
> > version
> > 0.5
> > So can I use something generic instead of * .. maybe no
> > filter(empty
> > string)?
> > You have to have some upnp server which does not have the ability
> > to
> > return children count.
> > On the other upnp servers it works correctly..
> >
> > Thanks for answers,
> > Ondrej
> >
> > Dňa 08.03.2016 o 20:46 Jens Georg napísal(a):
> > > Hi,
> > >
> > > ew, that sounds ugly. Apparently you are requesting it
> > > implicitly
> > > to
> > > count the children because you specify "*" as filter if I read
> > > the
> > > code correctly. It then tries to deduce the child count by
> > > browsing
> > > the children.
> > >
> > > I can't currently reproduce this here, which dLeyna version is
> > > this?
> > >
> > > > Hi,
> > > >
> > > > I was investigating my problem further.
> > > >
> > > > We are doing only one call to dleyna dbus function
> > > > ListChildren
> > > > with
> > > > parameters start 0, count 500, filter *
> > > > But when analyzing the communication between dleyna and
> > > > upnp
> > > > server I
> > > > see that dleyna is doing many requests for subdirectories
> > > > requesting 1
> > > > item of each subdirectory.
> > > > My best guess is that dleyna does not see child count info
> > > > in
> > > > response from server and for some reason it asks for
> > > > subdirectory
> > > > of
> > > > every item (of those 500 items). I tried to alter the source
> > > > of
> > > > dleyna-server to set have_child_count to TRUE in order to
> > > > test if
> > > > it
> > > > will request the other subdirectories and it indeed didnt
> > > > requested
> > > > the subdirectories.
> > > >
> > > > IS IT POSSIBLE TO TURN OFF THE FEATURE OF CHECKING CHILDREN
> > > > COUNT?
> > > > I am adding also some sample requests and responses below:
> > > >
> > > > ---------------
> > > >
> > > > This is how the request to the server looks like:
> > > > <u:Browse
> > > > xmlns:u="urn:schemas-upnp-
> > > >
org:service:ContentDirectory:1"><ObjectID>all:*:artist</Objec
> > > > tID>
> > > >
<BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter>*</Filte
> > > > r><S
> > > >
tartingIndex>0</StartingIndex><RequestedCount>501</RequestedC
> > > > ount
> > > > > <SortCriteria></SortCriteria></u:Browse>
> > > >
> > > > These are additional requests (many of them):
> > > > <s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelo
> > > > pe/"
> > > > [2]
> > > >
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > [3]><s:Body><u:Browse
> > > > xmlns:u="urn:schemas-upnp-
> > > >
org:service:ContentDirectory:1"><ObjectID>ALL:*:ARTIST:1</Obj
> > > > ectI
> > > >
D><BrowseFlag>BrowseDirectChildren</BrowseFlag><Filter></Filt
> > > > er><
> > > >
StartingIndex>0</StartingIndex><RequestedCount>1</RequestedCo
> > > > unt>
> > > >
<SortCriteria></SortCriteria></u:Browse></s:Body></s:Envelope
> > > > >
> > > >
> > > >
> > > > This is response from server on first request(containing
> > > > all the
> > > > 500
> > > > items):
> > > > <s:Envelope
xmlns:s="http://schemas.xmlsoap.org/soap/envelo
> > > > pe/"
> > > > [2]
> > > >
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > > > [3]><s:Body>
> > > > <u:BrowseResponse
> > > >
xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
> > > > <Result><?xml version="1.0"?>
> > > > <DIDL-Lite
xmlns:dc="http://purl.org/dc/elements/1.1/"
[4]
> > > > xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
> > > > xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
> > > >
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [5]
> > > > xsi:schemaLocation="urn:schemas-upnp-org:metadata-1-0/DIDL-
> > > > Lite/
> > > >
http://www.upnp.org/schemas/av/didl-lite.xsd [6]
> > > > urn:schemas-upnp-org:metadata-1-0/upnp/
> > > >
http://www.upnp.org/schemas/av/upnp.xsd [7]">
> > > > <container id="all:*:artist:1"
parentID="all:*:artist"
> > > > restricted="true" searchable="false">
> > > > <dc:title>A Tribe Called Quest</dc:title>
> > > >
> > > >
<upnp:class>object.container.person.musicArtist</upnp:class>
> > > > <upnp:artist>A Tribe Called Quest</upnp:artist>
> > > > <upnp:writeStatus>PROTECTED</upnp:writeStatus>
> > > > </container>
> > > > .... and so on ...
> > > > </DIDL-Lite>
> > > > </Result>
> > > > <NumberReturned>500</NumberReturned>
> > > > <TotalMatches>2108</TotalMatches>
> > > > <UpdateID>1452611561</UpdateID>
> > > > </u:BrowseResponse>
> > > > </s:Body> </s:Envelope>
> > > >
> > > > These are additional (500) responses:
> > > > <s:Body>
> > > > <u:BrowseResponse
> > > >
xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
> > > > <Result><?xml version="1.0"?>
> > > > <DIDL-Lite
xmlns:dc="http://purl.org/dc/elements/1.1/"
[4]
> > > > xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"
> > > > xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/"
> > > >
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [5]
> > > > xsi:schemaLocation="urn:schemas-upnp-org:metadata-1-0/DIDL-
> > > > Lite/
> > > >
http://www.upnp.org/schemas/av/didl-lite.xsd [6]
> > > > urn:schemas-upnp-org:metadata-1-0/upnp/
> > > >
http://www.upnp.org/schemas/av/upnp.xsd [7]">
> > > > <container id="all:*:artist:1:1"
parentID="all:*:artist:1"
> > > > restricted="true" searchable="true">
> > > > <dc:title>The Love Movement</dc:title>
> > > >
<upnp:class>object.container.album.musicAlbum</upnp:class>
> > > > </container>
> > > > </DIDL-Lite>
> > > > </Result>
> > > > <NumberReturned>1</NumberReturned>
> > > > <TotalMatches>1</TotalMatches>
> > > > <UpdateID>1452611561</UpdateID>
> > > > </u:BrowseResponse>
> > > > </s:Body>
> > > >
> > > > Dňa 04.03.2016 o 20:01 Jens Georg napísal(a):
> > > >
> > > > > Hi,
> > > > >
> > > > > > I am doing browse request with ListChildren (parameters
> > > > > > just
> > > > > > fromRow
> > > > > > -
> > > > > > toRow) and I see in wireshark that there is BrowseFlag
> > > > > > BrowseDirectChildren (its used in
> > > > > > dls_device_get_children).
> > > > > > I guess this causes the upnp server to go recursively
> > > > > > into
> > > > > > each
> > > > > > child
> > > > > > and gets direct children there?
> > > > > No, BrowseDirectChildren should only get the direct
> > > > > children of
> > > > > the
> > > > > container. If your server is answering differently, than
> > > > > that's
> > > > > a
> > > > > server bug.
> > > > >
> > > > > > Can I somehow turn off the recursive traversal of
> > > > > > subchildrens?
> > > > > See above. That's the server acting weird.
> > > > >
> > > > > _______________________________________________
> > > > > dLeyna mailing list
> > > > > dLeyna(a)lists.01.org
> > > > >
https://lists.01.org/mailman/listinfo/dleyna [1]
> > > >
> > > >
> > > > Links:
> > > > ------
> > > > [1]
https://lists.01.org/mailman/listinfo/dleyna
> > > > [2]
http://schemas.xmlsoap.org/soap/envelope/
> > > > [3]
http://schemas.xmlsoap.org/soap/encoding/
> > > > [4]
http://purl.org/dc/elements/1.1/
> > > > [5]
http://www.w3.org/2001/XMLSchema-instance
> > > > [6]
http://www.upnp.org/schemas/av/didl-lite.xsd
> > > > [7]
http://www.upnp.org/schemas/av/upnp.xsd