f-spot r4245 - in trunk/dpap-sharp: . DPAPBrowser lib
- From: apart svn gnome org
- To: svn-commits-list gnome org
- Subject: f-spot r4245 - in trunk/dpap-sharp: . DPAPBrowser lib
- Date: Tue, 12 Aug 2008 13:15:49 +0000 (UTC)
Author: apart
Date: Tue Aug 12 13:15:49 2008
New Revision: 4245
URL: http://svn.gnome.org/viewvc/f-spot?rev=4245&view=rev
Log:
Fixing broken queries
Modified:
trunk/dpap-sharp/ChangeLog
trunk/dpap-sharp/DPAPBrowser/DPAPBrowser.cs
trunk/dpap-sharp/lib/Database.cs
trunk/dpap-sharp/lib/Server.cs
Modified: trunk/dpap-sharp/DPAPBrowser/DPAPBrowser.cs
==============================================================================
--- trunk/dpap-sharp/DPAPBrowser/DPAPBrowser.cs (original)
+++ trunk/dpap-sharp/DPAPBrowser/DPAPBrowser.cs Tue Aug 12 13:15:49 2008
@@ -102,14 +102,9 @@
Directory.CreateDirectory ("/tmp/" + client.Databases [0].Name + "/" + alb.Name);
foreach (DPAP.Photo ph in alb.Photos)
- {
if (ph != null)
- {
- // Console.WriteLine ("\t\tFile: " + ph.Title + " format = " + ph.Format + "size=" + ph.Width +"x" +ph.Height + " ID=" + ph.Id);
d.DownloadPhoto (ph,"/tmp/" + client.Databases [0].Name + "/" + alb.Name + "/" + ph.FileName);
- //FSpot.JpegFile = new JpegFile ("file:///tmp/" + client.Databases [0].Name + "/" + ph.FileName);
- }
- }
+
FSpot.Core.FindInstance ().View ("file:///tmp/" + client.Databases [0].Name + "/" + alb.Name);
break;
}
Modified: trunk/dpap-sharp/lib/Database.cs
==============================================================================
--- trunk/dpap-sharp/lib/Database.cs (original)
+++ trunk/dpap-sharp/lib/Database.cs Tue Aug 12 13:15:49 2008
@@ -373,13 +373,13 @@
Photo existing = LookupPhotoById (photo.Id);
pl.AddPhoto (photo);
if (existing == null){
- // Console.WriteLine ("adding " + photo.Title + " to album " +pl.Name);
+ Console.WriteLine ("adding " + photo.Title + " to album " +pl.Name);
AddPhoto (photo);
}
else
{
- // Console.WriteLine ("updating " + existing.Title);
+ Console.WriteLine ("updating " + existing.Title);
existing.Update (photo);
}
}
@@ -416,7 +416,7 @@
private HttpWebResponse FetchPhoto (Photo photo, long offset) {
return client.Fetcher.FetchResponse (String.Format ("/databases/{0}/items",id), offset,
- String.Format ("meta=dpap.filedata&query= ('dmap.itemid:{0}')",photo.Id),
+ String.Format ("meta=dpap.filedata&query=('dmap.itemid:{0}')",photo.Id),
null, 1, true);
}
@@ -477,7 +477,7 @@
}*/
// maybe use FetchResponse to get a stream and feed it to pixbuf?
byte [] photos_data = client.Fetcher.Fetch (String.Format ("/databases/{0}/items",id),
- String.Format ("meta=dpap.filedata&query= ('dmap.itemid:{0}')",photo.Id));
+ String.Format ("meta=dpap.filedata&query=('dmap.itemid:{0}')",photo.Id));
ContentNode node = ContentParser.Parse (client.Bag, photos_data);
// DEBUG
Modified: trunk/dpap-sharp/lib/Server.cs
==============================================================================
--- trunk/dpap-sharp/lib/Server.cs (original)
+++ trunk/dpap-sharp/lib/Server.cs Tue Aug 12 13:15:49 2008
@@ -440,11 +440,11 @@
internal static readonly TimeSpan DefaultTimeout = TimeSpan.FromMinutes (30);
- private static Regex dbItemsRegex = new Regex ("/databases/ ( [0-9]*?)/items$");
- private static Regex dbPhotoRegex0 = new Regex ("/databases/ ( [0-9]*?)/items$");
- private static Regex dbPhotoRegex = new Regex (".*'dmap.itemid: ( [0-9]*)'.*");
- private static Regex dbContainersRegex = new Regex ("/databases/ ( [0-9]*?)/containers$");
- private static Regex dbContainerItemsRegex = new Regex ("/databases/ ( [0-9]*?)/containers/ ( [0-9]*?)/items$");
+ private static Regex dbItemsRegex = new Regex ("/databases/([0-9]*?)/items$");
+ private static Regex dbPhotoRegex0 = new Regex ("/databases/([0-9]*?)/items$");
+ private static Regex dbPhotoRegex = new Regex (".*'dmap.itemid:([0-9]*)'.*");
+ private static Regex dbContainersRegex = new Regex ("/databases/([0-9]*?)/containers$");
+ private static Regex dbContainerItemsRegex = new Regex ("/databases/([0-9]*?)/containers/([0-9]*?)/items$");
private WebServer ws;
private ArrayList databases = new ArrayList ();
@@ -831,6 +831,7 @@
try {
ws.WriteResponseStream (client, photoStream, photoLength);
} catch (IOException) {
+ Console.WriteLine("IOException!");
}
} else {
Console.WriteLine ("Else - internal error");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]