Release: Subliminal Subtitles (Addic7ed, Podnapisi, OpenSubtitles)

Awesome work!

Just a few minor things, that are already said, a scoring difference between series and films would be awesome.

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.

2014-08-08 15:55:32,217 (-4d876490) :  DEBUG (__init__:82) - Download best subtitles using settings: min_score: 50, hearing_impaired: False
2014-08-08 15:55:32,218 (-4d876490) :  INFO (logger:29) - subliminal.api: Listing subtitles for
2014-08-08 15:55:32,219 (-4d876490) :  INFO (logger:29) - subliminal.providers: Listing subtitles with provider 'podnapisi' and languages set([, ])
2014-08-08 15:55:32,219 (-4d876490) :  DEBUG (logger:21) - subliminal.providers.podnapisi: Searching episode {u'sK': u'462x 3CA ST DH p027 4102 reidlo s retni w eh t acirem a niatpa c', u'sJ': 2, u'sXML': 1, u'sY': 2014}
2014-08-08 15:55:32,221 (-4d876490) :  INFO (logger:29) - requests.packages.urllib3.connectionpool: Starting new HTTP connection (1): simple.podnapisi.net
2014-08-08 15:55:32,341 (-4d876490) :  DEBUG (logger:21) - requests.packages.urllib3.connectionpool: "GET /ppodnapisi/search?sK=462x+3CA+ST+DH+p027+4102+reidlo+s+retni+w+eh+t+acirem+a+niatpa+c&sJ=2&sXML=1&sY=2014 HTTP/1.1" 200 None
2014-08-08 15:55:32,342 (-4d876490) :  DEBUG (logger:21) - subliminal.providers.podnapisi: No subtitle found
2014-08-08 15:55:32,343 (-4d876490) :  DEBUG (logger:21) - subliminal.providers.podnapisi: Searching episode {u'sK': u'462x 3CA ST DH p027 4102 reidlo s retni w eh t acirem a niatpa c', u'sJ': 23, u'sXML': 1, u'sY': 2014}
2014-08-08 15:55:32,462 (-4d876490) :  DEBUG (logger:21) - requests.packages.urllib3.connectionpool: "GET /ppodnapisi/search?sK=462x+3CA+ST+DH+p027+4102+reidlo+s+retni+w+eh+t+acirem+a+niatpa+c&sJ=23&sXML=1&sY=2014 HTTP/1.1" 200 None
2014-08-08 15:55:32,464 (-4d876490) :  DEBUG (logger:21) - subliminal.providers.podnapisi: No subtitle found
2014-08-08 15:55:32,464 (-4d876490) :  INFO (logger:29) - subliminal.providers: Found 0 subtitles
2014-08-08 15:55:32,464 (-4d876490) :  INFO (logger:29) - subliminal.api: Found 0 subtitles total
2014-08-08 15:55:32,465 (-4d876490) :  DEBUG (__init__:87) - Saving subtitles to filesystem
2014-08-08 15:55:32,467 (-4d876490) :  DEBUG (model:225) - Serializing to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Metadata/Movies/1/3263132f9a893d54a9d6d1173949dacae64b0e6.bundle/Contents/com.plexapp.agents.subliminal/Info.xml

i hope someone fix the plugin from krekor for greek downalod the subs but doesnt load them or something also save on media folder the subtitle,
https://github.com/KleKoR/Xsubs.bundle or include on subliminal

well, i think you should ask this in a specific thread to this problem. This is the support thread for bramwalet's subliminal plugin alpha, as you may know ;) and like bramwalet already said, first the plugin has to go out of alpha with the original subliminal-agents fully working.

But anyway, greek is supported by any of the subliminal-sites .. so i don't get your problem really..

and by the way, almost any country has it's own "major" subtitle site .. like subcentral.de in germany, which i prefer. but if bramwalet is implementing every localized site before the plugin reach beta, this wouldn't make much sense, or?

just be a bit patient

only opensubtitles have greeksubs but no new of them also many are with machine translated… if is possible to have the option that denied the subs with machine translated… anywayz

hmm.. thats uncool^^

well, than you should keep it in mind and request it again, as soon as the plugin reach 1.0 ...

Another greek subs site is subs4free.com. Maybe this is usefoul.



Sent from my SM-P600 using Tapatalk

There’s any way to logging to your prefer page. My case adic7ed I like the work they do. And also it will be easier on there servers.

Oh my!! This kind of agent is exactly what I've been after ever since I installed PMS... pity that it came too late. Sometime ago I implemented my own automated subtitle download solution, also based on subliminal. My setup is pretty simple: two daemons (in Mac OSX) execute subliminal on regular intervals. The first one runs every 60 minutes, scans the whole TV shows folder, and fetches whatever subtitles are available at that time (for files that do not have subtitles yet, i.e. most likely they've been just downloaded). The second daemon runs every 24h and scans the same folder but only for files that are less than 2 days old, and only fetches subtitles with a minimum score of 70, so gets only exact or close-to-exact matches. This way pretty much always there is a good subtitle available when I'm about to watch a new episode of something.

Besides this, I had to make a small customization to the subliminal code. The silly PMS scanner won't pick up newly added subtitle files unless a refresh is performed (which besides needing to be triggered manually, also involves redownloading metadata, I think? far from ideal...) so I eventually figured out that updating the timestamp of the parent folder does the trick of triggering the scanner and forcing it to recognize any new subtitle file found. So I added a few lines of code to subliminal (never a bad time to learn some python) and now it all works well.

I'll definitely keep an eye on this agent though!

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

I've download the file, transfer it to the Plug-ins folder, renamed it to .bundle (deleting the "-master"), restarted the PMS. But the plugin was not installed. I try the same procedure with another plug-in and it was installed with no problem. I'm running PMS 0.9.8.6.175.

Thanks

It doesn't show up under channels, if that is where you are looking. Look under settings > server > agents

Would cool that it had a way to know that we are actually logging in the pages. Like a message connexion succeed or a red and blue led or something.

Hello I have installed the Plug-in and rectified the permission

https://dl.dropboxusercontent.com/u/297620/Photos/Divers/sftp.png

restarted the service plexmediaserver and the MetaAgent doesn't appear  :(

https://dl.dropboxusercontent.com/u/297620/Photos/Divers/Agents.png

My version of PMS is 0.9.9.16

what I'm doing wrong ? 

Nonojw,

from your first picture I can only see that you renamed the bundle, removing the "-master" part, but nothing related to file ownership

...
drwxr-xr-x 3 plex plex 4096 Mar 17  2014 OpenSubtitles.bundle
drwxr-xr-x 3 plex plex 4096 Mar 17  2014 PersonalMedia.bundle
drwxr-xr-x 3 plex plex 4096 Jun 18 22:22 Plex Podcast.bundle
drwxr-xr-x 3 plex plex 4096 Jul 13 02:01 PlexThemeMusic.bundle
drwxr-xr-x 3 plex plex 4096 Ago 18 00:57 PodnapisiSubtitles.bundle
drwxr-xr-x 3 plex plex 4096 Set  6 14:32 Scanners.bundle
drwxr-xr-x 3 plex plex 4096 Nov  6 23:01 Services.bundle
drwxr-xr-x 3 plex plex 4096 Mar 17  2014 SiteConfigurations.bundle
drwxr-xr-x 3 plex plex 4096 Ago  1 04:13 Subliminal.bundle
drwxr-xr-x 3 plex plex 4096 Ago  2 02:26 System.bundle
...

That's the output of my Linux server running plex. Look that the owner and group of all directories (an the contents inside it) is plex. You should use the same user and group from the other working bundles. 

Adding a language is easy, update DefaultPrefs.json to add the IETF language code and Strings/en.json for the display value.

I created a branch add_languagues, you can check it out here

https://github.com/bramwalet/Subliminal.bundle/archive/add_languagues.zip

I haven't tested it yet (therefore it's not in master yet).

@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?

Same problem on my MacMini 2009 with Mavericks. Added the bundle as described. But it doesn't show up under agents.

Any hints?

Guys, got this fantastic plugin for over a few months now.


I would like to have the ability to rescan for subtitles after a certain period if nu subtitles are found.

Is there any way to achieve this?


I use Sickbears and need to do a manuel metadata refresh before i watch my series because there are no subs found when the files are added to the PMS.

I have the exact same problem. My TV shows are added before the subtitles are available, is there a solution to watch new files for a certain period of time until subtitles are available?

I have an error when refreshing an episode:

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

2014-11-27 01:16:56,876 (10facd000) :  DEBUG (__init__:148) - TvUpdate. Lang en
2014-11-27 01:16:56,877 (10facd000) :  DEBUG (__init__:71) - Scanning video: /Volumes/Data/Vidéos/Séries/Grey's Anatomy/Greys.Anatomy.S11E07.HDTV.x264-LOL.mp4, subtitles=False, embedded_subtitles=False
2014-11-27 01:16:56,877 (10facd000) :  INFO (logger:31) - subliminal.video: Scanning video 'Greys.Anatomy.S11E07.HDTV.x264-LOL.mp4' in "/Volumes/Data/Vid\xc3\xa9os/S\xc3\xa9ries/Grey's Anatomy"
2014-11-27 01:16:56,988 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: type=episode (None) (confidence=1.00)
2014-11-27 01:16:56,996 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: mimetype=video/mp4 (None) (confidence=1.00)
2014-11-27 01:16:56,997 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: container=mp4 (None) (confidence=1.00)
2014-11-27 01:16:57,000 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: format=HDTV (HDTV) (confidence=1.00)
2014-11-27 01:16:57,001 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: videoCodec=h264 (x264) (confidence=1.00)
2014-11-27 01:16:57,002 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: container=mp4 (mp4) (confidence=1.00)
2014-11-27 01:16:57,031 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: season=11 (S11E07) (confidence=1.00)
2014-11-27 01:16:57,032 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: episodeNumber=7 (S11E07) (confidence=1.00)
2014-11-27 01:16:57,037 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Property found: releaseGroup=LOL (LOL) (confidence=1.00)
2014-11-27 01:16:57,101 (10facd000) :  DEBUG (logger:21) - guessit.matcher: Found match tree:
01111111 2222 333333 444444 55555555555555 6666666666666666666666666666666666 777
00000000 0000 000000 000000 00000000000000 0000000000000000000000000000000000 000
                                           0000000000000000000001111222222222 000
                                           000000000000001111112    011112222
                                                                         0111
/Volumes/Data/Vidéos/Séries/______________/____________________.____.____-___.___
                            TTTTTTTTTTTTTT TTTTTTTTTTTTTTEEEEEE ffff vvvv rrr ccc
/Volumes/Data/Vidéos/Séries/Grey's Anatomy/Greys.Anatomy.S11E07.HDTV.x264-LOL.mp4
2014-11-27 01:16:57,101 (10facd000) :  DEBUG (logger:21) - guessit.guess: Updating matching property 'series' with confidence 0.40
2014-11-27 01:16:57,102 (10facd000) :  DEBUG (logger:21) - guessit.guess: Updating matching property 'container' with confidence 1.00
2014-11-27 01:16:57,102 (10facd000) :  DEBUG (logger:21) - guessit.matchtree: Final result: {
    [1.00] "mimetype": "video/mp4", 
    [1.00] "episodeNumber": 7, 
    [1.00] "videoCodec": "h264", 
    [1.00] "container": "mp4", 
    [1.00] "format": "HDTV", 
    [0.40] "series": "Greys Anatomy", 
    [1.00] "releaseGroup": "LOL", 
    [1.00] "season": 11, 
    [1.00] "type": "episode"
}
2014-11-27 01:16:57,103 (10facd000) :  CRITICAL (agentkit:983) - Exception in the update function of agent named 'Subliminal TV Subtitles', called with guid 'com.plexapp.agents.thetvdb://73762/11/7?lang=en' (most recent call last):
  File "/Users/Famille/Library/Application Support/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 "/Users/Famille/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 149, in update
    videos = scanTvMedia(media)
  File "/Users/Famille/Library/Application Support/Plex Media Server/Plug-ins/Subliminal.bundle/Contents/Code/__init__.py", line 55, in scanTvMedia
    scannedVideo = scanVideo(part)
  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 have the exact same problem. My TV shows are added before the subtitles are available, is there a solution to watch new files for a certain period of time until subtitles are available?


Anybody got An idea?