The branch, frodo has been updated
via 79802c0d707500cd1afb5dd6b4c8279d75ed2bc1 (commit)
from e350fcd4144723dcaf21b0b3b00f0ad2d242380c (commit)
- Log -----------------------------------------------------------------
http://xbmc.git.sourceforge.net/git/gitweb.cgi?p=xbmc/scripts;a=commit;h=79802c0d707500cd1afb5dd6b4c8279d75ed2bc1
commit 79802c0d707500cd1afb5dd6b4c8279d75ed2bc1
Author: Martijn Kaijser <[email protected]>
Date: Wed Mar 5 13:12:22 2014 +0100
[script.evernote] 0.4.0
diff --git a/script.evernote/addon.xml b/script.evernote/addon.xml
index e839688..1341f17 100644
--- a/script.evernote/addon.xml
+++ b/script.evernote/addon.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<addon id="script.evernote" name="X-Note (Evernote)" version="0.3.1"
provider-name="Rick Phillips (ruuk)">
+<addon id="script.evernote" name="X-Note (Evernote)" version="0.4.0"
provider-name="Rick Phillips (ruuk)">
<requires>
<import addon="xbmc.python" version="2.1.0" />
<import addon="script.web.viewer" version="0.9.4" />
+ <import addon="script.module.oauth2" version="1.5.211" />
</requires>
<extension point="xbmc.python.script" library="lib/xnote.py">
diff --git a/script.evernote/changelog.txt b/script.evernote/changelog.txt
index f3b4774..0084c36 100644
--- a/script.evernote/changelog.txt
+++ b/script.evernote/changelog.txt
@@ -3,7 +3,12 @@ X-Note Changelog
TODO:
Add an option to view public notebook URLs
-Current Version : 0.3.1
+Current Version : 0.4.0
+
+*** 0.4.0 ***
+
+Remove internal oauth2
+Reduce logging
*** 0.3.1 ***
diff --git a/script.evernote/lib/xnote.py b/script.evernote/lib/xnote.py
index 492c76d..04f6ad9 100644
--- a/script.evernote/lib/xnote.py
+++ b/script.evernote/lib/xnote.py
@@ -113,26 +113,22 @@ class EvernoteSession():
def authenticate(self):
LOG('Authenticating')
import urlparse, urllib
- LOG('1')
oauth = self.getOAuth()
- LOG('2')
client = self.getOAuthClient(oauth)
- LOG('3')
resp, content = client.request(self.request_token_url +
'?oauth_callback='+ urllib.quote(self.callback_url), "POST")
- LOG('4')
- LOG(resp['status'])
+ #LOG(resp['status'])
if resp['status'] != '200':
LOG(repr(content))
raise Exception("Invalid response %s." % resp['status'])
request_token = dict(urlparse.parse_qsl(content))
- print "Request Token:"
- print " - oauth_token = %s" %
request_token['oauth_token']
- print " - oauth_token_secret = %s" %
request_token['oauth_token_secret']
+ #print "Request Token:"
+ #print " - oauth_token = %s" %
request_token['oauth_token']
+ #print " - oauth_token_secret = %s" %
request_token['oauth_token_secret']
auth_url = "%s?oauth_token=%s" % (self.authorize_url,
request_token['oauth_token'])
token_url = self.webwiewer(auth_url)
- LOG('AUTH RESPONSE URL: ' + str(token_url))
+ #LOG('AUTH RESPONSE URL: ' + str(token_url))
if not token_url: return None
self._tempToken = self.authPart2(oauth,token_url,request_token)
return self._tempToken
@@ -216,7 +212,7 @@ class EvernoteSession():
self.user = self.userStore.getUser(self.authToken)
LOG("Authentication was successful for %s" % self.user.username)
- LOG("Authentication token = %s" % self.authToken)
+ #LOG("Authentication token = %s" % self.authToken)
#noteStoreUri = self.noteStoreUriBase + self.user.shardId
noteStoreUri = self.userStore.getNoteStoreUrl(self.authToken)
@@ -1364,10 +1360,10 @@ class XNoteSession():
item = self.getFocusedItem(125)
content = item.getProperty('content')
if content:
- LOG('Note Changed - Cached Content')
+ #LOG('Note Changed - Cached Content')
return
- else:
- LOG('Note Changed')
+# else:
+# LOG('Note Changed')
t =
self.window.getThread(self.getNote,finishedCallback=self.updateNote,wait=True)
t.setArgs(callback=t.progressCallback,donecallback=t.finishedCallback)
t.start()
@@ -1381,10 +1377,10 @@ class XNoteSession():
self.updatingNote = guid
time.sleep(0.5)
if self.updatingNote and not self.updatingNote == guid:
- LOG('getNote() interrupted by another call')
+ #LOG('getNote() interrupted by another call')
return
self.updatingNote = None
- LOG('Updating Note: %s' % guid)
+ #LOG('Updating Note: %s' % guid)
note = None
try:
note = self.esession.getNoteByGuid(guid,nbguid)
@@ -1408,12 +1404,12 @@ class XNoteSession():
item = self.getFocusedItem(125)
guid = item.getProperty('guid')
if not note.guid == guid:
- LOG('updateNote(): Wrong Note - finding correct
item...')
+ #LOG('updateNote(): Wrong Note - finding correct
item...')
item = self.findNoteItem(note.guid)
if not item:
LOG('updateNote(): item not found - abort')
return
- LOG('Updated Changed Note: %s' % guid)
+ #LOG('Updated Changed Note: %s' % guid)
content = self.prepareContentForWebviewer(note.content)
content, title = self.htmlconverter.htmlToDisplay(content)
#@UnusedVariable
item.setProperty('content',content or " ")
-----------------------------------------------------------------------
Summary of changes:
script.evernote/addon.xml | 3 ++-
script.evernote/changelog.txt | 7 ++++++-
script.evernote/lib/xnote.py | 30 +++++++++++++-----------------
3 files changed, 21 insertions(+), 19 deletions(-)
hooks/post-receive
--
Scripts
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Xbmc-addons mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xbmc-addons