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
fix for reported problem on some SONY TV's while content browsing / searching #2607
fix for reported problem on some SONY TV's while content browsing / searching #2607
Conversation
Thanks! |
@ik666 can you check my changes if it is working for you? |
"object.container.person.musicArtist"), TYPE_PLAYLIST("PLAYLIST$", | ||
"object.container.playlistContainer"), TYPE_VIDEO("VIDEO$", "object.container.storageFolder"); | ||
TYPE_AUDIO("FID$", "object.item.audioItem"), | ||
TYPE_FOLDER("FOLDER$", "object.container.storageFolder"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not implemented and there is a question if we need it. Folders are not stored in the database.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you're right. In the beginning, I was searching only for "FILES" type. But then the more concrete types were necessary and "FILES" became obsolete. Thanks for figuring out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good point but it presents a problem with the search approach, since it is valid for renderers to search for folders, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is valid to search for "object.container.storageFolder", but the current implementation ignores this upnp:class
yet.
Since the SearchRequestHandler
will not create an URL-Link of type TYPE_FOLDER
, we should not actually have an issue here in this concrete java class (in discovering the DLNAResource which is not implemented).
@valib yes. At this point I think the database and startup scan are essential for UMS to run properly in many ways. That's why those settings are hidden by default. People should not disable them unless there is a bug to avoid, and I am always working hard to fix bugs |
@valib I had a quick check. Your changes are all right. I had no issues. |
The user replied that it didn't work, should I make a new build with these latest changes @valib ? |
@SubJunk I'm not sure if the fix didn't work, or if there are "still errors". To prevent spamming, @valib changed the loglevel to TRACE, so that this error shouldn't pop up in the "general" log any more. Maybe a rebuild is needed for changes to take effect. Since the code calls the pre 10.6 logic in case of any error (RequestV2: around 1112) ,
I'm wondering if the origin of this issue lies within the UPnP search code or not ? Besides that, the users error message shows a search for |
@SubJunk @valib However, even if the search delivers top 14 videos in One solution could be disabling UPnP search support by a configuration entry for specific TV types by delegating the call directly to browseHandler(). I haven't done any TV specific configuration stuff yet ... can one of you give me a hint, or just implement the configuration entry if you'd like to move in this direction? |
I'm not following the logic of the search implementation here, but I don't understand your claim that "UMS doesn't store any images". Images should be "stored" in the database like other media files, but their metadata is stored in a different way. For audio and video, a few selected metadata is stored in the database tables. For images, all metadata is stored in The reason for storing the metadata this way is that there are so many different metadata available for different formats that making a column for all of them would mean that most would be null/blank for most images. If some of these properties are needed for SQL queries, columns could be created for those specific metadata. |
@ik666 it might be some kind of "smart" filtering system for the TV. For example on PS3 it has different entry points for media servers depending on what you want - video, audio or image. In the case of PS3 it just uses browse requests and then ignores the results it doesn't want, but maybe there is a similar user experience on the TV. The fact it requests 14 videos may be because of pagination or some quick-preview feature or something. Maybe when it's working we can ask the user to provide photos of the interface. Anyway it's up to the TV to do what they want with our API, and it's up to us to fulfil the requests that we report to support. I think it's kinda exciting when renderers do unconventional things with DLNA/UPnP :) Maybe we can just try to fulfil the request in a basic way and see where that leads? Maybe the renderer will send a browse request too after we fulfil the search requests. What do you think? |
These are possibly related as well. Not fully confirmed but the timing lines up and I don't think we have done other big changes lately: https://www.universalmediaserver.com/forum/viewtopic.php?f=9&t=14247&p=44366#p44366 Maybe the best thing for now would be to disable the search capability and work on it some more, what do you think @ik666 ? That way I can do a release very soon with that disabled and then we can continue to work on it for a future release |
Unfortunately I need to go away from this computer for a few days or more for a COVID-19 lockdown so I think I will do a release of master while I have time, I was hoping to wait until we had a fix for this but I'll get the release ready now |
@SubJunk has anybody test my last commit? |
@valib no, I wasn't sure if it was ready for testing yet. Do you have the ability to do Windows builds? I won't be able to for at least 4 days unless I figure out building from CI which I have been meaning to do... |
I don't mind to figure out why the resultset has no entries. I'll add some SQL trace code. Nevertheless, I somehow doubt that the TV will make BrowseRequests after the SearchRequest if the resultset is >0 ... we'll see. |
You're right. I made wrong assumptions. I'm uncertain how interesting an image search might be for the end user ... |
I can disable the search, however I doubt it will have any effect on the "massive" or "very large" id issue, since the search implementation uses it's own resource loading (doesn't rely on the PMS object cache). Actually, I had the same experience while doing the search implementation. Even though same files were found, new ID's were generated for the same object, leading to misses in resolving thumbnails. That's the reason, why I implemented a "database-id based resource locator" circumveting this issue. |
Lastet commit disables UPnP search. |
That's bad :( I wish you the best ... |
Thanks, it's ok it's just my government is very responsive - we had one case of infection in New Zealand and the country is in lockdown. It's very cool and keeps us safe. Ok I can include that disabling in the next release (I am in the middle of releasing 10.10.0 now, which I built hours ago) and then hopefully we can get searching back into the program soon |
Co-authored-by: SubJunk <SubJunk@users.noreply.github.com>
…earchErrorFallback
is searching for the files subs not the empty line which force the GUI to hide the Status Line and let the Shared folders to grow.
@valib do you think we should merge this? |
Sorry, I was some days off. I think it looks nice now :) |
Ok cool, I think it's good now but I just want to check with @valib that he is ok with it too |
bugfix/upnpSearch/searchErrorFallback Conflicts: src/main/java/net/pms/util/OpenSubtitle.java
@SubJunk I am still testing it because I have a problem with the test case. For me the test is not working in Eclipse but it pass when I use |
@valib I just tested it and it passed too. Do we need to document that for Eclipse users? |
This is not my business, but I really think it sounds like a bad idea to "document" that it's broken under Eclipse and move on. I don't know exactly what doesn't work under Eclipse, but I find it very likely that this problem can manifest under other circumstances as well and isn't the "fault" of Eclipse. It the problem is the tests, I'd bet it is a threading/concurrency issue. Eclipse runs the tests somewhat differently than Maven, and I've experienced tests that fail only under Eclipse and vice versa. If you tweak the Maven testrunner's thread handling, I'm pretty sure you'll get that to fail too. A much better solution would be to fix the concurrency bug IMO, if this is the situation. |
Now it works in Eclipse. It takes some time but it works for me. |
I'm back from holidays and I'm glad to see you guys having everything under control :) |
* master_UMS: fix for reported problem on some SONY TV's while content browsing / searching (UniversalMediaServer#2607) Bump spotbugs-maven-plugin from 4.4.2.1 to 4.4.2.2 (UniversalMediaServer#2685) Bump oshi-core from 5.8.2 to 5.8.3 (UniversalMediaServer#2686) Fixed uncaught exception when updating DLNAMediaDatabase version (UniversalMediaServer#2684) Fix some bugs (UniversalMediaServer#2682) Fix problem reported in issue UniversalMediaServer#2678 (UniversalMediaServer#2680) Continue to fix the UniversalMediaServer#2553 (UniversalMediaServer#2681) Bump spotbugs-maven-plugin from 4.4.2 to 4.4.2.1 (UniversalMediaServer#2679) Fix the problem reported in UniversalMediaServer#2553 Updated changelog Match more filenames (UniversalMediaServer#2676) Improved stability and logging while fetching JSON (UniversalMediaServer#2672) # Conflicts: # src/main/java/net/pms/network/DbIdResourceLocator.java # src/main/java/net/pms/network/SearchRequestHandler.java # src/test/java/net/pms/dlna/DLNAMediaInfoTest.java # src/test/java/net/pms/network/SearchRequestHandlerTest.java
* master_UMS: (120 commits) fix for reported problem on some SONY TV's while content browsing / searching (UniversalMediaServer#2607) Bump spotbugs-maven-plugin from 4.4.2.1 to 4.4.2.2 (UniversalMediaServer#2685) Bump oshi-core from 5.8.2 to 5.8.3 (UniversalMediaServer#2686) Fixed uncaught exception when updating DLNAMediaDatabase version (UniversalMediaServer#2684) Fix some bugs (UniversalMediaServer#2682) Fix problem reported in issue UniversalMediaServer#2678 (UniversalMediaServer#2680) Continue to fix the UniversalMediaServer#2553 (UniversalMediaServer#2681) Bump spotbugs-maven-plugin from 4.4.2 to 4.4.2.1 (UniversalMediaServer#2679) Fix the problem reported in UniversalMediaServer#2553 Updated changelog Match more filenames (UniversalMediaServer#2676) Improved stability and logging while fetching JSON (UniversalMediaServer#2672) Move API Metadata methods to new APIUtils class (UniversalMediaServer#2674) Bump spotbugs-maven-plugin from 4.4.1 to 4.4.2 (UniversalMediaServer#2675) Use translation for Status line message Show the folder name in the Status Line when the subtitles API (UniversalMediaServer#2673) Checking for non set variables with better syntax (UniversalMediaServer#2659) Replaced '==' with '===' and '!=' with !==' (UniversalMediaServer#2669) Removed unused variable. (UniversalMediaServer#2670) simplify if loop (UniversalMediaServer#2668) ...
* master_UMS: (86 commits) fix for reported problem on some SONY TV's while content browsing / searching (UniversalMediaServer#2607) Bump spotbugs-maven-plugin from 4.4.2.1 to 4.4.2.2 (UniversalMediaServer#2685) Bump oshi-core from 5.8.2 to 5.8.3 (UniversalMediaServer#2686) Fixed uncaught exception when updating DLNAMediaDatabase version (UniversalMediaServer#2684) Fix some bugs (UniversalMediaServer#2682) Fix problem reported in issue UniversalMediaServer#2678 (UniversalMediaServer#2680) Continue to fix the UniversalMediaServer#2553 (UniversalMediaServer#2681) Bump spotbugs-maven-plugin from 4.4.2 to 4.4.2.1 (UniversalMediaServer#2679) Fix the problem reported in UniversalMediaServer#2553 Updated changelog Match more filenames (UniversalMediaServer#2676) Improved stability and logging while fetching JSON (UniversalMediaServer#2672) Move API Metadata methods to new APIUtils class (UniversalMediaServer#2674) Bump spotbugs-maven-plugin from 4.4.1 to 4.4.2 (UniversalMediaServer#2675) Use translation for Status line message Show the folder name in the Status Line when the subtitles API (UniversalMediaServer#2673) Checking for non set variables with better syntax (UniversalMediaServer#2659) Replaced '==' with '===' and '!=' with !==' (UniversalMediaServer#2669) Removed unused variable. (UniversalMediaServer#2670) simplify if loop (UniversalMediaServer#2668) ... # Conflicts: # src/main/java/net/pms/network/DbIdResourceLocator.java # src/main/java/net/pms/network/RequestV2.java # src/main/java/net/pms/network/SearchRequestHandler.java
* feature/master/artistSearchImprovement: fix for reported problem on some SONY TV's while content browsing / searching (UniversalMediaServer#2607) Bump spotbugs-maven-plugin from 4.4.2.1 to 4.4.2.2 (UniversalMediaServer#2685) Bump oshi-core from 5.8.2 to 5.8.3 (UniversalMediaServer#2686) Fixed uncaught exception when updating DLNAMediaDatabase version (UniversalMediaServer#2684) Fix some bugs (UniversalMediaServer#2682) Fix problem reported in issue UniversalMediaServer#2678 (UniversalMediaServer#2680) Continue to fix the UniversalMediaServer#2553 (UniversalMediaServer#2681) Bump spotbugs-maven-plugin from 4.4.2 to 4.4.2.1 (UniversalMediaServer#2679) Fix the problem reported in UniversalMediaServer#2553 Updated changelog Match more filenames (UniversalMediaServer#2676) Improved stability and logging while fetching JSON (UniversalMediaServer#2672) # Conflicts: # src/main/java/net/pms/network/SearchRequestHandler.java # src/test/java/net/pms/dlna/DLNAMediaInfoTest.java # src/test/java/net/pms/network/SearchRequestHandlerTest.java
…earching (#2607) * fix for reported problem on some SONY TV's while content browsing / searching. * Make the search more common * Update * no message * disabled search feature ... * reverted to original call logic. * Send the MusicBrainz TrackID only for audio file. * enabled upnp search requests * Store the MusicBrainzID only for audio files. * Update * Fix comment * added SearchRequestHandlerTest * Fix test * Update * improved search speed a little, by using LIMIT and OFFSET in sql queries * Fix NPE * SQL fix * Update * Fixed reading musicbrainz id's while scanning the file system. * insert NULL values instead of an empty UUID string, if no musicbrainz id are present in the audio file * Change the MBID columns from default value UUID to VARCHAR to avoid to spam the database with 00000000-0000-0000-0000-000000000000 values * Return back the UUID, fix some Javadoc description * Update src/main/java/net/pms/network/SearchRequestHandler.java Co-authored-by: SubJunk <SubJunk@users.noreply.github.com> * Update src/test/java/net/pms/dlna/DLNAMediaInfoTest.java Co-authored-by: SubJunk <SubJunk@users.noreply.github.com> * Update src/main/java/net/pms/dlna/LibMediaInfoParser.java Co-authored-by: SubJunk <SubJunk@users.noreply.github.com> * Update src/test/java/net/pms/dlna/DLNAMediaInfoTest.java Co-authored-by: SubJunk <SubJunk@users.noreply.github.com> * Show the folder name in the Status Line when the subtitles API is searching for the files subs not the empty line which force the GUI to hide the Status Line and let the Shared folders to grow. * Do not test the network speed in the SearchRequestHandlerTest Co-authored-by: sf666 <satfreak666@gmx.de> Co-authored-by: valib <liborvala@seznam.cz> Co-authored-by: SubJunk <SubJunk@users.noreply.github.com> (cherry picked from commit 54a0935)
This might solve the issue reported in: #2376. I hope the TV doesn't make consecutive search requests.
https://www.universalmediaserver.com/forum/viewtopic.php?f=9&t=14807&p=44349#p44349