1
0

Merge remote branch 'gallery3-contrib/master'

This commit is contained in:
rWatcher 2011-11-09 17:59:05 -05:00
commit 7aae256e95
4 changed files with 21 additions and 4 deletions

View File

@ -22,7 +22,16 @@ __all__ = ['Album' , 'Image' , 'LocalImage' , 'RemoteImage' , 'LocalMovie' ,
'RemoteMovie' , 'getItemFromResp' , 'getItemsFromResp']
from datetime import datetime
import json , weakref , types , os , mimetypes , re
import weakref , types , os , mimetypes , re
try:
import json
except:
try:
import simplejson
except ImportError , e:
raise ImportError('You must have either the "json" or "simplejson"'
'library installed!')
class BaseRemote(object):
def __init__(self , respObj , weakGalObj , weakParent=None):

View File

@ -26,7 +26,15 @@ from G3Items import getItemFromResp , getItemsFromResp , BaseRemote , Album , \
RemoteImage , Tag
from urllib import quote , urlencode
from uuid import uuid4
import urllib2 , os , json
import urllib2 , os
try:
import json
except:
try:
import simplejson
except ImportError , e:
raise ImportError('You must have either the "json" or "simplejson"'
'library installed!')
class Gallery3(object):
"""
@ -129,7 +137,6 @@ class Gallery3(object):
uri(str) : The uri string defining the resource on the defined host
"""
url = self._buildUrl(uri , kwargs)
print url
return self.getRespFromUrl(url)
def addAlbum(self , parent , albumName , title , description=''):

View File

@ -21,4 +21,4 @@
from G3Items import *
from Gallery3 import *
__version__ = '0.1.4'
__version__ = '0.1.5'

View File

@ -34,6 +34,7 @@ class WebDAV_Controller extends Controller {
$server->setBaseUri(url::site("webdav/gallery"));
// $server->addPlugin($lock);
$server->addPlugin($filter);
$server->addPlugin(new Sabre_DAV_Browser_GuessContentType());
if ($this->_authenticate()) {
$server->exec();