All selected subtitles are now downloaded, instead of only one.
Change 'get_first_sel' function to return ALL selected subtitles
instead of only one, and refactored name to 'get_all_sel'.
Change 'download_subtitles' function to iterate over 'get_all_sel'
returned table instead of downloading the only subtitle from old
'get_first_sel'.
Signed-off-by: Hugo Beauzée-Luyssen <hugo@beauzee.fr>
This reverts commit 64b59282a6.
This was working by accident, the language was interpreted as
user-agent and was accepted, only when english was used.
(cherry picked from commit 779b95f68d)
Signed-off-by: Pierre Ynard <linkfanel@yahoo.fr>
When VLSub asks for the cache directory and it doesn't exist an error is
thrown. This patch makes sure that the directory is created before it is
accessed for writing.
Fixes#21595
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
Most of the info we used to extract isn't required anymore
This is now using path instead of URI, this way we will use a path when
calling path2uri back when loading the subtitle, which fixes the
convertion, and fixes loading subtitles on windows.
Fix#20114
Simply use userdatadir and don't allow the directory to be edited. Do
not store it in vlc config file, don't fallback to VLC install
directory.
Additionaly, stop using os.execute
The VLSub user agent was still at 0.9, which would be confusing as the
Window title indicates the this string, showing VLSub 0.9 even though
this is VLSub 0.10.0.
Taking advantage of stream extractors allows us not to care about
downloading the archive itself. The option of dumping the subtitle to
the disk is still present, but not mandatory anymore