Closed gavinstevenson closed 1 month ago
Thanks for feedback and the suggestion. From a UI perspective I can imagine to go for a 2nd press of the gerne toolbar icon to toggle between genre and tag view. Similar functions are implemented for the movies toolbar icon which toggles through all > unwatched > watched movies. But sadly this cannot be implemented straight forward as this is not in line with how the app logic is organized. It would be easy to add "tag" when synchronizing movies (increasing also the sync time) and allow searching for "tag" in Global Search. This is only a few lines of code. Alternatively I can imagine to create a new submenu, like for genres, selectable after entering "...". But this more complicated as the API does have a "GetTags" method and the whole processing must be implemented only for this very functionality.
Awesome, appreciate the quick response. A few thoughts about what you've written:
Implementing a Tags view as a 2nd press of the Genre toolbar icon is interesting. I actually did not know it was possible to press those toolbar icons multiple times to change what's displayed! If the app logic wouldn't easily allow for this, I think that should guide our efforts elsewhere in the code. Plus, I think discoverability would suffer. It's not immediately obvious to the user that they have the option to press those toolbars multiple times to change views, and while once someone figures it out, they'll know, I imagine most users won't figure that out. I also suspect that a user who taps the Genres view might be surprised to suddenly see that switch to Tags. Feels like we'll want to keep the Principle of Least Surprise in mind.
This sounds like an excellent idea, especially if it's only a few lines of code. Having a list of them like what's included in the Genre view would be ideal for discoverability since you may not know what tag to search for in the first place (they can be as specific/precise as the users of IMDB and TMDB make them), but making them globally searchable is a great first step forward and one worth doing, in my opinion.
This sounds like the ideal solution, but I can understand the reluctance around the processing/building the data structures necessary to keep track of the tag data as a library is scraped. As a long-time embedded firmware/software engineer, I'm far less familiar with iOS development and this specific code base but would it be possible, as part of the sync process, to pass each JSON result to a function that looks only at the tag values and movie names and use those to construct a directed acyclic word graph (see below for links) that is then searchable for the Tags view?
Useful links: https://jbp.dev/blog/dawg-basics.html https://stackoverflow.com/questions/19254696/best-way-to-construct-a-directed-acyclic-word-graph-dawg https://en.wikipedia.org/wiki/Deterministic_acyclic_finite_state_automaton https://github.com/vtortola/dawg
Oh whoa! Hold on - I'm just seeing your updates on VideoLibrary.GetTags
!
Yes! This is exactly it! That would be so useful to have!
Yes, was also surprised to see this already being available. I can add this to the menu structure under the "...". Still quite some work to do it right, but straight forward. I will put this in my backlog. There are some other changes which want to get mainlines first, especially as they also change the menu code.
I am a bit worried about the index overlap with the indicator. Index is for sure needed, I already 500+ tags for about 40 movies in my test database. The index layout always has been a bit tricky, let's see.
Understood. If there's anything I can do to support/accelerate, let me know. I don't think I have the proper development environment for iOS (I have Debian 12 workstation, a RHEL 9.x server, and an iPad) but if there's some way I can be useful, I'd be happy to help.
When you say you're "a bit worried about the index overlap with the indicator", could you share more about that? (I don't know what those terms mean in this context.)
I can attest to the fact that it's normal to see that many tags. In practice, they don't scale linearly with the size of a library (i.e., the more movies you have, the tag count starts to slow dramatically given how many overlap), but it's not uncommon to see 1200-1500 for medium to large libraries.
For those who curate their libraries, I'll often remove tags I think are superfluous/too niche using the media managers I use to wrangle my library.
The index is the blue vertical set of characters that be used to quickly navigation to the sections which are grouped first character of the tag, e.g. "1" for "1930s", "1940s" and such. The indicator is the right arrow at the right end of each row which indicates there's a next level of information when clicking on the row.
Thanks for your explanation on non-linear growth which makes perfect sense. The more movies you have, the more often they use same tags and group up under them.
And thanks form offering support. I might post questions here, if they arise. In best case I will ask you for testing a TestFlight build when it was made available. Expect this to take some weeks from here, due to other work going first and due to real life.😉
Ah, I see, ok thanks for the context on "index" and "indicator." Makes perfect sense now.
Regarding the timing, I definitely understand. This is a side project for all of us and I can easily imagine there are higher priority tasks that may already be in the pipeline (plus, just general life). Happy to sit tight, continue monitoring, and remain patient!
First off, great app. Of all the iOS-compatible Kodi remotes, I think this one is the best.
Feature Request
Jumping right into the feature request, would you be open to adding a "Tag" view to the app?
In the "Movies" main menu item, there are several icons on the bottom right that change the right panel's view when pressed. These are "Movies", "Genres", "Movie Sets" and "Recently Added" followed by a "..." for all other views.
While the "Genres" view is useful when the user just wants to watch any action or comedy movie, it lacks granularity. What if the user wants to watch a mafia movie? A WWII movie? A movie about the sea? Genres aren't this specific, but the tags on IMDB and TMDB can get extremely precise and when they're scraped into a user's library, they offer an extremely useful way to quickly find the perfect film for movie night.
Implementation Details
As I understand it, the way the app currently gets library info from Kodi is by issuing the following JSON query:
[root@basementhtp ~]$ curl --data-binary '{"jsonrpc":"2.0","method":"VideoLibrary.GetMovieDetails","params":{"movieid":3,"properties":["year","playcount","rating","thumbnail","genre","runtime","studio","director","plot","mpaa","votes","cast","file","fanart","resume","trailer","dateadded","tagline","art"]},"id":2}' -H 'content-type: application/json;' http://basementhtpc:8080/jsonrpc | python3 -m json.tool
If "tag" was added as an additional property to the above query list, Kodi will dutifully supply all the tags associated with the relevant movieid.
But then where should we expose those tags in the UI of the App? I can see two natural locations: the first would be on each movie's info pane. Right under the "genres" section would work, but since tags are often more numerous/plentiful than genres (it's not uncommon for movies to have 3-6 tags while only 1-2 genres), I could also understand wanting to put them closer to the bottom, right after the rating for design/layout reasons. Please see here for a screenshot.
But knowing what specific tags a movie has is only half the battle. How do we help a user quickly scroll through all the tags in their library in much the same way they can scroll through all the genres in their library?
A Tag view, implemented in exactly the same way we have a Genre view, would be very useful. Please see here for a screenshot.
Useful Resources
In the spirit of trying to be as helpful as possible, here are some additional links/resources that you might find useful:
Here's a properly formatted/compliant .NFO of the same movie from TMDB containing "tag" tags (they're enumerated near the top, right under the "genre" tags):
Here's what a successful result looks like when querying Kodi via the JSON API for the above .NFO. Note the tags returned as a set of strings in the middle of the excerpt below: