Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does not work with Humax FVP as box only returns first few results (possibly issue with Net::UPnP) #1

Open
northernb39 opened this issue Jun 12, 2022 · 0 comments

Comments

@northernb39
Copy link

Humax FVP box does not return the a full list in one pass. It only appears to return upto 20 results. I did some digging and found that:

curl http://192.168.1.3:50001/ContentDirectory/control -d '
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
	<s:Body>
		<u:Browse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1">
			<StartingIndex>0</StartingIndex>
			<ObjectID>1551779507@0\1\pvr</ObjectID>
			<RequestedCount>0</RequestedCount>
			<SortCriteria />
			<Filter>*</Filter>
			<BrowseFlag>BrowseDirectChildren</BrowseFlag>
		</u:Browse>
	</s:Body>
</s:Envelope>
' --header 'SOAPACTION: "urn:schemas-upnp-org:service:ContentDirectory:1#Browse"' --header 'Content-Type: text/xml; charset="utf-8"' --header "Accept:" --header "User-Agent:" --http1.0

returns

<?xml version="1.0" encoding="utf-8"?>
<s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><Result>&lt;DIDL-Lite xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:upnp=&quot;urn:schemas-upnp-org:metadata-1-0/upnp/&quot; xmlns=&quot;urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/&quot; xmlns:dlna=&quot;urn:schemas-dlna-org:metadata-1-0/&quot;&gt;
&lt;item id=&quot;1551779507@0\1\pvr\pcontent_675&quot; parentID=&quot;1551779507@0\1\pvr&quot; restricted=&quot;1&quot;&gt;
&lt;dc:title&gt;Click_20220612_1229&lt;/dc:title&gt;
&lt;upnp:class&gt;object.item.videoItem.movie&lt;/upnp:class&gt;
&lt;dc:creator&gt;HUMAX&lt;/dc:creator&gt;
&lt;x_channel_additional_info&gt;rec_duration=1794,episode_number=-1,season_number=-1,channel_number=231,channel_name=BBC NEWS,video_type=SD,rec_starttime=2022-06-12T12:30:00&lt;/x_channel_additional_info&gt;
&lt;upnp:channelName&gt;BBC NEWS&lt;/upnp:channelName&gt;
&lt;upnp:scheduledStartTime&gt;2022-06-12T12:30:00&lt;/upnp:scheduledStartTime&gt;
&lt;upnp:scheduledEndTime&gt;2022-06-12T12:59:54&lt;/upnp:scheduledEndTime&gt;
&lt;res protocolInfo=&quot;http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01100000000000000000000000000000&quot; duration=&quot;00:29:54&quot; size=&quot;655650816&quot; dlna:resumeUpload=&quot;0&quot;&gt;http://192.168.1.3:9000/web/pvr/HCONTENT:675.ts&lt;/res&gt;
&lt;res protocolInfo=&quot;http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=01;DLNA.ORG_CI=1;DLNA.ORG_FLAGS=00900000000000000000000000000000&quot; dlna:resumeUpload=&quot;0&quot;&gt;http://192.168.1.3:9000/web/L21udC9oZDIvLmNhY2hlLy1SZWNvcmRpbmdzLUNsaWNrLTIwMjIwNjEyLTEyMjlfaGptLTEwLmpwZw==&lt;/res&gt;
&lt;/item&gt;
	...
	<snip of 19 other items>
	...
&lt;/DIDL-Lite&gt;</Result>
<NumberReturned>20</NumberReturned>
<TotalMatches>385</TotalMatches>
<UpdateID>0</UpdateID>
</u:BrowseResponse>
   </s:Body>
</s:Envelope>

In the example above the box only returns 20 results, sometimes less but i've not seen more. However it says there are 385 total matches.

I have found it is possible to get further results by setting the tag <StartingIndex> to a number other than zero in the POST. e.g <StartingIndex>20</StartingIndex>

I suspect it could be an issue with Net::UPnP rather than with your code however I don't know perl and I can't work out how to log an issue with Net::UPnP on cpan.

For reference:

  • VLC only sees a few as well (I don't think I've seen more than 20 i.e. 1 pass)
  • Kodi, from memory, returns all results (takes a while to populate)
  • Windoze 10 returns all results (takes a while to populate)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant