Scanning not working
david-steg opened this issue · 9 comments
Hello, i just installed Choclate in a docker Container.
Everything works, but the Library Scan seems not to work.
By pressing the Button "Rescan all libraries" i receive these logs:
/mnt/video/test\Annihilation.mkv: No such file or directory
[2023-04-16 17:23:47,341] ERROR in app: Exception on /rescanAll [GET]
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 2525, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1822, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.10/site-packages/flask_cors/extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1820, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/usr/local/lib/python3.10/site-packages/flask_login/utils.py", line 290, in decorated_view
return current_app.ensure_sync(func)(*args, **kwargs)
File "/chocolate/app.py", line 2840, in rescanAll
getMovies(lib["libName"])
File "/chocolate/app.py", line 693, in getMovies
length = length_video(video_path)
File "/chocolate/app.py", line 1438, in length_video
return float(seconds.stdout)
ValueError: could not convert string to float: ''
is there an bug with the Path? it seems to have an "" instead of an "/".
Thanks
Ok, I know why there's this error, you can fix that by simply adding a try, but for the next update it will be solved.
If you want to patch that, at the line 693 you can write that :
try:
length = length_video(video_path)
length = str(datetime.timedelta(seconds=length))
length = length.split(":")
except Exception as e:
length = []
although it seems to not find the file, I will try on wsl
ok I see the problem, it's due to the usage of \ and /. I have to force the usage of /. I'm gonna patch that
perfect, thank you!
I tried on my windows computer, it works, same for my rpi. It seems good
Hi, the bug just been patched, but I have a question, how did you maked your docker container ? with the dockerfile or the docker-compose ? Cause I never find a way to get my docker working, also, I have to publish a new docker version. If you want to contribute to that it would be with pleasure, but no problems if you can't. Thanks again
Hi, Thank you for the Patch!
My container is running under Portainer. I had no issue with the Installation :). I will try to update the container with the v6.0.
Ok thanks