Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 759380 Details for
Bug 829382
Patches: media-sound/easytag-2.4.3 metadata and cddb request bugs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
CDDB patch
easytag-2.4.3-cddb.patch (text/plain), 28.22 KB, created by
rogge
on 2021-12-17 02:53:03 UTC
(
hide
)
Description:
CDDB patch
Filename:
MIME Type:
Creator:
rogge
Created:
2021-12-17 02:53:03 UTC
Size:
28.22 KB
patch
obsolete
>--- b/src/cddb_dialog.c 2016-08-30 17:31:39.000000000 +0200 >+++ a/src/cddb_dialog.c 2021-12-17 02:23:35.479421924 +0100 >@@ -813,7 +813,7 @@ > > *bytes_read_total += bytes_read; > >- //g_print("\nLine : %lu : %s\n",bytes_read,cddb_out); >+ //g_print("\nLine : %lu : %s\n",bytes_read,cddb_out); // Debugging > > // Display message > size_str = g_format_size (*bytes_read_total); >@@ -852,7 +852,7 @@ > } > > /* >- * Look up a specific album in freedb, and save to a CddbAlbum structure >+ * Look up a specific album in gnudb, and save to a CddbAlbum structure > */ > static gboolean > Cddb_Get_Album_Tracks_List (EtCDDBDialog *self, GtkTreeSelection* selection) >@@ -923,51 +923,30 @@ > if ( strstr(cddb_server_name,"gnudb") != NULL ) > { > // For gnudb >- // New version of gnudb doesn't use a cddb request, but a http request >- /* HTTP/1.0 to avoid the server returning chunked results. >- * https://bugzilla.gnome.org/show_bug.cgi?id=743812 */ >- cddb_in = g_strdup_printf("GET %s%s/gnudb/" >- "%s/%s" >- " HTTP/1.0\r\n" >- "Host: %s:%u\r\n" >- "User-Agent: %s %s\r\n" >- "%s" >- "Connection: close\r\n" >- "\r\n", >- proxy_enabled ? "http://" : "", >- proxy_enabled ? cddb_server_name : "", >- cddbalbum->category,cddbalbum->id, >- cddb_server_name,cddb_server_port, >- PACKAGE_NAME, PACKAGE_VERSION, >- (proxy_auth=Cddb_Format_Proxy_Authentification()) >- ); >- }else >+ cddb_in = g_strdup_printf("GET %s%s%s?cmd=cddb+read+" >+ "%s+%s" >+ "&hello=noname+localhost+%s+%s" >+ "&proto=6 HTTP/1.1\r\n" >+ "Host: %s:%u\r\n" >+ "%s" >+ "Connection: close\r\n\r\n", >+ proxy_enabled ? "http://" : "", >+ proxy_enabled ? cddb_server_name : "", >+ cddb_server_cgi_path, >+ cddbalbum->category,cddbalbum->id, >+ PACKAGE_NAME, PACKAGE_VERSION, >+ cddb_server_name,cddb_server_port, >+ (proxy_auth=Cddb_Format_Proxy_Authentification()) >+ ); >+ }else > { >- // CDDB Request (ex: GET /~cddb/cddb.cgi?cmd=cddb+read+jazz+0200a401&hello=noname+localhost+EasyTAG+0.31&proto=1 HTTP/1.1\r\nHost: freedb.freedb.org:80\r\nConnection: close) >- // Without proxy : "GET /~cddb/cddb.cgi?â¦" but doesn't work with a proxy. >- // With proxy : "GET http://freedb.freedb.org/~cddb/cddb.cgi?â¦" >- /* HTTP/1.0 to avoid the server returning chunked results. >- * https://bugzilla.gnome.org/show_bug.cgi?id=743812 */ >- cddb_in = g_strdup_printf("GET %s%s%s?cmd=cddb+read+" >- "%s+%s" >- "&hello=noname+localhost+%s+%s" >- "&proto=6 HTTP/1.0\r\n" >- "Host: %s:%u\r\n" >- "%s" >- "Connection: close\r\n\r\n", >- proxy_enabled ? "http://" : "", >- proxy_enabled ? cddb_server_name : "", >- cddb_server_cgi_path, >- cddbalbum->category,cddbalbum->id, >- PACKAGE_NAME, PACKAGE_VERSION, >- cddb_server_name,cddb_server_port, >- (proxy_auth=Cddb_Format_Proxy_Authentification()) >- ); >+ // No freedb anymore >+ return FALSE; > } > > > g_free(proxy_auth); >- //g_print("Request Cddb_Get_Album_Tracks_List : '%s'\n", cddb_in); >+ //g_print("Request Cddb_Get_Album_Tracks_List : '%s'\n", cddb_in); // Debugging: Printing the request > > // Send the request > gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,_("Sending requestâ¦")); >@@ -1002,27 +981,10 @@ > } > > >- // Parse server answer : Check HTTP Header (freedb or gnudb) and CDDB Header (freedb only) >+ // Parse server answer : Check HTTP Header and CDDB Header > file = NULL; >- if ( strstr(cddb_server_name,"gnudb") != NULL ) >- { >- // For gnudb (don't check CDDB header) >- if ( Cddb_Read_Http_Header(&file,&cddb_out) <= 0 ) >- { >- msg = g_strdup_printf (_("The server returned a bad response â%sâ"), >- cddb_out); >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,msg); >- Log_Print(LOG_ERROR,"%s",msg); >- g_free(msg); >- g_free(cddb_out); >- if (file) >- fclose(file); >- return FALSE; >- } >- }else >- { >- /* For freedb. */ >- if (Cddb_Read_Http_Header (&file, &cddb_out) <= 0) >+ >+ if (Cddb_Read_Http_Header (&file, &cddb_out) <= 0) > { > msg = g_strdup_printf (_("The server returned a bad response â%sâ"), > cddb_out); >@@ -1060,9 +1022,9 @@ > } > > return FALSE; >- } >- } >- g_free(cddb_out); >+ } >+ >+ g_free(cddb_out); > > } > >@@ -1070,7 +1032,7 @@ > { > if (!cddb_out) // Empty line? > continue; >- //g_print("%s\n",cddb_out); >+ //g_print("%s\n",cddb_out); // Debugging > > // To avoid the cddb lookups to hang (Patch from Paul Giordano) > /* It appears that on some systems that cddb lookups continue to attempt >@@ -1396,437 +1358,8 @@ > } > > /* >- * Fields : artist, title, track, rest >- * CDDB Categories : blues, classical, country, data, folk, jazz, misc, newage, reggae, rock, soundtrack >- */ >-static gchar * >-Cddb_Generate_Request_String_With_Fields_And_Categories_Options (EtCDDBDialog *self) >-{ >- GString *string; >- guint search_fields; >- guint search_categories; >- >- /* Init. */ >- string = g_string_sized_new (256); >- >- /* Fields. */ >- /* FIXME: Fetch cddb-search-fields "all-set" mask. */ >-#if 0 >- if (search_all_fields) >- { >- g_string_append (string, "&allfields=YES"); >- } >- else >- { >- g_string_append (string, "&allfields=NO"); >- } >-#endif >- >- search_fields = g_settings_get_flags (MainSettings, "cddb-search-fields"); >- >- if (search_fields & ET_CDDB_SEARCH_FIELD_ARTIST) >- { >- g_string_append (string, "&fields=artist"); >- } >- if (search_fields & ET_CDDB_SEARCH_FIELD_TITLE) >- { >- g_string_append (string, "&fields=title"); >- } >- if (search_fields & ET_CDDB_SEARCH_FIELD_TRACK) >- { >- g_string_append (string, "&fields=track"); >- } >- if (search_fields & ET_CDDB_SEARCH_FIELD_OTHER) >- { >- g_string_append (string, "&fields=rest"); >- } >- >- /* Categories (warning: there is one other CDDB category that is not used >- * here ("data")) */ >- search_categories = g_settings_get_flags (MainSettings, >- "cddb-search-categories"); >- g_string_append (string, "&allcats=NO"); >- >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_BLUES) >- { >- g_string_append (string, "&cats=blues"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_CLASSICAL) >- { >- g_string_append (string, "&cats=classical"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_COUNTRY) >- { >- g_string_append (string, "&cats=country"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_FOLK) >- { >- g_string_append (string, "&cats=folk"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_JAZZ) >- { >- g_string_append (string, "&cats=jazz"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_MISC) >- { >- g_string_append (string, "&cats=misc"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_NEWAGE) >- { >- g_string_append (string, "&cats=newage"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_REGGAE) >- { >- g_string_append (string, "&cats=reggae"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_ROCK) >- { >- g_string_append (string, "&cats=rock"); >- } >- if (search_categories & ET_CDDB_SEARCH_CATEGORY_SOUNDTRACK) >- { >- g_string_append (string, "&cats=soundtrack"); >- } >- >- return g_string_free (string, FALSE); >-} >- >- >-/* >- * Site FREEDB.ORG - Manual Search >- * Send request (using the HTML search page in freedb.org site) to the CD database >- * to get the list of albums matching to a string. >- */ >-static gboolean >-Cddb_Search_Album_List_From_String_Freedb (EtCDDBDialog *self) >-{ >- EtCDDBDialogPrivate *priv; >- gint socket_id; >- gchar *string = NULL; >- gchar *tmp, *tmp1; >- gchar *cddb_in; // For the request to send >- gchar *cddb_out = NULL; // Answer received >- gchar *cddb_out_tmp; >- gchar *msg; >- gchar *proxy_auth = NULL; >- gchar *cddb_server_name; >- guint cddb_server_port; >- gchar *cddb_server_cgi_path; >- gboolean proxy_enabled; >- gchar *proxy_hostname; >- guint proxy_port; >- >- gchar *ptr_cat, *cat_str, *id_str, *art_alb_str; >- gchar *art_alb_tmp = NULL; >- gboolean use_art_alb = FALSE; >- gchar *end_str; >- gchar *html_end_str; >- gchar buffer[MAX_STRING_LEN+1]; >- gint bytes_written; >- gulong bytes_read_total = 0; >- FILE *file = NULL; >- gboolean web_search_disabled = FALSE; >- >- priv = et_cddb_dialog_get_instance_private (self); >- >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,""); >- >- /* Get words to search... */ >- string = g_strdup (gtk_entry_get_text (GTK_ENTRY (priv->search_entry))); >- if (et_str_empty (string)) >- { >- return FALSE; >- } >- >- /* Format the string of words */ >- g_strstrip (string); >- /* Remove the duplicated spaces */ >- while ((tmp=strstr(string," "))!=NULL) // Search 2 spaces >- { >- tmp1 = tmp + 1; >- while (*tmp1) >- *(tmp++) = *(tmp1++); >- *tmp = '\0'; >- } >- >- /* Convert spaces to '+' */ >- while ( (tmp=strchr(string,' '))!=NULL ) >- *tmp = '+'; >- >- cddb_server_name = g_settings_get_string (MainSettings, >- "cddb-manual-search-hostname"); >- cddb_server_port = g_settings_get_uint (MainSettings, >- "cddb-manual-search-port"); >- cddb_server_cgi_path = g_settings_get_string (MainSettings, >- "cddb-manual-search-path"); >- >- /* Connection to the server */ >- proxy_enabled = g_settings_get_boolean (MainSettings, >- "cddb-proxy-enabled"); >- proxy_hostname = g_settings_get_string (MainSettings, >- "cddb-proxy-hostname"); >- proxy_port = g_settings_get_uint (MainSettings, "cddb-proxy-port"); >- if ((socket_id = Cddb_Open_Connection (self, >- proxy_enabled >- ? proxy_hostname >- : cddb_server_name, >- proxy_enabled >- ? proxy_port >- : cddb_server_port)) <= 0) >- { >- g_free (string); >- g_free (cddb_server_name); >- g_free (cddb_server_cgi_path); >- g_free (proxy_hostname); >- return FALSE; >- } >- >- /* Build request */ >- //cddb_in = g_strdup_printf("GET http://www.freedb.org/freedb_search.php?" // In this case, problem with squid cache... >- cddb_in = g_strdup_printf("GET %s%s/freedb_search.php?" >- "words=%s" >- "%s" >- "&grouping=none" >- " HTTP/1.1\r\n" >- "Host: %s:%u\r\n" >- "User-Agent: %s %s\r\n" >- "%s" >- "Connection: close\r\n" >- "\r\n", >- proxy_enabled ? "http://" : "", >- proxy_enabled ? cddb_server_name : "", >- string, >- (tmp = Cddb_Generate_Request_String_With_Fields_And_Categories_Options (self)), >- cddb_server_name,cddb_server_port, >- PACKAGE_NAME, PACKAGE_VERSION, >- (proxy_auth=Cddb_Format_Proxy_Authentification()) >- ); >- >- g_free(string); >- g_free(tmp); >- g_free(proxy_auth); >- //g_print("Request Cddb_Search_Album_List_From_String_Freedb : '%s'\n", cddb_in); >- >- // Send the request >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,_("Sending requestâ¦")); >- while (gtk_events_pending()) gtk_main_iteration(); >- if ( (bytes_written=send(socket_id,cddb_in,strlen(cddb_in)+1,0)) < 0) >- { >- Log_Print (LOG_ERROR, _("Cannot send the request â%sâ"), >- g_strerror (errno)); >- Cddb_Close_Connection (self, socket_id); >- g_free(cddb_in); >- g_free(string); >- g_free(cddb_server_name); >- g_free(cddb_server_cgi_path); >- g_free (proxy_hostname); >- return FALSE; >- } >- g_free(cddb_in); >- >- >- /* Delete previous album list. */ >- cddb_album_model_clear (self); >- cddb_track_model_clear (self); >- >- if (priv->album_list) >- { >- Cddb_Free_Album_List (self); >- } >- gtk_widget_set_sensitive (GTK_WIDGET (priv->stop_search_button), TRUE); >- >- >- /* >- * Read the answer >- */ >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,_("Receiving dataâ¦")); >- while (gtk_events_pending()) >- gtk_main_iteration(); >- >- /* Write result in a file. */ >- if (Cddb_Write_Result_To_File (self, socket_id, &bytes_read_total) < 0) >- { >- msg = g_strdup(_("The server returned a bad response")); >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,msg); >- Log_Print(LOG_ERROR,"%s",msg); >- g_free(msg); >- g_free(cddb_server_name); >- g_free(cddb_server_cgi_path); >- gtk_widget_set_sensitive(GTK_WIDGET(priv->stop_search_button),FALSE); >- return FALSE; >- } >- >- // Parse server answer : Check returned code in the first line >- if (Cddb_Read_Http_Header(&file,&cddb_out) <= 0 || !cddb_out) // Order is important! >- { >- msg = g_strdup_printf (_("The server returned a bad response â%sâ"), >- cddb_out); >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,msg); >- Log_Print(LOG_ERROR,"%s",msg); >- g_free(msg); >- g_free(cddb_out); >- g_free(cddb_server_name); >- g_free(cddb_server_cgi_path); >- g_free (proxy_hostname); >- gtk_widget_set_sensitive(GTK_WIDGET(priv->stop_search_button),FALSE); >- if (file) >- fclose(file); >- return FALSE; >- } >- g_free(cddb_out); >- >- // Read other lines, and get list of matching albums >- // Composition of a line : >- // - freedb.org >- // <a href="http://www.freedb.org/freedb_search_fmt.php?cat=rock&id=8c0f0a0b">Bob Dylan / MTV Unplugged</a><br> >- cat_str = g_strdup("http://www.freedb.org/freedb_search_fmt.php?cat="); >- id_str = g_strdup("&id="); >- art_alb_str = g_strdup("\">"); >- end_str = g_strdup("</a>"); //"</a><br>"); >- html_end_str = g_strdup("</body>"); // To avoid the cddb lookups to hang >- while (!priv->stop_searching && Cddb_Read_Line (&file, &cddb_out) > 0) >- { >- cddb_out_tmp = cddb_out; >- //g_print("%s\n",cddb_out); // To print received data >- >- // If the web search is disabled! (ex : http://www.freedb.org/modules.php?name=News&file=article&sid=246) >- // The following string is displayed in the search page >- if (cddb_out != NULL && strstr(cddb_out_tmp,"Sorry, The web-based search is currently down.") != NULL) >- { >- web_search_disabled = TRUE; >- break; >- } >- >- // We may have severals album in the same line (other version of the same album?) >- // Note : we test that the 'end' delimiter exists to avoid crashes >- while ( cddb_out != NULL && (ptr_cat=strstr(cddb_out_tmp,cat_str)) != NULL && strstr(cddb_out_tmp,end_str) != NULL ) >- { >- gchar *ptr_font, *ptr_font1; >- gchar *ptr_id, *ptr_art_alb, *ptr_end; >- gchar *copy; >- CddbAlbum *cddbalbum; >- >- cddbalbum = g_slice_new0 (CddbAlbum); >- >- >- // Parameters of the server used >- cddbalbum->server_name = g_strdup(cddb_server_name); >- cddbalbum->server_port = cddb_server_port; >- cddbalbum->server_cgi_path = g_strdup(cddb_server_cgi_path); >- cddbalbum->bitmap = Cddb_Get_Pixbuf_From_Server_Name(cddbalbum->server_name); >- >- // Get album category >- cddb_out_tmp = ptr_cat + strlen(cat_str); >- strncpy(buffer,cddb_out_tmp,MAX_STRING_LEN); >- if ( (ptr_id=strstr(buffer,id_str)) != NULL ) >- *ptr_id = 0; >- cddbalbum->category = Try_To_Validate_Utf8_String(buffer); >- >- >- // Get album ID >- //cddb_out_tmp = strstr(cddb_out_tmp,id_str) + strlen(id_str); >- cddb_out_tmp = ptr_cat + strlen(cat_str) + 2; >- strncpy(buffer,cddb_out_tmp,MAX_STRING_LEN); >- if ( (ptr_art_alb=strstr(buffer,art_alb_str)) != NULL ) >- *ptr_art_alb = 0; >- cddbalbum->id = Try_To_Validate_Utf8_String(buffer); >- >- >- // Get album and artist names. >- // Note : some names can be like this "<font size=-1>2</font>" (for other version of the same album) >- cddb_out_tmp = strstr(cddb_out_tmp,art_alb_str) + strlen(art_alb_str); >- strncpy(buffer,cddb_out_tmp,MAX_STRING_LEN); >- if ( (ptr_end=strstr(buffer,end_str)) != NULL ) >- *ptr_end = 0; >- if ( (ptr_font=strstr(buffer,"</font>")) != NULL ) >- { >- copy = NULL; >- *ptr_font = 0; >- if ( (ptr_font1=strstr(buffer,">")) != NULL ) >- { >- copy = g_strdup_printf("%s -> %s",ptr_font1+1,art_alb_tmp); >- cddbalbum->other_version = TRUE; >- }else >- { >- copy = g_strdup(buffer); >- } >- >- }else >- { >- copy = g_strdup(buffer); >- art_alb_tmp = cddbalbum->artist_album; >- use_art_alb = TRUE; >- } >- >- cddbalbum->artist_album = Try_To_Validate_Utf8_String(copy); >- g_free(copy); >- >- if (use_art_alb) >- { >- art_alb_tmp = cddbalbum->artist_album; >- use_art_alb = FALSE; >- } >- >- >- // New position the search the next string >- cddb_out_tmp = strstr(cddb_out_tmp,end_str) + strlen(end_str); >- >- priv->album_list = g_list_append(priv->album_list,cddbalbum); >- } >- >- // To avoid the cddb lookups to hang (Patch from Paul Giordano) >- /* It appears that on some systems that cddb lookups continue to attempt >- * to get data from the socket even though the other system has completed >- * sending. Here we see if the actual end of data is in the last block read. >- * In the case of the html scan, the </body> tag is used because there's >- * no crlf followint the </html> tag. >- */ >- if (strstr(cddb_out_tmp,html_end_str)!=NULL) >- { >- g_free(cddb_out); >- break; >- } >- g_free(cddb_out); >- } >- g_free(cat_str); g_free(id_str); g_free(art_alb_str); g_free(end_str); g_free(html_end_str); >- g_free(cddb_server_name); >- g_free(cddb_server_cgi_path); >- g_free (proxy_hostname); >- >- // Close file opened for reading lines >- if (file) >- { >- fclose(file); >- file = NULL; >- } >- >- gtk_widget_set_sensitive(GTK_WIDGET(priv->stop_search_button),FALSE); >- >- /* Close connection. */ >- Cddb_Close_Connection (self, socket_id); >- >- if (web_search_disabled) >- msg = g_strdup_printf(_("Sorry, the web-based search is currently not available")); >- else >- { >- msg = g_strdup_printf (ngettext ("Found one matching album", >- "Found %u matching albums", >- g_list_length (priv->album_list)), >- g_list_length (priv->album_list)); >- } >- >- gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,msg); >- g_free(msg); >- >- /* Load the albums found in the list. */ >- Cddb_Load_Album_List (self, FALSE); >- >- return TRUE; >-} >- >-/* > * Site GNUDB.ORG - Manual Search >- * Send request (using the HTML search page in freedb.org site) to the CD database >+ * Send request (using the HTML search page in gnudb.org site) to the CD database > * to get the list of albums matching to a string. > */ > static gboolean >@@ -1937,21 +1470,20 @@ > "?page=%d" > " HTTP/1.1\r\n" > "Host: %s:%u\r\n" >- "User-Agent: %s %s\r\n" >+ //"User-Agent: %s %s\r\n" > "%s" >- "Connection: close\r\n" >- "\r\n", >+ "Connection: close\r\n\r\n", > proxy_enabled ? "http://" : "", > proxy_enabled ? cddb_server_name : "", > string, > next_page_cpt, > cddb_server_name,cddb_server_port, >- PACKAGE_NAME, PACKAGE_VERSION, >+ //PACKAGE_NAME, PACKAGE_VERSION, > (proxy_auth=Cddb_Format_Proxy_Authentification()) > ); > next_page_found = FALSE; > g_free(proxy_auth); >- //g_print("Request Cddb_Search_Album_List_From_String_Gnudb : '%s'\n", cddb_in); >+ //g_print("Request Cddb_Search_Album_List_From_String_Gnudb : '%s'\n", cddb_in); // Debugging: Printing the request > > // Send the request > gtk_statusbar_push(GTK_STATUSBAR(priv->status_bar),priv->status_bar_context,_("Sending requestâ¦")); >@@ -2029,8 +1561,8 @@ > // Read other lines, and get list of matching albums > // Composition of a line : > // - gnudb.org >- // <a href="http://www.gnudb.org/cd/ro21123813"><b>Indochine / Le Birthday Album</b></a><br> >- cat_str = g_strdup("http://www.gnudb.org/cd/"); >+ // <a href="https://gnudb.org/cd/ro21123813"><b>Indochine / Le Birthday Album</b></a><br> >+ cat_str = g_strdup("https://gnudb.org/cd/"); > art_alb_str = g_strdup("\"><b>"); > end_str = g_strdup("</b></a>"); //"</a><br>"); > html_end_str = g_strdup("</body>"); // To avoid the cddb lookups to hang >@@ -2042,7 +1574,7 @@ > while (!priv->stop_searching && Cddb_Read_Line (&file, &cddb_out) > 0) > { > cddb_out_tmp = cddb_out; >- //g_print("%s\n",cddb_out); // To print received data >+ g_print("%s\n",cddb_out); // To print received data > > // Line that displays the number of total albums return by the search > if ( cddb_out != NULL >@@ -2067,7 +1599,9 @@ > cddbalbum = g_slice_new0 (CddbAlbum); > > // Parameters of the server used >- cddbalbum->server_name = g_strdup(cddb_server_name); >+ //cddbalbum->server_name = g_strdup(cddb_server_name); // This is not working right now: cddb requests on www.gnudb.org resulting in 404 >+ cddbalbum->server_name = g_settings_get_string (MainSettings, >+ "cddb-automatic-search-hostname"); > cddbalbum->server_port = cddb_server_port; > cddbalbum->server_cgi_path = g_strdup(cddb_server_cgi_path); > cddbalbum->bitmap = Cddb_Get_Pixbuf_From_Server_Name(cddbalbum->server_name); >@@ -2188,7 +1722,6 @@ > > /* > * Select the function to use according the server adress for the manual search >- * - freedb.freedb.org > * - gnudb.gnudb.org > */ > static gboolean >@@ -2205,9 +1738,8 @@ > } > else > { >- /* Use freedb. */ >- g_free (hostname); >- return Cddb_Search_Album_List_From_String_Freedb (self); >+ /* False */ >+ return FALSE; > } > } > >@@ -3174,7 +2706,7 @@ > * Remote cddb acces > * > * Request the two servers >- * - 1) www.freedb.org >+ * - 1) www.gnudb.org > * - 2) MusicBrainz Gateway : freedb.musicbrainz.org (in Easytag < 2.1.1, it was: www.mb.inhouse.co.uk) > */ > while (server_try < 2) >@@ -3230,7 +2762,7 @@ > return FALSE; > } > >- // CDDB Request (ex: GET /~cddb/cddb.cgi?cmd=cddb+query+0800ac01+1++150+172&hello=noname+localhost+EasyTAG+0.31&proto=1 HTTP/1.1\r\nHost: freedb.freedb.org:80\r\nConnection: close) >+ // CDDB Request GNUDB (ex: GET /~cddb/cddb.cgi?cmd=cddb+query+0800ac01+1++150+172&hello=noname+localhost+EasyTAG+2.4.3&proto=6 HTTP/1.1\r\nHost: freedb.freedb.org:80\r\nConnection: close) > // Without proxy : "GET /~cddb/cddb.cgi?â¦" but doesn't work with a proxy. > // With proxy : "GET http://freedb.freedb.org/~cddb/cddb.cgi?â¦" > // proto=1 => ISO-8859-1 - proto=6 => UTF-8 >@@ -3250,11 +2782,11 @@ > num_tracks, query_string->str, > disc_length, > PACKAGE_NAME, PACKAGE_VERSION, >- cddb_server_name,cddb_server_port, >+ cddb_server_name,cddb_server_port, > (proxy_auth=Cddb_Format_Proxy_Authentification()) > ); >- g_free (proxy_auth); >- //g_print("Request Cddb_Search_Album_From_Selected_Files : '%s'\n", cddb_in); >+ g_free (proxy_auth); >+ //g_print("Request Cddb_Search_Album_From_Selected_Files : '%s'\n", cddb_in); // Debugging: Printing the request > > msg = g_strdup_printf (_("Sending request (disc ID: %s, #tracks: %u, Disc length: %u)â¦"), > cddb_discid, num_tracks, disc_length); >@@ -3328,7 +2860,7 @@ > > /* > * Format : >- * For Freedb, Gnudb, the lines to read are like : >+ * For Gnudb, the lines to read are like : > * 211 Found inexact matches, list follows (until terminating `.') > * rock 8f0dc00b Archive / Noise > * rock 7b0dd80b Archive / Noise >@@ -3470,10 +3002,7 @@ > { > g_return_val_if_fail (server_name != NULL, NULL); > >- if (strstr (server_name, "freedb.org")) >- return gdk_pixbuf_new_from_resource ("/org/gnome/EasyTAG/images/freedb.png", >- NULL); >- else if (strstr(server_name,"gnudb.org")) >+ if (strstr(server_name,"gnudb.org")) > return gdk_pixbuf_new_from_resource ("/org/gnome/EasyTAG/images/gnudb.png", > NULL); > else if (strstr(server_name,"musicbrainz.org"))
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 829382
: 759380 |
759381
|
759382
|
759383