-
Notifications
You must be signed in to change notification settings - Fork 627
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
Shenanigans with the watched tab #2871
Comments
@El-Virus You are right, its related to having too many items and how this tab, unlike the Favorites one doesn't use caching. Marking this as a bug and for now anyone having an issue can reset their watched database or just disable the whole tab altogether (both of these can be found in the Settings page) |
@El-Virus lol went to find the original PR to message the author for any ideas and just realized.. you are him 😄 |
After all the issue's I had with the "watched" tab and how slow it was populated with the choosen movies/series I gave up on using it. |
Well, using it as a filter for the main movies page is an option. The whole point of the watched tab is that sometimes some of us like to see which movies (or series) we've seen and rewatch them again (or find one in particular we can't remember the name of) |
Indeed 😅
Yeah, in many cases (such as mine) the cache would be too big, so that would hardly be an option. (Though we could consider adding that as a setting)
Doesn't the main movies tab (or, yet again, the series tab) query a whole bunch of movies simultaneously? (I haven't looked at that part of the code, and won't be able to do so today). |
But the thing is.. even as a filter it makes individual API request for every movie. And it would get even weirder since I guess it would basically hide the rest of the items, so you'd see like 1-2 items in your list, then have to scroll down for a couple more to appear etc... The movies/series lists make a single API request per 25-50 items, and get limited info back. Then if you click on something it makes another request specifically for that item only. The issue with 'watched' is.. both of the APIs we use currently have no such 'list' feature where you can drop in 50 random imdb id's all together and get a list back, they only have such calls using their own sorters (year, latest, trending etc..). So your feature relies on making single calls for every item, like the movie/show detail page, to populate its list, which when you do 25-50 at a time.. is too much.. Favorites overcomes this by caching the limited data from the first 'mass'(list) call (for items marked as facorites only) and only doing single calls when you click on something for more, like the movie/series list does.. It would be an easy fix for this also but I'm not really sure how big the cache would get in this scenario.. |
Well, then the only two options are storing them in the cache or implementing a list feature in the server (It would still be backwards compatible given that we are just adding a feature). For the cache option, in my case, I have ~40 movies in my bookmarks, with a cache of 443kb. So, it's about 11kb/movie, let's hypothesize I've watched ~900 movies, and we'll change the average size/movie to 15kb, which would make a cache of 13mb, if in my lifespan I end up watching 10 times that, we'd have a 130mb cache, which, personally, I think is not that huge. (The standard low-cost computer today comes with a 512gb SSD, meaning that the database would take up ~0,0002% of the disk). Implementing the list feature shouldn't be hard (can't assure that, given that I haven't looked at how the server works at all), but it could also be considered. Its worth would depend on how much strain that would cause to the server. Do you see it as a viable option? Anyway, the cache option seems fine. |
Yeah I think the cache option is the more realistic one since what the APIs do isn't always under our control (e.g yts) and even if it were, not many APIs or search features in general offer a feature like this where you can simultaneously list 50 different items based on 50 different query terms.. I guess since that would put a big strain on their systems..? |
My issue was that after adding 100 movies only 8/9 show up in my list adding every refresh a few more and taking a few other off again. |
Well, cache it is then. I think you can do it faster than I, could you handle the matter? |
@El-Virus yep I'll have a look at it (though not today, too much PCT for one day :) |
The watched database is infact the only reason I use PCT, and I love it for having this feature! My only gripe with it has been that I have had to deal with managing and finding things in it by text alone in my GUI. I did try some APIs like Cinemagoer, but they where all horribly slow and I only got close to figuring out how to parse the IMDB-ID to the image URL, so I'm just using a text GUI for now. I have just shy of 4400 entries in watched.db so waiting minutes per title as with Cinemagoer isn't really ideal. I have many times thought about cloning this repo and start going throught the code so that I could add the "Watched" tab myself, but the code base is a little bit too huge for a non-dev like me :P But I know that if I just knew (and understood) the code that creates one of the "Movies" or "Series" tabs, I could create my own "Watched" tab in like 20 seconds, by just copying and pasting the code for one of those tabs and changing a single math operation. At least if you load stuff the way I've always imagined that you do. If 'A' is the set of all movies and 'B' is the set of watched movies, my guess is that you do something like this today (for-loop for illustrative purposes): For movie in 'A', if movie not in 'B': load info. Instead of set difference, you could just use set intersection for loading "Watched" and you're done: For movie in 'A', if movie also in 'B': load info. No need to figure out how to solve anything, because you have already solved it when creating the code for the other tabs. Just copy/paste, change set logic, done! At least if my suspicions are true :) I would really love it if I could view and filter my own database with the app! I would actually not be opposed to having it all stored on my local drive, since that would save me the time of figuring out how to crack the IMDB-ID parsing but I at least thought I'd tell you that there probably exist a few second-solution to this problem. |
Operating System Version:
Windows 10 22H2
Popcorn Time Version:
0.5.0
Download date:
2024/02/10
Download URL:
Github Releases
Description
Using the watched tab only displays a few of the watched items.
Then returning to the Movies tab displays "Remote API failed to respond" even though when opening the app it worked just fine. (Console outputs the error shown in the screenshot)
The other tabs work as expected.
(Note that in my case I've watched hundreds of movies, but just a few series, so that might be related)
Screenshot(s) of issue or error(s) logs of developer console (Windows/Linux: F12, MacOS: ⌘ + 0 ... then 'console' tab)
The text was updated successfully, but these errors were encountered: