Goldenfreddy0703 / Otaku

Repository for Otaku Development
GNU General Public License v3.0
114 stars 22 forks source link

Local scraper does not work correctly, my files are not played #305

Closed jonathanluepfert closed 3 months ago

jonathanluepfert commented 4 months ago

The files on my computer are found by the scraper but they show a wrong file size and do not play correctly. I get the error message "'NoneType' Object is not subscriptable". The Kodi log shows this error message;

Request-Error: ('URLError' object has no attribute 'read') => C:\Users\Jonathan\Anime[HorribleSubs]%20Polar%20Bear%20Cafe%20[1080p]

Goldenfreddy0703 commented 4 months ago

Would you mind sending me the source of the file so i could download and reproduce this and could you tell me the anime?Thanks.

jonathanluepfert commented 4 months ago

Sure, here is the file: https://drive.google.com/file/d/1HOSJHRDUTd7J4yO9YkztRhvJ2fZx_g7L/view?usp=sharing the file path is this: C:\Users\Jonathan\Anime\[HorribleSubs] Polar Bear Cafe [1080p]\[HorribleSubs] Polar Bear Cafe - 01 [1080p].mkv and it's the first episode of the Anime "Polar Bear Cafe".

I'm keineahnungking on Discord, if you need more info about this, you can contact me on there.

joezito129 commented 3 months ago

why is it url encoding the filename?

joezito129 commented 3 months ago

never mind i see what the problem was. the title has "/" and it thinks its another directory

jonathanluepfert commented 3 months ago

No it is in another directory, but GoldenFreddy fixed the scraper to scrape subdirectories

Goldenfreddy0703 commented 3 months ago

Oh @joezito129 sense your back, I made some changes on localfiles.py in the main branch. Check then out and see if you would like to add them to your version

joezito129 commented 3 months ago

because of the way os.path.join works it thought there was another directory because "/" was in the title ([HorribleSubs] Polar Bear Cafe [1080p][HorribleSubs] Polar Bear Cafe - 01 [1080p].mkv

The character needed to be escaped which @Goldenfreddy0703 already fixed by adding f.lstrip('/\') before joining the paths

and yes already fixed it on my version

Goldenfreddy0703 commented 3 months ago

Hey so we just released so hopefully the Local Scraper works correctly. I am going to look into local torrents that don't have the "-" in it. It will probably take time but hopefully we should be able to find a solution. Other then that, everything does seem to be working which is good.

Im going to go ahead and close this issue but if you have any problems or issues relating to this, feel free to reply to this and we will look further or feel free to dm again on discord. Thanks