ssnjr2002 / stremio-gdrive

Stremio addon for fetching videos from your google drive.
98 stars 93 forks source link

Some files not showing up in results #16

Closed AlyafeiAli closed 2 years ago

AlyafeiAli commented 2 years ago

Hi, ssnjr2002,

Once again, thank you so much for the amazing addon; it's a dream come true.

While browsing Iron Man 3 (2013), I noticed that some REMUX-1080p files are not showing up in results, only one of them showed up for some reason. (More REMUX-2160p files showed up, however.)

a) REMUX-1080p File that did show up: 1- Iron Man 3 (2013) 1080p Bluray REMUX x264 AVC [Hindi DDP5.1 ~ 640Kbps + English DTS-HDMA 7.1] Esub ~ FraMESToR.mkv

b) REMUX-1080p Files that did not show up: 1- Iron.Man.3.2013.BluRay.1080p.DTS-HD.MA.7.1.AVC.REMUX-FraMeSToR.mkv 2- Iron.Man.3.2013.CEE.REPACK.BluRay.Remux.1080p.AVC.DTS-HD.MA.7.1-HiFi.mkv 3- iron.man.3.2013.1080p.bluray.REMUX.dts-hd.ma.7.1-publichd (Hi10p reencode).mkv

c) REMUX-2160p files that did show up: 1- Iron Man 3 (2013) 2160p 4K UHD HDR10 Bluray REMUX x265 HEVC [Hindi DDP5.1 ~ 640Kbps + English DTS-HDMA 7.1] Esub ~ FGT2.mkv 2- Iron.Man.3.2013.UHD.2160p.BluRay.DTS-HDMA.7.1.HEVC.REMUX-FraMeSToR.mkv 3- Iron Man 3 2013 Remux-2160p.mkv

d) REMUX-2160p files that did not show up: 1- Iron.Man.3.2013.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.7.1-FGT.mkv 2- Iron.Man.3.2013.UHD.BluRay.2160p.TrueHD.Atmos.7.1.HEVC.REMUX-FraMeSToR.mkv 3- Iron.Man.3.2013.UHD.BluRay.2160p.DTS-HD.MA.7.1.HEVC.REMUX-FraMeSToR-4P.mkv 4- Iron.Man.3.2013.2160p.US.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT.mkv 5- Iron.Man.3.2013.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.7.1-FGT.mkv

c2, d2, and d3 are the same file, but only c2 showed up... The only difference I can see is that c2 has the resolution in its name before the type, while the other two have the type after "UHD" and before "2160p".

Of course, it is not a big deal, but I just wanted to let you know of the issue... Maybe you could find a solution 👍

P.S.: They've finally updated the Android app, it can now stream without a proxy :)

ssnjr2002 commented 2 years ago

So after some playing around with search queries I think I found the issue. I started by taking a video file and making 11 copies of it in my google drive. Then I named them with the exact same file names you provided above. So a total of 11 files (d1 and d5 are same so its not 12 files). I then used the search query the addon currently uses and only 3 results showed up:

  1. Iron Man 3 2013 Remux-2160p.mkv
  2. Iron Man 3 (2013) 2160p 4K UHD HDR10 Bluray REMUX x265 HEVC [Hindi DDP5.1 ~ 640Kbps + English DTS-HDMA 7.1] Esub ~ FGT2.mkv
  3. Iron Man 3 (2013) 1080p Bluray REMUX x264 AVC [Hindi DDP5.1 ~ 640Kbps + English DTS-HDMA 7.1] Esub ~ FraMESToR.mkv

So apart from c2 (Iron.Man.3.2013.UHD.2160p.BluRay.DTS-HDMA.7.1.HEVC.REMUX-FraMeSToR.mkv) our results line up. If we forget about c2 and look at the other 3 results we can see a pattern. The words in their filenames are separated using whitespaces instead of periods. Usually this isnt a problem but since 3 and 2013 in Iron.Man.3.2013 are close to each other google drive api might have some trouble telling it apart. It might be viewing it as 3.2013 instead of 3, ., and 2013 separately. So in order to confirm this theory I went ahead and used a search query which checks for Iron Man 3.2013 and Iron Man 3 2013. And now all 11 files show up when I search for it.

As for c2, d2, and d3 being the same and only c2 showing up, it is because the addon removes duplicates by checking the md5 hashes of files. So d2 and d3 are probably filtered out.

I have no idea why c2 showed up for you and didnt for me. So there is a chance that there is more to this than what I just said. But for now I will soon be pushing a commit to implement a fix based on my theory above.

Thank you for giving me 11 examples of filenames to work off of. I had spotted sometime ago how certain files were missing from the search results but I was never able to pinpoint the issue. With your examples it was possible to do so.

P.S.: They've finally updated the Android app, it can now stream without a proxy :)

Lol about time....

AlyafeiAli commented 2 years ago

I like your problem solving methodology, well done!

I pushed the new fix to my herokuapp and reinstalled the stremio addon, but now it only shows results for tv shows only and doesn't return anything for movies lol... Looks like something's broken :p

ssnjr2002 commented 2 years ago

Yeah I messed up something :sweat_smile:. I will ping you when I think its ready for you to test.

ssnjr2002 commented 2 years ago

The new update is ready to test @theghost970 . Tell me if it is improved or if things are broken lol

AlyafeiAli commented 2 years ago

Well done, @ssnjr2002 !

All files are showing up now, I even got one in Russian lol "Железный человек.3.2013.UHD.BluRay.Remux.2160p.mkv" (and it's the correct movie lol)

Thank you so much, you've done a great job 💯

Btw, 1- Is it not possible to pass the movie's name to external players? (Like the way it's possible with a proxy) 2- Is it possible to exclude certain resolutions or types? 3- Is it possible to limit number of results for each resolution/type? Ex. 10 results for 2160p, 10 results for 1080p, etc...

I'm only wondering and suggesting... Forget the suggestions if they're hard to implement 👀

ssnjr2002 commented 2 years ago
  1. Thats not possible without a proxy.
  2. & 3. It could certainly be possible. Although I have to implement a system in place to create and modify configs. So I have added it to my todo list but it might take a while.

    All files are showing up now, I even got one in Russian lol "Железный человек.3.2013.UHD.BluRay.Remux.2160p.mkv" (and it's the correct movie lol)

Lol I made an imdb scraper to scrape all the known names of a movie or show. So now files with non english names will also appear in results. Might also help with fetching anime.

AlyafeiAli commented 2 years ago

Lol I made an imdb scraper to scrape all the known names of a movie or show. So now files with non english names will also appear in results. Might also help with fetching anime.

That's a great idea 💯 I'll close the issues since it has been resolved. Thank you 😊