Git Product home page Git Product logo

morpheus65535 / bazarr Goto Github PK

View Code? Open in Web Editor NEW
2.5K 2.5K 196.0 349.16 MB

Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movie and Bazarr takes care of everything for you.

Home Page: https://www.bazarr.media

License: GNU General Public License v3.0

Python 98.41% CSS 0.02% C 0.13% JavaScript 0.03% Shell 0.01% Roff 0.02% HTML 0.02% Handlebars 0.01% TypeScript 1.15% C++ 0.04% Cython 0.14% Mako 0.05%
download-subtitles episodes movie radarr series sonarr subliminal subtitle-downloader

bazarr's People

Contributors

agneevx avatar arabcoders avatar ayancey avatar belphemur avatar dependabot[bot] avatar dimitrov-adrian avatar germang avatar girtskokars avatar github-actions[bot] avatar gmerciel avatar guykh avatar halali avatar iiispaceiii avatar jaized avatar josdion avatar laser-yi avatar lawadr avatar morpheus65535 avatar moshimoshi0 avatar mvanbaak avatar ngosang avatar pannal avatar pkoutsias avatar sambartik avatar smaarn avatar tmadmac avatar unhealthykraken avatar vitiko98 avatar znuff avatar zx900930 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bazarr's Issues

I will b happy to try...

I have sonarr (QSonarr) running in my QNAP NAS...
I don't know how to install bazarr in my qnap :)
any help?
Thanks!

Updates fail

When I try to update Bazarr (in the "tasks" tab), I have the following error message in the logs:
Job "Update bazarr from source on Github (trigger: interval[6:00:00], next run at: 2017-12-29 20:37:12 CET)" raised an exception

'Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "/home/nzbdrone/bazarr/check_update.py", line 14, in check_and_apply_update
repo.remotes[remote_name].fetch()
File "/usr/local/lib/python2.7/dist-packages/pygit2/remote.py", line 405, in fetch
check_error(err)
File "/usr/local/lib/python2.7/dist-packages/pygit2/errors.py", line 64, in check_error
raise GitError(message)
GitError: there is no TLS stream available'

What is the origin of this message?

If log is empty, we get an exception

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\bottle.py", line 862, in _handle
return route.call(**args)
File "C:\Python27\lib\site-packages\bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "Y:\morpheus\Programmation\bazarr\bazarr.py", line 387, in system
row_count = i
UnboundLocalError: local variable 'i' referenced before assignment

Strange error for some shows

I see some strange errors for some shows:

No show id found for u'Berlin Station' ({'year': None})

What does this mean?

TypeError('expected string or buffer',)

I get following error:
(maybe you can add some extra logging here?)

Error: 500 Internal Server Error

Sorry, the requested URL 'http://0.0.0.0:6767/wanted_search_missing_subtitles' caused an error:

Internal Server Error
Exception:

TypeError('expected string or buffer',)
Traceback:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Library/Python/2.7/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "bazarr.py", line 281, in wanted_search_missing_subtitles_list
    wanted_search_missing_subtitles()
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 113, in wanted_search_missing_subtitles
    wanted_download_subtitles(episode[0])
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 97, in wanted_download_subtitles
    message = download_subtitle(path_replace(episode[0]), str(pycountry.languages.lookup(language).alpha_3), episode[4], providers_list, providers_auth)
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 25, in download_subtitle
    best_subtitles = download_best_subtitles([video], {Language(language)}, providers=providers, hearing_impaired=hi, provider_configs=providers_auth)
  File "/Library/Python/2.7/site-packages/subliminal/core.py", line 647, in download_best_subtitles
    compute_score=compute_score)
  File "/Library/Python/2.7/site-packages/subliminal/core.py", line 211, in download_best_subtitles
    for s in subtitles], key=operator.itemgetter(1), reverse=True)
  File "/Library/Python/2.7/site-packages/subliminal/score.py", line 106, in compute_score
    matches = subtitle.get_matches(video)
  File "/Library/Python/2.7/site-packages/subliminal/providers/opensubtitles.py", line 78, in get_matches
    matches |= guess_matches(video, guessit(self.movie_release_name, {'type': 'episode'}))
  File "/Library/Python/2.7/site-packages/subliminal/subtitle.py", line 202, in guess_matches
    if video.series and 'title' in guess and sanitize(guess['title']) == sanitize(video.series):
  File "/Library/Python/2.7/site-packages/subliminal/utils.py", line 111, in sanitize
    string = re.sub(r'[%s]' % re.escape(''.join(characters)), ' ', string)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 155, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer

Issue with WMV files

Just reporting an error I received concerning WMV files. WMV files are of course valid

Error: 500 Internal Server Error

Sorry, the requested URL 'http://0.0.0.0:6767/wanted_search_missing_subtitles' caused an error:

Internal Server Error
Exception:

ValueError("u'.WMV' is not a valid video extension",)
Traceback:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Library/Python/2.7/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "bazarr.py", line 276, in wanted_search_missing_subtitles_list
    wanted_search_missing_subtitles()
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 108, in wanted_search_missing_subtitles
    wanted_download_subtitles(episode[0])
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 92, in wanted_download_subtitles
    message = download_subtitle(path_replace(episode[0]), str(pycountry.languages.lookup(language).alpha_3), episode[4], providers_list, providers_auth)
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 19, in download_subtitle
    video = scan_video(path)
  File "/Library/Python/2.7/site-packages/subliminal/core.py", line 374, in scan_video
    raise ValueError('%r is not a valid video extension' % os.path.splitext(path)[1])
ValueError: u'.WMV' is not a valid video extension

Error when clicking on a serie

Error: 500 Internal Server Error

Sorry, the requested URL 'https://***********/bazarr/episodes/1' caused an error:

Internal Server Error
Exception:

NameError("name 'actual_languages' is not defined",)
Traceback:

Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/usr/lib/python3.5/site-packages/bottle.py", line 1740, in wrapper
rv = callback(*a, **ka)
File "/opt/Bazarr/bazarr.py", line 167, in episodes
return template('episodes', no=no, details=series_details, seasons=seasons_list, url_sonarr_short=url_sonarr_short, base_url=base_url)
File "/usr/lib/python3.5/site-packages/bottle.py", line 3619, in template
return TEMPLATES[tplid].render(kwargs)
File "/usr/lib/python3.5/site-packages/bottle.py", line 3409, in render
self.execute(stdout, env)
File "/usr/lib/python3.5/site-packages/bottle.py", line 3396, in execute
eval(self.co, env)
File "/opt/Bazarr/views/episodes.tpl", line 160, in
%if actual_languages is not None:
NameError: name 'actual_languages' is not defined

Oh and can't run it under python 2.7.. only way is using python3

Could not get it running on OSX

After following instructions, I get following errors:

ERROR:stevedore.extension:Could not load 'legendastv': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'shooter': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'podnapisi': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'tvsubtitles': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'opensubtitles': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'addic7ed': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'subscenter': No module named xmlrpc_client
ERROR:stevedore.extension:Could not load 'thesubdb': No module named xmlrpc_client
Traceback (most recent call last):
  File "bazarr.py", line 34, in <module>
    from get_providers import *
  File "/Users/USER/bazarr/bazarr/get_providers.py", line 3, in <module>
    from subliminal import *
  File "/Library/Python/2.7/site-packages/subliminal/__init__.py", line 16, in <module>
    from .providers import Provider
  File "/Library/Python/2.7/site-packages/subliminal/providers/__init__.py", line 5, in <module>
    from six.moves.xmlrpc_client import SafeTransport
ImportError: No module named xmlrpc_client

Error while running Sonarr V3

Hi

Sonarr Version: 2.0.0.4991 (Phantom branch)

error

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
  File "D:\apps\bazarr\get_series.py", line 13, in update_series
    get_profile_list()
  File "D:\apps\bazarr\get_series.py", line 82, in get_profile_list
    profiles_list.append([profile['id'], profile['language'].capitalize()])
KeyError: 'language'

Implement srt found colour code

all the srt languages lists in RED if not there.
srts found IN folder = Yellow
srts found attached to source file = GREEN
to remove put the small "x"under each language box.

setup instructions?

just install your script on windows 10, looks fecking awesome, just what ive been looking for:)

Setup instructions would be nice!

in particular, the paths, ive put in "D:\Current\Series Source" which is my tvseries folder, all series are in seperate folders below this path.

I dont know what to put into bizarr path???

I've also put in the apikey from sonnarr and saved settings, but still nothing happening.

the log sats:

Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2017-11-09 14:03:25 CET)" raised an exception

'Traceback (most recent call last):
File "C:\Python27\lib\site-packages\apscheduler\executors\base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
File "D:\Appz\bazarr\get_series.py", line 39, in update_series
current_shows_sonarr.append(show['tvdbId'])
TypeError: string indices must be integers'

Your help would be appreciated and thankyou for putting so much of your time into this project;)

Incorrect number of pages in the series tab

I have 90 shows in Sonarr.
Bazarr has created 7 pages in the Series tab: 6 pages with 15 shows and 1 page with no show.
I guess the error comes from line 139 of bazarr.py (I don't konw how to propose the change directly in the repository):
max_page = (missing_count / 15) + 1
should be
max_page = math.ceil(missing_count / 15)
Julien

Feature: remove subtitle request for a season

I have this season of a series where I have included subtitles in the MKV file; the system did not recognize this ( he recognized external ones). So I now have one show's season that is still in my wanted list, but I cannot remove it (per subtitle, or per season).

  1. can we have a feature to remove wanted subtitles (one by one, or per season)
  2. can bazarr recognize backed subtitles in MKV?

ps: BTW great product!

Insufficient data to process the guess

I came across this error when executing Download wanted subtitles:

Error: 500 Internal Server Error

Sorry, the requested URL 'http://0.0.0.0:6767/wanted_search_missing_subtitles' caused an error:

Internal Server Error
Exception:

ValueError('Insufficient data to process the guess',)
Traceback:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Library/Python/2.7/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "bazarr.py", line 277, in wanted_search_missing_subtitles_list
    wanted_search_missing_subtitles()
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 108, in wanted_search_missing_subtitles
    wanted_download_subtitles(episode[0])
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 92, in wanted_download_subtitles
    message = download_subtitle(path_replace(episode[0]), str(pycountry.languages.lookup(language).alpha_3), episode[4], providers_list, providers_auth)
  File "/Users/USER/bazarr/bazarr/get_subtitle.py", line 19, in download_subtitle
    video = scan_video(path)
  File "/Library/Python/2.7/site-packages/subliminal/core.py", line 380, in scan_video
    video = Video.fromguess(path, guessit(path))
  File "/Library/Python/2.7/site-packages/subliminal/video.py", line 93, in fromguess
    return Episode.fromguess(name, guess)
  File "/Library/Python/2.7/site-packages/subliminal/video.py", line 166, in fromguess
    raise ValueError('Insufficient data to process the guess')
ValueError: Insufficient data to process the guess

Bazarr cannot save settings

hello there, i am total linux noob, im running bazarr in docker (for sonarr) and cannot get it to save the settings i put in there, even tho i restart the docker container...

what should i do?

here is the log file>

14/01/2018 23:27:44|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|
14/01/2018 23:28:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:29:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:29:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:29:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:30:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:30:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:31:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:31:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:32:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:33:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:33:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:34:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:34:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:35:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:35:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:36:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:36:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:36:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:37:44|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:38:44 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:38:22|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|
14/01/2018 23:39:22|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:40:22 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:40:22|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:41:22 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:41:22|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:42:22 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:41:56|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|
14/01/2018 23:42:55|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:43:55 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:43:55|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:43:55 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:44:55|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:44:55 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:45:55|ERROR|Job "Update series list from Sonarr (trigger: interval[0:01:00], next run at: 2018-01-14 22:46:55 UTC)" raised an exception|Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/apscheduler/executors/base.py", line 125, in run_job retval = job.func(*job.args, **job.kwargs) File "/bazarr/get_series.py", line 13, in update_series get_profile_list() File "/bazarr/get_series.py", line 75, in get_profile_list url_sonarr_api_series = url_sonarr + "/api/profile?apikey=" + apikey_sonarrTypeError: coercing to Unicode: need string or buffer, NoneType found|
14/01/2018 23:46:29|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|
14/01/2018 23:50:46|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|
14/01/2018 23:53:51|INFO|Bazarr is started and waiting for request on http://0.0.0.0:6767/|

Bad subtitle encoding

Hi

when bazarr download czech or slovak subtitles where is diacritics it show like this,

na její pětileté misi.
Zkoumat neznámé nové světy,

OperationalError('user-defined function raised exception',)

I have the following exception leading to error 500:

Traceback (most recent call last):
  File "/home/pi/.local/lib/python2.7/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/home/pi/.local/lib/python2.7/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "bazarr.py", line 150, in series
    c.execute("SELECT tvdbId, title, path_substitution(path), languages, hearing_impaired, sonarrSeriesId, poster, audio_language FROM table_shows ORDER BY title ASC LIMIT 15 OFFSET ?", (offset,))
OperationalError: user-defined function raised exception

What could cause that? I recently added path substitution but I am not sure if it is linked. The error started after last restart due to update.

Subtitle gets downloaded over and over

I have one subtitle that gets downloaded over and over. I configured Bazarr to download only Dutch subtitles (single language). In every run it downloads the subtitle from opensubtitles, but then it gets marked as 'Af' Afrikaans. When I open the SRT file it look perfectly Dutch to me.

Better handling of "TooManyRequests"

Logs are full of errors, but in the end, it's just Too May Request.
Suggest to check upon this error and once received, wait x seconds/minutes before executing again.

Unexpected error in provider u'addic7ed'

'Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/subliminal/core.py", line 118, in list_subtitles_provider
return self[provider].list_subtitles(video, provider_languages)
File "/Library/Python/2.7/site-packages/subliminal/providers/addic7ed.py", line 273, in list_subtitles
return [s for s in self.query(video.series, video.season, video.year)
File "/Library/Python/2.7/site-packages/subliminal/providers/addic7ed.py", line 238, in query
raise TooManyRequests()
TooManyRequests'

Can't install pygit2 in Raspberry Pi 3

Hi! I'm trying to install bazarr on my rpi3 which is already running sonarr. All other depencies are installed with success except for this pygit2.

Already tried to install it differently but it didn't work as well.

Here is the log:

osmc@osmc:~/Downloads/bazarr$ python --version
Python 2.7.9
osmc@osmc:~/Downloads/bazarr$ sudo pip install -r requirements.txt
Requirement already satisfied: apscheduler in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1))
Requirement already satisfied: babelfish in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Requirement already satisfied: bottle in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3))
Requirement already satisfied: bottle-fdsend in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 4))
Requirement already satisfied: dogpile.cache in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5))
Requirement already satisfied: enzyme in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 6))
Requirement already satisfied: Pillow in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 7))
Requirement already satisfied: py-pretty in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 8))
Requirement already satisfied: pycountry in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 9))
Collecting pygit2 (from -r requirements.txt (line 10))
  Using cached pygit2-0.26.2.tar.gz
    Complete output from command python setup.py egg_info:
    __pycache__/_cffi__x554e6eaax4850a773.c:185:18: fatal error: git2.h: No such file or directory
     #include <git2.h>
                      ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-sDumAf/pygit2/setup.py", line 61, in <module>
        ffi.verify(preamble, **C_KEYWORDS)
      File "/usr/lib/python2.7/dist-packages/cffi/api.py", line 340, in verify
        lib = self.verifier.load_library()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 74, in load_library
        self._compile_module()
      File "/usr/lib/python2.7/dist-packages/cffi/verifier.py", line 139, in _compile_module
        outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
      File "/usr/lib/python2.7/dist-packages/cffi/ffiplatform.py", line 25, in compile
        outputfilename = _build(tmpdir, ext)
      File "/usr/lib/python2.7/dist-packages/cffi/ffiplatform.py", line 51, in _build
        raise VerificationError('%s: %s' % (e.__class__.__name__, e))
    cffi.ffiplatform.VerificationError: CompileError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sDumAf/pygit2/

As you can see, I'm using python version 2.7.9. Any ideas?

Addic7ed, LegendasTV and TVSubtitles error under Docker

'Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/subliminal/core.py", line 118, in list_subtitles_provider
return self[provider].list_subtitles(video, provider_languages)
File "/usr/lib/python2.7/site-packages/subliminal/providers/tvsubtitles.py", line 197, in list_subtitles
return [s for s in self.query(video.series, video.season, video.episode, video.year) if s.language in languages]
File "/usr/lib/python2.7/site-packages/subliminal/providers/tvsubtitles.py", line 163, in query
show_id = self.search_show_id(series, year)
File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 1231, in decorate
should_cache_fn)
File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 833, in get_or_create
async_creator) as value:
File "/usr/lib/python2.7/site-packages/dogpile/lock.py", line 154, in enter
return self._enter()
File "/usr/lib/python2.7/site-packages/dogpile/lock.py", line 87, in _enter
value = value_fn()
File "/usr/lib/python2.7/site-packages/dogpile/cache/region.py", line 788, in get_value
value = self.backend.get(key)
File "/usr/lib/python2.7/site-packages/dogpile/cache/backends/file.py", line 220, in get
with self._dbm_file(False) as dbm:
File "/usr/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/usr/lib/python2.7/site-packages/dogpile/cache/backends/file.py", line 215, in _dbm_file
"w" if write else "r")
File "/usr/lib/python2.7/anydbm.py", line 84, in open
mod = import(result)
File "/usr/lib/python2.7/dbhash.py", line 7, in
import bsddb
File "/usr/lib/python2.7/bsddb/init.py", line 67, in
import _bsddb
ImportError: No module named _bsddb'

Implement - Series page listing next/previous

Ive over 400 series, sereis page does take some time and memory to load with such numbers, perhaps pagenation should be implemented like you did with log page?

Actually on further thought, perhaps an alphabet along the bottom also???
Option to show 25/50/100 per page?

Cannot run in docker

I am trying to run in docker, but got an error. Tried both variants, repo from morpheus65535/bazarr and building image. In both cases, the error is the sme.


/usr/lib/python2.7/pkgutil.py:186: ImportWarning: Not importing directory '/usr/lib/python2.7/site-packages/backports': missing __init__.py
  file, filename, etc = imp.find_module(subname, path)
Traceback (most recent call last):
  File "/bazarr/bazarr.py", line 30, in <module>
    from update_db import *
  File "/bazarr/update_db.py", line 58, in <module>
    from scheduler import execute_now
  File "/bazarr/scheduler.py", line 3, in <module>
    from get_episodes import *
  File "/bazarr/get_episodes.py", line 7, in <module>
    from list_subtitles import *
  File "/bazarr/list_subtitles.py", line 8, in <module>
    import langdetect
ImportError: No module named langdetect
[cmd] python exited 1
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

Run custom script after download

It would be nice to be able to run a custom script after the download of a subtitle file. This would ideally work in a similar way to Sonarr, with variables such as filename and path that can be passed on for the script for use.

For example, I have a bash script that does some minor formatting adjustments to make them more compatible with my devices. I'm currently running this manually as needed.

Run bazarr as a service

Hi,
I'd like to run Bazarr as a service (daemon) in Linux. It would allow me to automatically start Bazarr at startup.
How could I do that?
Thanks in advance
Julien

Implement UTF8 encoding option

When dealing with arabix or korean, etc.. subtitles files, can be in very different encoding and you only see ??? ?? ??????? ? ????? as the text in the srt file/player.

I have found forcing UTF8 encoder, limits those type of files being grabbed.

So option for users to enable the -e UTF8 encoding.
perhaps just drop down box which user can seelct the type of enciding they want to force.

and your string adds -e (encding selection) to the query to sublinimal

Sonarr renaming makes getting wrong subtitle

Hi!

I have renaming enabled in sonarr, hence all my episodes are named:
{Series Title} - S{season:00}E{episode:00} - {Episode Title}
from file ex: Shetland.S01E01.1080p.WEB.h264-SFM-xpost.mkv

Will this break bazarr to find the exact right subtitle?

Implement - stats

Ability to see how many srts grabbed today/week/month total.
This will also reassure user that bazarr is working and see how many srts its got for them and show them how much they should value bazarr :)

Numerous log issues

I have the following warning in my logs:
Execution of job "Add new episodes from Sonarr (trigger: interval[0:01:00], next run at: 2017-12-28 00:27:56 CET)" skipped: maximum number of running instances reached (1)
I have this warning numerous times. What does it mean? How to fix it?

Error while installing requirements

Hi

I am trying to install Bazarr but I have the following error while trying to install the dependencies:

pi@PiNAS:~/bazarr $ sudo pip install -r requirements.txt
Collecting apscheduler (from -r requirements.txt (line 1))
  Downloading APScheduler-3.5.0-py2.py3-none-any.whl (60kB)
    100% |████████████████████████████████| 61kB 1.3MB/s
Collecting babelfish (from -r requirements.txt (line 2))
  Downloading babelfish-0.5.5.tar.gz (90kB)
    100% |████████████████████████████████| 92kB 1.5MB/s
Collecting bottle (from -r requirements.txt (line 3))
  Downloading bottle-0.12.13.tar.gz (70kB)
    100% |████████████████████████████████| 71kB 1.4MB/s
Collecting bottle-fdsend (from -r requirements.txt (line 4))
  Downloading bottle-fdsend-0.1.1.zip
Collecting dogpile.cache (from -r requirements.txt (line 5))
  Downloading https://www.piwheels.hostedpi.com/simple/dogpile-cache/dogpile.cac                                                                                                                                                             he-0.6.4-py2.py3-none-any.whl (43kB)
    100% |████████████████████████████████| 51kB 1.0MB/s
Collecting enzyme (from -r requirements.txt (line 6))
  Downloading enzyme-0.4.1.tar.gz (47kB)
    100% |████████████████████████████████| 51kB 745kB/s
Collecting Pillow (from -r requirements.txt (line 7))
  Downloading Pillow-4.3.0.tar.gz (13.9MB)
    100% |████████████████████████████████| 13.9MB 12kB/s
Collecting py-pretty (from -r requirements.txt (line 8))
  Downloading py-pretty-1.zip
Collecting pycountry (from -r requirements.txt (line 9))
  Downloading pycountry-17.9.23.tar.gz (9.2MB)
    100% |████████████████████████████████| 9.2MB 19kB/s
Collecting pygit2 (from -r requirements.txt (line 10))
  Downloading pygit2-0.26.3.tar.gz (462kB)
    100% |████████████████████████████████| 471kB 472kB/s
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
     #include <ffi.h>
                     ^
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lsYqdK/pygit2/setup.py", line 202, in <module>
        **extra_args)
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 317, in _                                                                                                                                                             _init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 372, in f                                                                                                                                                             etch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 84                                                                                                                                                             6, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 11                                                                                                                                                             18, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 11                                                                                                                                                             30, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 440, in f                                                                                                                                                             etch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py"                                                                                                                                                             , line 699, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py"                                                                                                                                                             , line 725, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py"                                                                                                                                                             , line 906, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py"                                                                                                                                                             , line 1145, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py"                                                                                                                                                             , line 1133, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'ar                                                                                                                                                             m-linux-gnueabihf-gcc' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ls                                                                                                                                                             YqdK/pygit2/

Could you please help me?

Option to not append language to subtitle filename

Bazarr appends the language of the subtitle file into it's filename - e.g. sometitle.en.srt - making it easy to organise multiple external subtitle tracks for the same video.

However, some DLNA servers and players only serve external subtitles if they have exactly the same filename. Thus, subtitle files which have the language appended to them do not get served by these devices.

For users who are only interested in one language of subtitle for a video, it would nice to have an option not to append the language in the filename, in order to make them compatible with a wider number of players.

Alternatively, implementation of #21 would probably solve this use-case equally well.

Docker arm64/aarch64 version

The current docker build isn't compatible with arm64/aarch64, can a compatible version be created?

The error I receive with the current docker build: standard_init_linux.go:195: exec user process caused "exec format error"

query failing due to db locked

Sorry, the requested URL 'http://127.0.0.1:6767/search_missing_subtitles/653' caused an error:

Internal Server Error
Exception:

OperationalError('database is locked',)
Traceback:

Traceback (most recent call last):
File "C:\Python27\lib\site-packages\bottle.py", line 862, in _handle
return route.call(args)
File "C:\Python27\lib\site-packages\bottle.py", line 1740, in wrapper
rv = callback(*a, ka)
File "D:\Appz\bazarr\bazarr.py", line 172, in search_missing_subtitles
series_download_subtitles(no)
File "D:\Appz\bazarr\get_subtitle.py", line 48, in series_download_subtitles
store_subtitles(path_replace(episode[0]))
File "D:\Appz\bazarr\list_subtitles.py", line 63, in store_subtitles
conn_db.commit()
OperationalError: database is locked

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.