Hi,
thanks for this lifesaving component.
I've got a question/suggestion/not sure what this is.
I've been using foo_upnp with foobar as a server on one end and browser/controller on the other. Everything worked flawlessly.
Recently I started using it from PlugPlayer on my iPhone and found out that there is one thing that breaks everything - PlugPlayer's different approach to searching on a server.
I tracked the differences in a log (thanks bubbleguuum again for having thought of the log ;)
So, let's say I want to find something that has 'XYZ' somewhere in metadata.
Searching from foobar2000 instance I get this log
foo_upnp: 2123.089: FbMediaServer::ProcessHttpRequest(306)/49: INFO: received LAN request: http://localhost:56923/ContentDirectory/4a7ed320-8443-e282-c5ad-a770ff95e93d/control.xml (User-Agent: Platinum/0.5.4.0, DLNADOC/1.50 / foobar2000)
foo_upnp: 2123.089: FbMediaServer::OnAction(243)/49: INFO: received action 'Search', args = { ContainerID=0, SearchCriteria=XYZ, Filter=*, StartingIndex=0, RequestedCount=200, SortCriteria= }
foo_upnp: 2123.090: PLT_MediaServer::OnSearch(462)/49: INFO: Received Search from 127.0.0.1 for id = 0 with search = XYZ, start = 0, count = 200
foo_upnp: 2123.271: upnp_server_conf::get_profile(714)/49: INFO: using profile 'foobar2000', matching header (User-Agent:Platinum/0.5.4.0, DLNADOC/1.50 / foobar2000)
foo_upnp: 2123.278: FbMediaServer::OnAction(260)/49: INFO: action 'Search' response: args = { ContainerID=0, SearchCriteria=XYZ, Filter=*, StartingIndex=0, RequestedCount=200, SortCriteria=, NumberReturned=2, TotalMatches=2, UpdateID=0 }
foo_upnp: 2123.328: FbMediaServer::ProcessHttpRequest(306)/64: INFO: received LAN request: http://127.0.0.1:56923/albumart/e20c55ad7b172a0bb66c0b1fb9d2a5c1 (User-Agent: Platinum/0.5.4.0, DLNADOC/1.50 / foobar2000)
foo_upnp: 2123.328: PLT_HttpHelper::ToLog(410)/64: INFO:
and from iPhone/PlugPlayer I've got this
foo_upnp: 2185.691: FbMediaServer::ProcessHttpRequest(306)/59: INFO: received LAN request: http://127.0.0.1:56923/ContentDirectory/4a7ed320-8443-e282-c5ad-a770ff95e93d/control.xml (User-Agent: PlugPlayer iPhone/10.4.0, UPnP/1.0, Portable SDK for UPnP devices/1.6.6)
foo_upnp: 2185.692: FbMediaServer::OnAction(243)/59: INFO: received action 'Search', args = { ContainerID=0, SearchCriteria=(upnp:class = "object.container.album.musicAlbum" and dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria= }
foo_upnp: 2185.692: PLT_MediaServer::OnSearch(462)/59: INFO: Received Search from 192.168.123.116 for id = 0 with search = (upnp:class = "object.container.album.musicAlbum" and dc:title contains "XYZ"), start = 0, count = 10
foo_upnp: 2185.706: FbMediaServer::OnAction(260)/59: INFO: action 'Search' response: args = { ContainerID=0, SearchCriteria=(upnp:class = "object.container.album.musicAlbum" and dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria=, NumberReturned=0, TotalMatches=0, UpdateID=0 }
foo_upnp: 2185.736: FbMediaServer::ProcessHttpRequest(306)/58: INFO: received LAN request: http://127.0.0.1:56923/ContentDirectory/4a7ed320-8443-e282-c5ad-a770ff95e93d/control.xml (User-Agent: PlugPlayer iPhone/10.4.0, UPnP/1.0, Portable SDK for UPnP devices/1.6.6)
foo_upnp: 2185.737: FbMediaServer::OnAction(243)/58: INFO: received action 'Search', args = { ContainerID=0, SearchCriteria=(upnp:class = "object.container.person.musicArtist" and dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria= }
foo_upnp: 2185.738: PLT_MediaServer::OnSearch(462)/58: INFO: Received Search from 192.168.123.116 for id = 0 with search = (upnp:class = "object.container.person.musicArtist" and dc:title contains "XYZ"), start = 0, count = 10
foo_upnp: 2185.739: FbMediaServer::OnAction(260)/58: INFO: action 'Search' response: args = { ContainerID=0, SearchCriteria=(upnp:class = "object.container.person.musicArtist" and dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria=, NumberReturned=0, TotalMatches=0, UpdateID=0 }
foo_upnp: 2185.770: FbMediaServer::ProcessHttpRequest(306)/46: INFO: received LAN request: http://127.0.0.1:56923/ContentDirectory/4a7ed320-8443-e282-c5ad-a770ff95e93d/control.xml (User-Agent: PlugPlayer iPhone/10.4.0, UPnP/1.0, Portable SDK for UPnP devices/1.6.6)
foo_upnp: 2185.771: FbMediaServer::OnAction(243)/46: INFO: received action 'Search', args = { ContainerID=0, SearchCriteria=(dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria= }
foo_upnp: 2185.771: PLT_MediaServer::OnSearch(462)/46: INFO: Received Search from 192.168.123.116 for id = 0 with search = (dc:title contains "XYZ"), start = 0, count = 10
foo_upnp: 2185.772: FbMediaServer::OnAction(260)/46: INFO: action 'Search' response: args = { ContainerID=0, SearchCriteria=(dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria=, NumberReturned=0, TotalMatches=0, UpdateID=0 }
so the difference in search request is, as I can guess, in the following:
args = { ContainerID=0, SearchCriteria=XYZ, Filter=*, StartingIndex=0, RequestedCount=200, SortCriteria= }
args = { ContainerID=0, SearchCriteria=(dc:title contains "XYZ"), Filter=*, StartingIndex=0, RequestedCount=10, SortCriteria= }
PlugPlayer adds dc:title to its search requests. And search results are empty for PlugPlayer and there are two results for foobar2000/foo_upnp native search.
So the question is - is that (dc:title) by some standard?
What would you recommend to do to resolve this issue and make media library perfectly searchable from PlugPlayer?
I could suggest a feature for foo_upnp to alter search requests (SearchCriteria) by regexps.
Yes, it's a hack, but who know what will come next from some other media browser.
So in this case we could have two input fields somewhere in foo_upnp settings - "SearchCriteria to match" and "replacement string"
so that "(dc:title contains "XYZ")" turned to be just "XYZ".
And thanks again for developing such a great component.