changeset 776:8366ad444313 trunk

[svn] - by unknown reason, http connection via proxy server needs a transfer stop after tag retrieving.
author yaz
date Sat, 03 Mar 2007 17:36:01 -0800
parents a24cc8848b9a
children 13bb2cf2f9e6
files ChangeLog src/madplug/input.c
diffstat 2 files changed, 16 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sat Mar 03 05:55:23 2007 -0800
+++ b/ChangeLog	Sat Mar 03 17:36:01 2007 -0800
@@ -1,3 +1,11 @@
+2007-03-03 13:55:23 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
+  revision [1648]
+  - with fixed curl, read id3 tag over network works now.
+  
+  trunk/src/madplug/input.c |   10 +++-------
+  1 file changed, 3 insertions(+), 7 deletions(-)
+
+
 2007-03-03 13:34:23 +0000  Yoshiki Yazawa <yaz@cc.rim.or.jp>
   revision [1646]
   - fread() should return number of items.
--- a/src/madplug/input.c	Sat Mar 03 05:55:23 2007 -0800
+++ b/src/madplug/input.c	Sat Mar 03 17:36:01 2007 -0800
@@ -352,6 +352,7 @@
 {
     gchar *string = NULL;
     TitleInput *title_input;
+    glong curpos;
 
 #ifdef DEBUG
     g_message("f: input_read_tag");
@@ -363,8 +364,10 @@
     else
         title_input = info->tuple;
 
-    if(info->infile)
+    if(info->infile) {
+        curpos = vfs_ftell(info->infile);
         info->id3file = id3_file_vfsopen(info->infile, ID3_FILE_MODE_READONLY);
+    }
     else
         info->id3file = id3_file_open(info->filename, ID3_FILE_MODE_READONLY);
 
@@ -432,6 +435,10 @@
     info->title = xmms_get_titlestring(audmad_config.title_override == TRUE ?
         audmad_config.id3_format : xmms_get_gentitle_format(), title_input);
 
+    // for connection via proxy, we have to stop transfer once. I can't explain the reason.
+    vfs_fseek(info->infile, -1, SEEK_SET); // impossible request
+    vfs_fseek(info->infile, curpos, SEEK_SET);
+    
 #ifdef DEBUG
     g_message("e: input_read_tag");
 #endif