Latest 0.2.0
Homepage https://github.com/mvader/subtitler
License MIT
Platforms ios 8.0, osx 10.10, requires ARC
Dependencies AlamofireXMLRPC, GZIP
Authors

License
Platform
Language
Cocoapod

Subtitler uses the API of OpenSubtitles.org to retrieve subtitles for your movies and tv shows. Just give a path to the file to Subtitler, everything else is handled by it.

Note: you will need your own user agent. More info about OpenSubtitles user agents here.

Example

Download subtitles in english for /Users/foo/Desktop/MyMovie.mp4.

import Subtitler

let s = Subtitler(lang:"en", userAgent:"OSTestUserAgent")
s.download("/Users/foo/Desktop/MyMovie.mp4") { result in
    switch result {
    case .Success(let subtitlesPath):
        // Do something with the subtitles
    case .Failure(let error):
        // Handle error
    }
}

Languages

For the languages of the subtitles, use the ISO639 code of the language.

Subtitles are downloaded to the same path where the original file is and the same name but with .srt extension. In this case, the result would be /Users/foo/Desktop/MyMovie.srt.

Requirements

  • Mac OS X 10.10+ / iOS 8.0+
  • Xcode 7
  • libz

Install with CocoaPods

Use this in your Podfile!

use_frameworks!

target 'MyApp' do
    pod 'Subtitler', '0.2.0'
end

License

Subtitler is released under the MIT license.

Latest podspec

{
    "name": "Subtitler",
    "version": "0.2.0",
    "license": "MIT",
    "summary": "Downloading subtitles in Swift",
    "homepage": "https://github.com/mvader/subtitler",
    "social_media_url": "http://twitter.com/migrrrr",
    "authors": {
        "Miguel Molina": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mvader/subtitler.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10"
    },
    "source_files": "subtitler/*.swift",
    "requires_arc": true,
    "dependencies": {
        "AlamofireXMLRPC": [],
        "GZIP": []
    }
}

Pin It on Pinterest

Share This