----------------Start of file --------------
import urllib,urllib2,sys,re,xbmcplugin,xbmcgui,xbmcaddon,xbmc,os
import datetime
import time
PLUGIN='plugin.video.expattv'
ADDON = xbmcaddon.Addon(id=PLUGIN)
swf='swfUrl=http://www.filmon.com/tv/modules/FilmOnTV/files/flashapp/filmon/FilmonPlayer.swf?v=4'
iconimage='http://static.filmon.com/couch/channels/%s/extra_big_logo.png'
from hashlib import md5
api ='http://www.filmon.com/api/'
[B][U]if ADDON.getSetting('user')=='':
dialog = xbmcgui.Dialog()
xbmcgui.Dialog().ok('ExPat','Now ExPat Needs Your FilmOn User Details To Work','The Next Screen Will Get You To Input These','If You Havent Got A Filmon Account Sign Up')
if ADDON.getSetting('user')=='':
search_entered = ''
keyboard = xbmc.Keyboard(search_entered, 'Please Enter Email Address')
keyboard.doModal()
if keyboard.isConfirmed():
search_entered = keyboard.getText()
ADDON.setSetting('user',search_entered)
if ADDON.getSetting('pass')=='':
search_entered = ''
keyboard = xbmc.Keyboard(search_entered, 'Please Enter Password')
keyboard.doModal()
if keyboard.isConfirmed():
search_entered = keyboard.getText()
ADDON.setSetting('pass',search_entered)
[/U][/B]
user=ADDON.getSetting('user')
passs=ADDON.getSetting('pass')
password = md5(passs).hexdigest()
---------------- rest of file ----------------