Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Still more database changes

  • Loading branch information...
commit 3aa58d29423ee7b6b068ae9dec87174fbefc13ab 1 parent fcee359
@mpesce authored
Showing with 3 additions and 4 deletions.
  1. +2 −2 plex2vcard.py
  2. +1 −2  vcard2plex.py
View
4 plex2vcard.py
@@ -31,7 +31,7 @@ def makevcard(first, last, uid, connections):
#print connections
con_list = []
for con in connections:
- mbr = { "type": con[0], "service": con[1], con[2][0][0]: con[2][0][1] }
+ mbr = { "type": con[0], "service": con[1], "credential": con[2] }
con_list.append(mbr)
conpart = { "connections": con_list }
if (len(first) > 0):
@@ -73,7 +73,7 @@ def plex2vcards():
friend_connections = curs.fetchall()
for each_connection in friend_connections:
#print ' %s %s %s' % (each_connection[1], each_connection[2], each_connection[3])
- cons.append([each_connection[1], each_connection[2], json.loads(each_connection[3])])
+ cons.append([each_connection[1], each_connection[2], each_connection[3]])
vcard = makevcard(friend_firstname, friend_lastname, friend_uid, cons)
#print vcard
if (len(retval) == 0):
View
3  vcard2plex.py
@@ -47,7 +47,6 @@ def vcards2plex(a_file):
# cat input.vcards | python vcard2plex.py
#
if __name__ == "__main__":
- print 'This is broken right now.'
- return
+ #print 'This is broken right now.'
the_file = sys.stdin
vcards2plex(the_file)
Please sign in to comment.
Something went wrong with that request. Please try again.