[rhythmbox/sam/lastfm-uri-fix] audioscrobbler: Don't break https:// URLS



commit f39f5437189ddbc438e662414c92c748adcb733e
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Dec 15 22:12:30 2018 +0100

    audioscrobbler: Don't break https:// URLS
    
    These days last.fm APIs return us https:// URLs, however, the code to
    open these links was turning them into http://https:// URLs. This
    resulted in them not working at all.

 plugins/audioscrobbler/rb-audioscrobbler-profile-page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c 
b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
index 9e6bca0e5..15a20af85 100644
--- a/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
+++ b/plugins/audioscrobbler/rb-audioscrobbler-profile-page.c
@@ -1737,7 +1737,7 @@ list_item_view_url_activated_cb (GtkMenuItem *menuitem,
        data = g_hash_table_lookup (page->priv->popup_menu_to_data_map, menu);
 
        /* some urls are given to us without the http:// prefix */
-       if (g_str_has_prefix (data->url, "http://";) == TRUE) {
+       if (g_str_has_prefix (data->url, "http://";) || g_str_has_prefix (data->url, "https://";)) {
                gtk_show_uri (NULL, data->url, GDK_CURRENT_TIME, NULL);
        } else {
                char *url;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]