2012-07-23 06:58:36 +00:00
|
|
|
// OpenSubtitles
|
|
|
|
console.print('Enter OpenSubtitles username: ')
|
|
|
|
def osdbUser = console.readLine()
|
|
|
|
console.print('Enter OpenSubtitles password: ')
|
|
|
|
def osdbPwd = console.readLine()
|
|
|
|
|
|
|
|
|
|
|
|
setLogin('osdb.user', osdbUser, osdbPwd)
|
|
|
|
|
|
|
|
|
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
import net.sourceforge.filebot.*
|
|
|
|
|
2013-03-12 04:42:00 +00:00
|
|
|
if (osdbUser) {
|
|
|
|
console.print('Testing OpenSubtitles... ')
|
|
|
|
WebServices.OpenSubtitles.setUser(osdbUser, osdbPwd)
|
|
|
|
WebServices.OpenSubtitles.login()
|
|
|
|
console.println('OK')
|
|
|
|
}
|
|
|
|
|
2012-07-23 06:58:36 +00:00
|
|
|
/* --------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
def setLogin(key, user, pwd) {
|
|
|
|
Settings.forPackage(WebServices.class).put(key, [user, pwd].join(':'))
|
|
|
|
}
|