Commit Graph

82 Commits

Author SHA1 Message Date
Vitiko 5efc838749 Avoid FileNotFoundError indexing subtitles 2023-10-19 22:27:42 -04:00
Vitiko b17a2a5f4a Add debugging changes 2023-06-23 13:21:04 -04:00
Vitiko 2b0e435f6a Update language equals mechanism
This commit will avoid the core requesting languages that are not
supported by providers.
2023-06-13 22:35:43 -04:00
Vitiko f1cbfd4be5 no log: add debug call to lang-equals 2023-05-30 19:25:37 -04:00
Vitiko 4725496313 Language-equals: add compatibility for more providers
Some providers directly uses language codes within their query
implementations. This 'translator' method will take care of that.
2023-05-28 22:06:43 -04:00
Vitiko 77531090b2 no log: reduce debug call verbosity 2023-05-28 21:05:21 -04:00
morpheus65535 43a6630527 Merge remote-tracking branch 'origin/development' into development 2023-05-28 09:16:37 -04:00
morpheus65535 d90d1cbfcc Fixed external subtitles indexation with accented characters that resulted in download in loop. #1961 2023-05-28 09:16:29 -04:00
Vitiko 547f8c428d
Added feature to treat couples of languages as equal when searching for subtitles
* Add 'Language-equals' support

This feature will treat couples of languages as equal for list-subtitles
operations. It's optional; its methods won't do anything if an empy list
is set. See more info at docstrings from 'subliminal_patch.core'.

For example, let's say I only want to have "Spanish (es.srt)" subtitles
and I don't care about the differences between Spain and LATAM spanish.
This feature will allow me to always get European Spanish even from
LATAM Spanish providers like Argenteam and Subdivx.

Example for config.ini:

language_equals = ['spa-MX:spa']

(Which means all Latam Spanish subtitles from every provider will be
converted to European Spanish)

* Add PT and ZH language tests

* Add HI and Forced parsing for language pairs

Format example: ["en@HI:en", "es-MX@forced:es-MX"]

* Update languages.py

* Update API definition to reflect the previous change

* Add language equals table to the UI (test only)

* Add global language selector and get language from code3 utilities

* Add unit tests for language equal feature

* Add encode function to language equal feature

* Add CRUD methods to the language equals panel

* Add equals description

* Add parsing support for alpha3 custom languages

* no log: add more tests

* Add forced and hi support to the language equal target

---------

Co-authored-by: morpheus65535 <louis_vezina@hotmail.com>
Co-authored-by: LASER-Yi <liangyi0007@gmail.com>
2023-05-27 09:38:55 -04:00
morpheus65535 9bd2ab514e Fixed HI subtitles wrongly ignored when normal or HI is selected in languages profile. 2023-03-19 20:59:44 -04:00
morpheus65535 e4bf041ecb Fixed subtitles file naming when using hearing-impaired removal mods. 2023-03-01 16:04:27 -05:00
Vitiko 708fbfcd8e Add support for configurable scores (movies and episodes)
Currently only configurable via manual `data/config/config.ini`
text edition.

New configurable values are `series_scores` and `movie_scores`.

For each config section, the sum of the config values (except hash)
must be equal to the hash value plus one (1), otherwise default
values will be used (notified via debug log).

Hash values are not meant to be modified; the value is shown in
`config.ini` for reference. Modifying hash values would imply
breaking Bazarr's score logic.
2022-11-05 01:07:06 -04:00
Vitiko 571ffbccf8 Fix provider pool updates 2022-10-03 20:44:31 -04:00
vitiko98 09d1eb78c9 Avoid error trying to scan some videos
This removes unused code from subliminal_patch's core. Thanks to
refining, we don't need extra magic to guess from filenames anymore.
2022-08-29 20:50:50 -04:00
vitiko98 a748903dc4 Fix provider configs updates 2022-07-02 22:52:14 -04:00
vitiko98 696becbeb1 Try to avoid guessit internal exception (#1858)
I was unable to reproduce the exception, but I found a strange pattern:
whenever the hints["expected_title"] value had the same value as the
title found in the filename, there was a list from the rebulk module
constantly growing. Once I remove the expected_title "hint", this
behavior is gone.

This change is transparent. If for some reason guessit returns a
different movie/series title, Bazarr will refine it with the database
anyway.
2022-06-19 18:52:52 -04:00
Vitiko 9c2737c963 no log: type (no behavior changes at all) 2022-05-13 02:03:23 -04:00
Vitiko 4edc2b756b no log: small subliminal_patch's core refactor
Try to make some methods more readable
2022-05-13 01:57:41 -04:00
Vitiko 23a5ab9b0e Improve provider configs updates 2022-05-13 01:10:10 -04:00
Vitiko a783515ad4 Avoid NoneType on providers pool updates 2022-05-05 14:16:30 -04:00
morpheus65535 b7e908645e Fixed issue with indexing of external subtitles that include utf8 characters in file name. 2022-05-04 15:47:05 -04:00
Vitiko 86d6c211af Fix ValueError for persistent pools on multithreaded setups 2022-03-31 23:11:32 -04:00
Vitiko 8c4e83c18d Fix subliminal core: wrong providers being restarted 2022-03-19 02:02:05 -04:00
morpheus65535 58a967c892 Added settings to change the hearing-impaired subtitles file extension to use when saving to disk. 2022-01-08 14:26:40 -05:00
Vitiko 1261e91870 Add MustGetBlacklisted exception for redundant download_subtitle calls 2022-01-01 19:18:40 -04:00
morpheus65535 d8f14560e3
Improved search speed by reusing providers pools 2022-01-01 10:21:19 -05:00
Vitiko 718bd2f8b9 Add default attribute to Subtitle 2021-12-13 15:41:46 -04:00
morpheus65535 63b326aa2f
Implemented words/regex ban list for subtitles 2021-12-11 07:44:53 -05:00
morpheus65535 b53f8ad80a Implemented some utility functions to subliminal_patch providers to list supported languages and video types. 2021-11-09 22:55:47 -05:00
morpheus65535 e86d537ca2
Improved subtitles scoring system 2021-06-10 16:00:42 -04:00
Vitiko 4ebcd49546
Added custom language class to make it easier to implement non-standard/regional languages 2021-06-06 09:57:29 -04:00
morpheus65535 fa3b773ef2 Fixed TypeError when trying to get video information while all providers are throttled. 2021-03-21 20:14:12 -04:00
zx900930 3173351590
update zimuku providers 2021-02-15 13:29:22 +01:00
zx900930 46e709c998
improve chinese language codes matching rules 2021-02-15 01:39:57 +01:00
Xavier Xiong 1548263a6c
Adding simplified and traditional Chinese subtitles support (#1236) 2021-02-12 14:15:19 -05:00
morpheus65535 c8eae1a512
Adding opensubtitles.com provider (#1247)
Adding OpenSubtitles.com provider
2021-01-25 14:28:55 -05:00
morpheus65535 22cd45bc41
Languages profiles (#1232)
Implementing the languages profiles functionality.
2021-01-18 23:49:51 -05:00
morpheus65535 e2e541252d Fix for forced subtitles not being automatically downloaded anymore. 2020-11-11 08:57:34 -05:00
morpheus65535 5658a7a359
Hearing impaired (#1102) 2020-09-10 14:26:37 -04:00
Louis Vézina e2b1726c87 Fix for #1034. 2020-08-10 08:48:03 -04:00
josdion d06cace2d6 Fix #886
Use the whole subtitle file to detect encoding. Seems like if trying to detect encoding only by a part of the file, is not always working. This modification will lead to worse performance, but should be more reliable.
2020-06-09 22:20:43 +03:00
josdion ca0123c036 don't check for language code if the subtitle file name is the same as the video name
if the subtitle file name is the same as the video name, it is pointless to check the language code
2020-06-09 20:11:48 +03:00
panni 584f4a7c04 update subliminal_patch; improve scoring; improve bsplayer; possibly fix bazarr#821 2020-02-16 05:53:32 +01:00
Michiel van Baak d4dd3ca4de Use native os.scandir when available 2020-02-09 15:37:11 +01:00
German Gutierrez 6c3cc4be28 providers: adding bsplayer initial commit 2020-01-07 12:23:17 +01:00
panni 64fa210688 core: update to subliminal_patch:head; core: try and fix #703 2019-12-24 00:25:02 +01:00
Louis Vézina fe6758858a Merge branch 'development' into python3
# Conflicts:
#	bazarr/database.py
#	bazarr/get_episodes.py
#	bazarr/get_movies.py
#	bazarr/get_series.py
#	bazarr/get_subtitle.py
#	bazarr/list_subtitles.py
#	bazarr/main.py
#	views/movie.tpl
2019-10-28 20:27:11 -04:00
panni 912717dd93 core: update to subliminal_patch:head; addic7ed: fix using empty show ids list; fix completed subtitle detection for non-english languages; fix mr robot subtitle file detection 2019-10-22 12:00:50 +02:00
panni 8799938b4e core: update to subliminal_patch:head; addic7ed: show ids fetching 2019-10-20 06:07:10 +02:00
Louis Vézina 995b9ac9ae Merge branch 'development' into python3
# Conflicts:
#	bazarr/get_episodes.py
#	bazarr/get_movies.py
#	bazarr/get_subtitle.py
#	bazarr/list_subtitles.py
#	bazarr/main.py
#	libs/subliminal_patch/core.py
#	libs/subliminal_patch/providers/addic7ed.py
2019-10-19 18:10:44 -04:00