Release: Subliminal Subtitles (Addic7ed, Podnapisi, OpenSubtitles)

Anybody got An idea?

Yes, with PlexMediaScanner you could set up a cron job on your PMS machine to refresh certain parts of your library. Use the ' -r ' command line parameter to trigger metadata agents. 

Please note that certain metadata providers have a rate limit on the amount of requests or downloads can be performed. Refreshing a complete library could risk in a ban of that provider. Keep the section as small as possible (e.g. a particular season of a TV show) if possible.

PlexMediaScanner: https://support.plex.tv/hc/en-us/articles/201242707-Plex-Media-Scanner-via-Command-Line

With the movie Captain America: Winter Soldier, I had a problem, see below, cause the filename is reversed, I keep the original filenames, but the folders have the correct name.

Maybe you can use the title from plex instead of the filename, if the filename has no match for example.

The way the plugin now works is that Subliminal scans the video based on the filename. This is the same approach a standalone CLI setup would work. It is hard to use metadata from PMS because how the metadata agents are used. Because these metadata agents are a sub-agent of The TV DB, metadata is hard to fetch. I've tried this in the initial setup of the plugin, but it didn't work. 

i like your way!! may i ask something subliminal an his providers are using api to fetch subtitles?

Some providers have an API, for instance OpenSubtitles. However, podnapisi doesn't have a full API. Some parts of the download are fetched ("scraped") from the download pages.

@bramwalet,

I did these modifications to add portuguese-brazilian, worked just fine, thanks!

Inside DefaultPrefs.json I saw the sections with "id": "langPref1" and "id": "langPref2", so I added 3 and 4, and had more options to select, but from the log I could observe that only langPref1 and langPref2 are being used to look for subtitles. It would be too difficult to modify the code to look for more languages?

This is relatively easy. You would have to modify

# Prepare a list of languages we want subs for
def getLangList():
 
in Contents/Code/__init__.py
 
Add pref3 and pref4 to the list when they have a value (similar to 2).

I have an error when refreshing an episode:

It seems the agent doesn't like special characteres in path

Thanks for the feedback, I noted it as an issue and will look into it.

When a sub is beeing downloaded it's get named to .EN.srt

- So i have to rename the .srt to .srt all the time.

Can you change that so it get so by default.

@bramwalet,


Worked just great! Now I can download more than two subtitles.

I find it strange that it takes so long for the plugin to download subs. For example: the sub for one of my episodes was already on various subtitle-sites supported by the plugin since Tuesday. But the plugin didn't download it until Thursday. I updated my library multiple times but nothing. 

Trying to install Submliminal plugin bundle on PMS for Windows but the agent does not install, any ideas? It seems that a couple of other users in this thread experienced the same problem.

Podnapisi.NET scanning does not work ??? 

Despite the fact that they are on their side.

It would be great to see this plugin in the unsupported plugin library so updates are automatic. Loving it! thanks a lot!

Podnapisi.NET scanning does not work ??? 

Despite the fact that they are on their side.

Podnapisi has been broken in the main fork of subliminal for some time now due to changes on the podnapisi website. Pull requests have been submitted but not yet included.

There is not much the plugin author can do about this unless he wants to base the plugin on another fork of subliminal. Personally I've switched to Jtwill's fork where the fix for podnapisi is included.

Btw. I use subliminal as a cli tool and not in this plugin.

Hi,

First and foremost, many thanks for making this agent. It avoids me from running subliminal manually.

However I am receiving the following error for addic7ed

 requests.packages.urllib3.connectionpool: "GET /show/751&season=6 HTTP/1.1" 304 0
ERROR (logger:29) - subliminal.providers: Unexpected error in provider 'addic7ed', discarding it
 
I have no idea what the 304 error means but it seems to prevent any download.
 
Any clue on how to solve this?

I found this agent via the "Plex Benelux" Facebook group and was so excited to discover this agent! I'm using "Auto-Sub" python program now, to automatically search and download dutch and/or english subtitles for series. When it finds and download a matching subtitle, it send's a notification to prowl, growl etc. so my wife and I, know when we can watch a new episode with subtitle. This works very well.

I've got a couple of questions:

When does this agent scan for subtitles, at a refresh of the "Series" and "Movies" or "All" libraries? And when it finds matching subtitles, does it give notifications? If not, may I request a feature for this agent, I would like to ask if it is possible to get a notification when a subtitle is found and downloaded.

Thanks!

Great plugin :) Glad to see this is being worked on! Keep up the great work!

Gonna give it a try again. I only like addic7ed subs. it was not working for me so lets see what happens know. 

I've got a couple of questions:

When does this agent scan for subtitles, at a refresh of the "Series" and "Movies" or "All" libraries? And when it finds matching subtitles, does it give notifications? If not, may I request a feature for this agent, I would like to ask if it is possible to get a notification when a subtitle is found and downloaded.

Thanks!

That depends on your agent configuration. On each Library in Plex, you can configure the appropriate Agent (for example Freebase for Movies). On the Agent configuration on Plex Media Server, for TV Shows and Movies, you can enable certain agents to be included.

The Subliminal plugin supports both movies and tv shows, so if you've configured both, with both refreshes i will scan for subtitles.

There is no notification built in yet. As far as I know, no notification function is provided on Plex for agents to send notifications. So the only option would be to write notifications myself, and I don't consider that core functionality of the plugin...

Hi,

First and foremost, many thanks for making this agent. It avoids me from running subliminal manually.

However I am receiving the following error for addic7ed

 requests.packages.urllib3.connectionpool: "GET /show/751&season=6 HTTP/1.1" 304 0
ERROR (logger:29) - subliminal.providers: Unexpected error in provider 'addic7ed', discarding it
 
I have no idea what the 304 error means but it seems to prevent any download.
 
Any clue on how to solve this?

I think it has to do with certain checks on the User Agent string at addic7ed. See

https://github.com/Diaoul/subliminal/issues/428

I guess I have to update subliminal in the plugin in order to get this to work again.

I have an error when refreshing an episode:

It seems the agent doesn't like special characteres in path

  File "/Users/Famille/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 73, in scanVideo
    scannedVideo = subliminal.video.scan_video(part.file, subtitles=external_subtitles, embedded_subtitles=embedded_subtitles)
  File "/Users/Famille/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Libraries/Shared/subliminal/video.py", line 204, in scan_video
    video.size = os.path.getsize(path)
  File "/Users/admin/jenkins/pms-deps-universal-v2/BUILD_TAG/darwin-x86_64/output/pms-depends-darwin-x86_64-release-960b06b/lib/python2.7/genericpath.py", line 49, in getsize
OSError: [Errno 2] No such file or directory: "/Volumes/Data/Vid\xc3\xa9os/S\xc3\xa9ries/Grey's Anatomy/Greys.Anatomy.S11E07.HDTV.x264-LOL.mp4"

2014-11-27 01:16:57,105 (10facd000) : DEBUG (model:225) - Serializing to /Users/Famille/Library/Application Support/Plex Media Server/Metadata/TV Shows/1/5d76ab48ecf9d01ebc4f4d81a3424d4240c9c4c.bundle/Contents/com.plexapp.agents.subliminal/Info.xml
2014-11-27 01:16:57,106 (10facd000) : DEBUG (runtime:918) - Response: [200] str, 16 bytes

I've tried to look into this, but unfortunately I am not able to reproduce the problem. I am only running on Windows and Linux, not Mac.

Looking at the log statements, it has to do something with the path encoding. During logging inside the Plex bundle, the path appears to be ok. But when the variable is split inside subliminal and using os.path.split and os.path.getsize the path appears to be corrupted. I've tried to encode the variable but that doesn't seem to matter when I look at the debug statements. Could be a platform specific issue...

Giving this agent a new try. Since subtitles never are available in Swedish at the time the episode is downloaded and added to Plex I figured I manually trigger the agent. But I'm a bit clueless to what is happening. From Plex Web app I have tried the little circle with the arrow "Refresh Library" in my TV series section. I have also tried the "Refresh" button in a specific TV show.

But nothing seems to trigger the agent (which is placed at the top before local media scanner and activated).

There was a logfile created com.plexapp.agents.subliminal.log but I deleted this so I easily could see when logfile is created from the agent.

Now there are no new logfiles created if I do the refresh as explained below.

FYI I am running plex off my ReadyNAS OS6.

I want to know how to trigger this agent manually from Plex Web App.

Ok Now It all of a sudden was a logfile and also downloaded subtitles but only for a specific show so it seems like refresh complete TV series section does not trigger the agent, but a refresh of a specific series seems to work!

Subliminal works for tv series. But I can not trigger it for movies. It’s present in my movie agent at the top. Manual refresh of movies never seem to trigger the agent at all :frowning:


Skickat från min GT-I9505 via Tapatalk

Is there any way to add YIFY subtitles to the list? http://www.yifysubtitles.com/

There is an agent that supports downloading from YIFY subtitles website but it doesn't have an option to save next to media files. (https://github.com/sander1/YifySubtitles.bundle)

With subliminal agent i am able to download some subtitles for movies, but if it's a YIFY movie then it doesn't work.

Edit: This is a log when I try to use subliminal to check for YIFY movie subtitles: