bramwalet / subliminal.bundle Goto Github PK
View Code? Open in Web Editor NEWPlex Metadata agent plugin based on Subliminal
License: MIT License
Plex Metadata agent plugin based on Subliminal
License: MIT License
Subliminal API provides option to save only one subtitle without language file. Make this an option and send single to True if option is checked.
subliminal.api.save_subtitles(subtitles, single=False, directory=None, encoding=None)
Save subtitles on disk next to the video or in a specific folder if folder_path is specified
Parameters:
single (bool) – download with .srt extension if True, add language identifier otherwise
directory (string or None) – path to directory where to save the subtitles, if any
encoding (string or None) – encoding for the subtitles or None to use the original encoding
Hi,
No subtitles showing up, I don't know why ?
Can you help me please ?
You can find the log file in attachment
Best regards,
com.plexapp.agents.opensubtitles.log
The used version of guessit have a bug around 174 and 179 that prevents found subtitles to be saved
This is fixed in guessit > 0.10.3
Could you please upgrade to this version?
Otherwise I get this error with circa 80% of subtitles
2015-08-06 21:26:42,457 (10af4a000) : CRITICAL (agentkit:1057) - Exception in the update function of agent named 'Subliminal Movie Subtitles', called with guid 'com.plexapp.agents.imdb://tt2555736?lang=en' (most recent call last):
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1055, in update
agent.update(obj, media, lang, *_kwargs)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/_init.py", line 131, in update
subtitles = downloadBestSubtitles(videos.keys())
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/init.py", line 81, in downloadBestSubtitles
return subliminal.api.download_best_subtitles(videos, getLangList(), getProviders(), getProviderSettings(), min_score, hearing_impaired)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/api.py", line 88, in download_best_subtitles
for subtitle, score in sorted([(s, s.compute_score(video)) for s in video_subtitles],
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/subtitle.py", line 131, in compute_score
initial_matches = self.compute_matches(video)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/providers/podnapisi.py", line 61, in compute_matches
matches |= compute_guess_matches(video, guessit.guess_movie_info(release + '.mkv'))
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/init.py", line 355, in guess_movie_info
return guess_file_info(filename, info=info, options=options, type='movie', *kwargs)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/init.py", line 291, in guess_file_info
result.append(_guess_filename(filename, options, *kwargs))
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/init.py", line 111, in guess_filename
mtree = build_filename_mtree(filename, options=options, *_kwargs)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/__init.py", line 118, in build_filename_mtree
mtree = IterativeMatcher(filename, options=options, **kwargs)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 120, in _init
self._process(transformer, False)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 138, in _process
transformer.process(self.match_tree, self.options)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/transfo/guess_movie_title_from_position.py", line 170, in process
found_property(next(basename_leftover), 'title', confidence=0.4)
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 193, in found_property
caller_frame = inspect.stack()[1][0]
File "/Users/myuser/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 175, in build_guess
if if clean_value[0] == node.value[i]:
IndexError: string index out of range
The agent have support for portuguese (pt-pt) subtitles but not for portuguese from Brazil (pt-br).
This support would be nice since the dialects are very different.
Good morning,
After a recent Plex Upgrade, the plugin stopped downloading subtitles...
here is the log:
DEBUG (logger:21) - subliminal.providers.addic7ed: Logging in
INFO (logger:23) - requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): www.addic7ed.com
DEBUG (logger:21) - requests.packages.urllib3.connectionpool: "POST /dologin.php HTTP/1.1" 302 None
INFO (logger:23) - subliminal.providers.addic7ed: Logged in
INFO (logger:23) - subliminal.providers: Listing subtitles with provider 'addic7ed' and languages set([<Language [en]>])
DEBUG (logger:21) - subliminal.providers.addic7ed: Searching subtitles {u'season': 12, u'show_id': 86}
DEBUG (logger:21) - requests.packages.urllib3.connectionpool: "GET /show/86&season=12 HTTP/1.1" 304 0
ERROR (logger:31) - subliminal.providers: Unexpected error in provider 'addic7ed', discarding it
2015-08-17 01:02:19,404 (7f95c0ff9700) : DEBUG (__init__:71) - Scanning video: /mnt/persei-04/TV/Hannibal/Season 01/Hannibal - S01E06 - WEBDL-720p-NTb.mp4, subtitles=True, embedded_subtitles=True
2015-08-17 01:02:19,405 (7f95c0ff9700) : INFO (logger:31) - subliminal.video: Scanning video 'Hannibal - S01E06 - WEBDL-720p-NTb.mp4' in '/mnt/persei-04/TV/Hannibal/Season 01'
2015-08-17 01:02:19,408 (7f95c0ff9700) : DEBUG (logger:21) - guessit.matcher: Property found: type=episode (None) (confidence=1.00)
2015-08-17 01:02:19,408 (7f95c0ff9700) : DEBUG (logger:21) - guessit.matcher: Property found: mimetype=video/mp4 (None) (confidence=1.00)
2015-08-17 01:02:19,409 (7f95c0ff9700) : DEBUG (logger:21) - guessit.matcher: Property found: container=mp4 (None) (confidence=1.00)
2015-08-17 01:02:19,481 (7f95c0ff9700) : DEBUG (logger:21) - guessit.matcher: Found match tree:
0111 222222222 33 44444444 555555555 6666666666666666666666666666666666 777
0000 000000000 00 00000000 000000000 0000000000000000000000000000000000 000
000000011 00000000000000000011122222233344444444444444 000
000000 00000111111111
011112222
/mnt/_________/TV/________/__________Hannibal - ______ - _____-____-NTb.___
TTTTTTTEE TTTTTTTT SSSSSSSSSS EEEEEE fffff ssss ccc
/mnt/persei-04/TV/Hannibal/Season 01/Hannibal - S01E06 - WEBDL-720p-NTb.mp4
2015-08-17 01:02:19,482 (7f95c0ff9700) : DEBUG (logger:21) - guessit.guess: Updating matching property 'season' with confidence 1.00
2015-08-17 01:02:19,482 (7f95c0ff9700) : DEBUG (logger:21) - guessit.guess: Updating matching property 'episodeNumber' with confidence 0.60
2015-08-17 01:02:19,483 (7f95c0ff9700) : DEBUG (logger:21) - guessit.guess: Updating non-matching property 'series' with confidence 0.20
2015-08-17 01:02:19,483 (7f95c0ff9700) : DEBUG (logger:21) - guessit.guess: Updating matching property 'container' with confidence 1.00
2015-08-17 01:02:19,484 (7f95c0ff9700) : DEBUG (logger:21) - guessit.matchtree: Final result: {
[1.00] "mimetype": "video/mp4",
[0.60] "episodeNumber": 6,
[1.00] "container": "mp4",
[1.00] "format": "WEB-DL",
[0.20] "series": "persei",
[1.00] "screenSize": "720p",
[1.00] "season": 1,
[1.00] "type": "episode"
}
It's taking the root folder name as 'series' name ;$ which will return nothing.
Saving subtitles as metadata sometimes fails with the following error:
2014-09-16 11:23:09,872 (7fe93bfff700) : DEBUG (__init__:90) - Saving subtitles as metadata
2014-09-16 11:23:09,874 (7fe93bfff700) : CRITICAL (agentkit:983) - Exception in the update function of agent named 'Subliminal TV Subtitles', called with guid 'com.plexapp.agents.thetvdb://280494/1/1?lang=en' (most recent call last):
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 981, in _update
agent.update(obj, media, lang)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 151, in update
saveSubtitles(videos, subtitles)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 91, in saveSubtitles
saveSubtitlesToMetadata(videos, subtitles)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 118, in saveSubtitlesToMetadata
mediaPart.subtitles[Locale.Language.Match(subtitle.language.alpha2)][subtitle.page_link] = Proxy.Media(subtitle.content, ext="srt")
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 237, in __setitem__
self._proxies[item] = make_tuple(item, value)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 220, in make_tuple
name_hash = self._core.data.hashing.sha1(item)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/data.py", line 32, in sha1
return self._generateHash(data, hashlib.sha1(), digest)
File "/mnt/raid/plex/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/data.py", line 22, in _generateHash
obj.update(data)
TypeError: must be string or buffer, not None
2014-09-16 11:23:09,879 (7fe93bfff700) : DEBUG (model:225) - Serializing to /mnt/raid/plex/Plex Media Server/Metadata/TV Shows/4/58dd2b277c5e01eb6e95a2ae4d254b47b6703c0.bundle/Contents/com.plexapp.agents.subliminal/Info.xml
2014-09-16 11:23:09,881 (7fe93bfff700) : DEBUG (runtime:918) - Response: [200] str, 16 bytes
Storing subtitles next to media files always works.
I'm just getting started with this and I followed the install instructions and putting the .bundle file into the plugins foleder and after restarting Plex I do not see a channel for the bundle. Am I missing something?
It's not doing that it seems.
Which version of subliminal is used ?
Latest version is 1.1.1 : https://github.com/Diaoul/subliminal/releases/tag/1.1.1
I dl the zip and want to put it somewhere in my pms but the folder mentioned on plexforum don't excist in my server.
How to get it workring on my server running latest freebsd.
Willing to provide more info by pm or mail.
If I'm not mistaking , with the latest release, you can either download hearing impaired OR normale subs. It would be nice to have hearing impaired as fallback :)
Hi,
I wonder if it would be possible for Sub-Zero to translate an existing subtitle into another language using Google/Azure translate APIs?
For many languages (eg, Thai) there are no subtitles available, but they almost always have English subs.
I use this service here, https://translate-subtitles.com/ , and it's great, It even allows displaying the machine translated subtitles at the top of the screen, and the original subtitles at the bottom. Which is great to check the quality of the translation but also to gradually learn a language.
Would something like this be possible in an automated fashion in Sub-Zero?
Helllo,
first of all, congrats on the plugin; works great.
Is there an easy way to include xsubs.tv in the list of subtitles providers? Could i do it myself? If yes, short instructions would be much appreciated :-)
Cheers,
Markos
I'd like to se an option to skip downloading if a selected language subtitle is already built-in in the file or if .srt(language coded) is available in media dir. This is to avoid having duplicate subtitles.
I'm using PMS 0.9.12.4 and having the following error:
2015-07-04 11:57:34,318 (-4ea00ba0) : CRITICAL (agentkit:1057) - Exception in the update function of agent named 'Subliminal Movie Subtitles', called with guid 'com.plexapp.agents.imdb://tt1661199?lang=en' (most recent call last):
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/api/agentkit.py", line 1055, in _update
agent.update(obj, media, lang, **kwargs)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 131, in update
subtitles = downloadBestSubtitles(videos.keys())
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 81, in downloadBestSubtitles
return subliminal.api.download_best_subtitles(videos, getLangList(), getProviders(), getProviderSettings(), min_score, hearing_impaired)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/api.py", line 88, in download_best_subtitles
for subtitle, score in sorted([(s, s.compute_score(video)) for s in video_subtitles],
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/subtitle.py", line 131, in compute_score
initial_matches = self.compute_matches(video)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/providers/podnapisi.py", line 61, in compute_matches
matches |= compute_guess_matches(video, guessit.guess_movie_info(release + '.mkv'))
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/__init__.py", line 355, in guess_movie_info
return guess_file_info(filename, info=info, options=options, type='movie', **kwargs)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/__init__.py", line 291, in guess_file_info
result.append(_guess_filename(filename, options, **kwargs))
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/__init__.py", line 111, in _guess_filename
mtree = _build_filename_mtree(filename, options=options, **kwargs)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/__init__.py", line 118, in _build_filename_mtree
mtree = IterativeMatcher(filename, options=options, **kwargs)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 120, in __init__
self._process(transformer, False)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 138, in _process
transformer.process(self.match_tree, self.options)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/transfo/guess_movie_title_from_position.py", line 170, in process
found_property(next(basename_leftover), 'title', confidence=0.4)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 193, in found_property
guess = build_guess(node, name, value, confidence)
File "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/guessit/matcher.py", line 175, in build_guess
if clean_value[0] == node.value[i]:
IndexError: string index out of range
Say your file is 720p, but the subtitle sites only have a sub for HDTV (480p),
Would be nice if there was an option to also accept a subtitle of the same release group but other quality. Syncs are almost always the same, and in this way more hits are found.
Hi,
I came across this issue which I am not sure why happens but when trying to scan on e of the TVShows the plugin crashes because a variable is not handled properly. Here you have the last part of the log:
Thanks
Subtitles should be saved as metadata by default
With Preferences, the user can:
Doesn't find subtitles for some files I can find using subliminal -leng "filename".
Any way to implement notification agents like:?
According to the documentation
http://subliminal.readthedocs.org/en/latest/api/cli.html
the minimum score range for movies and series are different.
-m MIN_SCORE, --min-score MIN_SCORE
minimum score for subtitles (0-71 for episodes, 0-31
for movies)
Now, the plugin only provides one setting for movies and episodes. Separate it an create own range.
The api provides a parameter to set a minimum score to match the found subtitles. Create a Preference to set this score and apply in download_best_subtitle.
Set languages, turned sublim on for tv and movies, brought it up to top, input the correct credentials. Updated library. Restarted plex. Refreshed the tv show. What am i doing wrong?
Hello, is it possible to update "Guessit" library?
Indeed, currently the show "12 Monkeys" isn't parsed correctly so "Subliminal" doesn't manage to find any subtitles for it. The reason is in the logs :
http://pastebin.com/rYx9F3Hh
"Guessit" library "guesses" badly the name of the show ("Monkeys" instead of "12 Monkeys").
And since this library hasn't been updated since 7 months, I can't even post it on its author github page.
I'd like to be able to actively prefer one provider over another, as some tend to provide consistently better subs than others. Also a list of available subtitles per file and a manual forced-download would be really awesome though I don't know whether that's possible as a Plex addon right now.
Hi,
Is there any way to start a bulk search on my entire library by command line on plex (Synology)?
Thanks a lot in advance,
Jeremy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.