~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/parsers/ns_media.c

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/**
2
2
 * @file ns_media.c  Yahoo media namespace support
3
3
 *
4
 
 * Copyright (C) 2007-2009 Lars Lindner <lars.lindner@gmail.com>
 
4
 * Copyright (C) 2007-2010 Lars Lindner <lars.lindner@gmail.com>
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or modify
7
7
 * it under the terms of the GNU General Public License as published by
60
60
        if (!xmlStrcmp(cur->name, BAD_CAST"content")) {
61
61
                tmp = xml_get_attribute (cur, "url");
62
62
                if (tmp) {
63
 
                        /* the following code is duplicated from rss_item.c! */         
 
63
                        /* the following code is duplicated from rss_item.c! */
 
64
                        const gchar *feedURL = subscription_get_homepage (ctxt->subscription);
 
65
                        
64
66
                        gchar *type = xml_get_attribute (cur, "type");
65
67
                        gchar *lengthStr = xml_get_attribute (cur, "length");
66
68
                        gchar *medium = xml_get_attribute (cur, "medium");
67
69
                        gssize length = 0;
68
70
                        if (lengthStr)
69
71
                                length = atol (lengthStr);
70
 
                                        
71
 
                        if ((strstr (tmp, "://") == NULL) &&
72
 
                            (ctxt->feed->htmlUrl != NULL) &&
73
 
                            (ctxt->feed->htmlUrl[0] != '|') &&
74
 
                            (strstr (ctxt->feed->htmlUrl, "://") != NULL)) {
 
72
                        
 
73
                        if ((strstr (tmp, "://") == NULL) && feedURL && (feedURL[0] != '|') &&
 
74
                            (strstr (feedURL, "://") != NULL)) {
75
75
                                /* add base URL if necessary and possible */
76
 
                                 tmp2 = g_strdup_printf ("%s/%s", ctxt->feed->htmlUrl, tmp);
 
76
                                 tmp2 = g_strdup_printf ("%s/%s", feedURL, tmp);
77
77
                                 g_free (tmp);
78
78
                                 tmp = tmp2;
79
79
                        }