Hello community,

here is the log from the commit of package totem-pl-parser for openSUSE:Factory 
checked in at 2018-08-03 12:31:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/totem-pl-parser (Old)
 and      /work/SRC/openSUSE:Factory/.totem-pl-parser.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "totem-pl-parser"

Fri Aug  3 12:31:20 2018 rev:78 rq:626767 version:3.26.1+20180713.b7f36dd

Changes:
--------
--- /work/SRC/openSUSE:Factory/totem-pl-parser/totem-pl-parser.changes  
2018-06-22 13:27:35.907915162 +0200
+++ /work/SRC/openSUSE:Factory/.totem-pl-parser.new/totem-pl-parser.changes     
2018-08-03 12:31:24.119046168 +0200
@@ -1,0 +2,10 @@
+Sat Jul 28 10:31:09 UTC 2018 - [email protected]
+
+- Update to version 3.26.1+20180713.b7f36dd:
+  + build: Add CI
+  + podcast: Remove GMIME dependency
+- Drop pkgconfig(gmime-3.0) BuildRequires and stop passing
+  disable-gmime-i-know-what-im-doing=false to meson: No longer
+  needed after upstream changes.
+
+-------------------------------------------------------------------

Old:
----
  totem-pl-parser-3.26.1+20180614.d22b155.tar.xz

New:
----
  totem-pl-parser-3.26.1+20180713.b7f36dd.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ totem-pl-parser.spec ++++++
--- /var/tmp/diff_new_pack.aVeWUc/_old  2018-08-03 12:31:24.507046739 +0200
+++ /var/tmp/diff_new_pack.aVeWUc/_new  2018-08-03 12:31:24.511046745 +0200
@@ -18,7 +18,7 @@
 
 %define sover   18
 Name:           totem-pl-parser
-Version:        3.26.1+20180614.d22b155
+Version:        3.26.1+20180713.b7f36dd
 Release:        0
 Summary:        A GObject-based library to parse playlist formats
 License:        LGPL-2.0-or-later AND GPL-2.0-or-later
@@ -33,7 +33,6 @@
 BuildRequires:  pkgconfig
 BuildRequires:  translation-update-upstream
 BuildRequires:  pkgconfig(glib-2.0) >= 2.31.0
-BuildRequires:  pkgconfig(gmime-3.0)
 BuildRequires:  pkgconfig(gobject-introspection-1.0)
 BuildRequires:  pkgconfig(libarchive) >= 3.0
 BuildRequires:  pkgconfig(libquvi-0.9) >= 0.9.1
@@ -97,7 +96,6 @@
 
 %build
 %meson \
-        -D disable-gmime-i-know-what-im-doing=false \
         -D enable-quvi=yes \
         -D enable-libarchive=yes \
         -D enable-libgcrypt=yes \

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.aVeWUc/_old  2018-08-03 12:31:24.547046798 +0200
+++ /var/tmp/diff_new_pack.aVeWUc/_new  2018-08-03 12:31:24.547046798 +0200
@@ -3,4 +3,4 @@
                 <param 
name="url">https://git.gnome.org/browse/totem-pl-parser</param>
               <param 
name="changesrevision">0091a562f2299fc61943bf5b44ecd7c472288693</param></service><service
 name="tar_scm">
                 <param 
name="url">https://gitlab.gnome.org/GNOME/totem-pl-parser.git</param>
-              <param 
name="changesrevision">d22b15599ff8554377e0dab493673754f615b49d</param></service></servicedata>
\ No newline at end of file
+              <param 
name="changesrevision">b7f36dd71ee0ddfff04be1e90a654ddf13293d0f</param></service></servicedata>
\ No newline at end of file

++++++ totem-pl-parser-3.26.1+20180614.d22b155.tar.xz -> 
totem-pl-parser-3.26.1+20180713.b7f36dd.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/.gitlab-ci.yml 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/.gitlab-ci.yml
--- old/totem-pl-parser-3.26.1+20180614.d22b155/.gitlab-ci.yml  1970-01-01 
01:00:00.000000000 +0100
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/.gitlab-ci.yml  2018-07-13 
13:22:25.000000000 +0200
@@ -0,0 +1,8 @@
+build-fedora:
+  image: fedora:latest
+  before_script:
+    - dnf install -y redhat-rpm-config meson git gettext gtk-doc intltool 
meson glib2-devel libxml2-devel gobject-introspection-devel libgcrypt-devel 
libarchive-devel libsoup-devel libquvi-devel
+  script:
+    - meson _build
+    - ninja -C _build test
+    - ninja -C _build install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/totem-pl-parser-3.26.1+20180614.d22b155/README 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/README
--- old/totem-pl-parser-3.26.1+20180614.d22b155/README  2018-06-14 
12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/README  2018-07-13 
13:22:25.000000000 +0200
@@ -16,7 +16,6 @@
 ============
 
 glib >= 2.36
-gmime >= 2.6 or >= 3.0
 libxml2
 
 libquvi >= 0.9.1 (optional)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/totem-pl-parser-3.26.1+20180614.d22b155/meson.build 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/meson.build
--- old/totem-pl-parser-3.26.1+20180614.d22b155/meson.build     2018-06-14 
12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/meson.build     2018-07-13 
13:22:25.000000000 +0200
@@ -136,37 +136,6 @@
   endif
 endforeach
 
-# gmime dependency
-enable_gmime = not get_option('disable-gmime-i-know-what-im-doing')
-if enable_gmime
-   have_gmime3 = false
-   gmime_dep = dependency('gmime-3.0', required : false)
-   if gmime_dep.found()
-     cdata.set('HAVE_GMIME3', true,
-       description: 'GMime 3.0 available in the system')
-     pkgconf.set('GMIME', 'gmime-3.0')
-   else
-     gmime_dep = dependency('gmime-2.6', required : false)
-     if not gmime_dep.found()
-       error('libgmime is required to compile totem-pl-parser.')
-     endif
-     pkgconf.set('GMIME', 'gmime-2.6')
-   endif
-   pkgconf.set('USEGMIME', 'yes')
-   cdata.set('HAVE_GMIME', true,
-     description: 'GMime available in the system')
-   totem_pl_parser_deps += [gmime_dep]
-else
-  message('''
-**************************************************************
- Compiling totem-pl-parser without libgmime.
- This will break podcast support and is completely unsupported.
-**************************************************************
-  ''')
-   pkgconf.set('USEGMIME', 'no')
-   pkgconf.set('GMIME', '')
-endif
-
 # quvi dependency
 enable_quvi = get_option('enable-quvi')
 have_quvi = false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/meson_options.txt 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/meson_options.txt
--- old/totem-pl-parser-3.26.1+20180614.d22b155/meson_options.txt       
2018-06-14 12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/meson_options.txt       
2018-07-13 13:22:25.000000000 +0200
@@ -1,5 +1,3 @@
-option('disable-gmime-i-know-what-im-doing', type: 'boolean', value: 'false',
-  description : 'Disable libgmime (Unsupported, breaks Podcast support).')
 option('enable-quvi', type: 'combo', choices : ['yes', 'no', 'auto'], value : 
'auto',
   description : 'Enable libquvi support.')
 option('enable-libarchive', type: 'combo', choices : ['yes', 'no', 'auto'], 
value : 'auto',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/meson.build 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/meson.build
--- old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/meson.build     
2018-06-14 12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/meson.build     
2018-07-13 13:22:25.000000000 +0200
@@ -34,6 +34,7 @@
   'totem-disc.c',
   'totem-pl-parser.c',
   'totem-pl-parser-amz.c',
+  'totem-pl-parser-decode-date.c',
   'totem-pl-parser-lines.c',
   'totem-pl-parser-media.c',
   'totem-pl-parser-misc.c',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-decode-date.c
 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-decode-date.c
--- 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-decode-date.c
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-decode-date.c
   2018-07-13 13:22:25.000000000 +0200
@@ -0,0 +1,560 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*  GMime
+ *  Copyright (C) 2000-2017 Jeffrey Stedfast
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1
+ *  of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ *  02110-1301, USA.
+ */
+
+
+#include <config.h>
+
+#include "totem-pl-parser-decode-date.h"
+
+#define d(x)
+
+/* date parser macros */
+#define DATE_TOKEN_NON_NUMERIC          (1 << 0)
+#define DATE_TOKEN_NON_WEEKDAY          (1 << 1)
+#define DATE_TOKEN_NON_MONTH            (1 << 2)
+#define DATE_TOKEN_NON_TIME             (1 << 3)
+#define DATE_TOKEN_HAS_COLON            (1 << 4)
+#define DATE_TOKEN_NON_TIMEZONE_ALPHA   (1 << 5)
+#define DATE_TOKEN_NON_TIMEZONE_NUMERIC (1 << 6)
+#define DATE_TOKEN_HAS_SIGN             (1 << 7)
+
+static unsigned char gmime_datetok_table[256] = {
+       128,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111, 79, 79,111,175,111,175,111,111,
+        38, 38, 38, 38, 38, 38, 38, 38, 38, 38,119,111,111,111,111,111,
+       111, 75,111, 79, 75, 79,105, 79,111,111,107,111,111, 73, 75,107,
+        79,111,111, 73, 77, 79,111,109,111, 79, 79,111,111,111,111,111,
+       111,105,107,107,109,105,111,107,105,105,111,111,107,107,105,105,
+       107,111,105,105,105,105,107,111,111,105,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+       111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,111,
+};
+
+/* Timezone values defined in rfc5322 */
+static struct {
+       const char *name;
+       int offset;
+} tz_offsets [] = {
+       { "UT",       0 },
+       { "GMT",      0 },
+       { "EDT",   -400 },
+       { "EST",   -500 },
+       { "CDT",   -500 },
+       { "CST",   -600 },
+       { "MDT",   -600 },
+       { "MST",   -700 },
+       { "PDT",   -700 },
+       { "PST",   -800 },
+       /* Note: rfc822 got the signs backwards for the military
+        * timezones so some sending clients may mistakenly use the
+        * wrong values. */
+       { "A",      100 },
+       { "B",      200 },
+       { "C",      300 },
+       { "D",      400 },
+       { "E",      500 },
+       { "F",      600 },
+       { "G",      700 },
+       { "H",      800 },
+       { "I",      900 },
+       { "K",     1000 },
+       { "L",     1100 },
+       { "M",     1200 },
+       { "N",     -100 },
+       { "O",     -200 },
+       { "P",     -300 },
+       { "Q",     -400 },
+       { "R",     -500 },
+       { "S",     -600 },
+       { "T",     -700 },
+       { "U",     -800 },
+       { "V",     -900 },
+       { "W",    -1000 },
+       { "X",    -1100 },
+       { "Y",    -1200 },
+       { "Z",        0 },
+};
+
+static char *tm_months[] = {
+       "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+       "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+};
+
+static char *tm_days[] = {
+       "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+};
+
+
+/* This is where it gets ugly... */
+
+typedef struct _date_token {
+       struct _date_token *next;
+       unsigned char mask;
+       const char *start;
+       size_t len;
+} date_token;
+
+#define date_token_free(tok) g_slice_free (date_token, tok)
+#define date_token_new() g_slice_new (date_token)
+
+static date_token *
+datetok (const char *date)
+{
+       date_token tokens, *token, *tail;
+       const char *start, *end;
+        unsigned char mask;
+
+       tail = (date_token *) &tokens;
+       tokens.next = NULL;
+
+       start = date;
+       while (*start) {
+               /* kill leading whitespace */
+               while (*start == ' ' || *start == '\t')
+                       start++;
+
+               if (*start == '\0')
+                       break;
+
+               mask = gmime_datetok_table[(unsigned char) *start];
+
+               /* find the end of this token */
+               end = start + 1;
+               while (*end && !strchr ("-/,\t\r\n ", *end))
+                       mask |= gmime_datetok_table[(unsigned char) *end++];
+
+               if (end != start) {
+                       token = date_token_new ();
+                       token->next = NULL;
+                       token->start = start;
+                       token->len = end - start;
+                       token->mask = mask;
+
+                       tail->next = token;
+                       tail = token;
+               }
+
+               if (*end)
+                       start = end + 1;
+               else
+                       break;
+       }
+
+       return tokens.next;
+}
+
+static int
+decode_int (const char *in, size_t inlen)
+{
+       register const char *inptr = in;
+       const char *inend = in + inlen;
+       int val = 0;
+
+       while (inptr < inend) {
+               if (!(*inptr >= '0' && *inptr <= '9'))
+                       return -1;
+               if (val > (INT_MAX - (*inptr - '0')) / 10)
+                       return -1;
+               val = (val * 10) + (*inptr - '0');
+               inptr++;
+       }
+
+       return val;
+}
+
+static int
+get_wday (const char *in, size_t inlen)
+{
+       int wday;
+
+       g_return_val_if_fail (in != NULL, -1);
+
+       if (inlen < 3)
+               return -1;
+
+       for (wday = 0; wday < 7; wday++) {
+               if (!g_ascii_strncasecmp (in, tm_days[wday], 3))
+                       return wday;
+       }
+
+       return -1;  /* unknown week day */
+}
+
+static int
+get_mday (const char *in, size_t inlen)
+{
+       int mday;
+
+       g_return_val_if_fail (in != NULL, -1);
+
+       mday = decode_int (in, inlen);
+
+       if (mday < 0 || mday > 31)
+               mday = -1;
+
+       return mday;
+}
+
+static int
+get_month (const char *in, size_t inlen)
+{
+       int i;
+
+       g_return_val_if_fail (in != NULL, -1);
+
+       if (inlen < 3)
+               return -1;
+
+       for (i = 0; i < 12; i++) {
+               if (!g_ascii_strncasecmp (in, tm_months[i], 3))
+                       return i + 1;
+       }
+
+       return -1;  /* unknown month */
+}
+
+static int
+get_year (const char *in, size_t inlen)
+{
+       int year;
+
+       g_return_val_if_fail (in != NULL, -1);
+
+       if ((year = decode_int (in, inlen)) == -1)
+               return -1;
+
+       if (year < 100)
+               year += (year < 70) ? 2000 : 1900;
+
+       if (year < 1969)
+               return -1;
+
+       return year;
+}
+
+static gboolean
+get_time (const char *in, size_t inlen, int *hour, int *min, int *sec)
+{
+       register const char *inptr;
+       int *val, max, colons = 0;
+       const char *inend;
+
+       *hour = *min = *sec = 0;
+
+       inend = in + inlen;
+       val = hour;
+       max = 23;
+       for (inptr = in; inptr < inend; inptr++) {
+               if (*inptr == ':') {
+                       colons++;
+                       switch (colons) {
+                       case 1:
+                               val = min;
+                               max = 59;
+                               break;
+                       case 2:
+                               val = sec;
+                               max = 60;
+                               break;
+                       default:
+                               return FALSE;
+                       }
+               } else if (!(*inptr >= '0' && *inptr <= '9'))
+                       return FALSE;
+               else {
+                       *val = (*val * 10) + (*inptr - '0');
+                       if (*val > max)
+                               return FALSE;
+               }
+       }
+
+       return TRUE;
+}
+
+static GTimeZone *
+get_tzone (date_token **token)
+{
+       const char *inptr, *inend;
+       char tzone[8];
+       size_t len, n;
+       int value, i;
+       guint t;
+
+       for (i = 0; *token && i < 2; *token = (*token)->next, i++) {
+               inptr = (*token)->start;
+               len = (*token)->len;
+               inend = inptr + len;
+
+               if (len >= 6)
+                       continue;
+
+               if (len == 5 && (*inptr == '+' || *inptr == '-')) {
+                       if ((value = decode_int (inptr + 1, len - 1)) == -1)
+                               return NULL;
+
+                       memcpy (tzone, inptr, len);
+                       tzone[len] = '\0';
+
+                       return g_time_zone_new (tzone);
+               }
+
+               if (*inptr == '(') {
+                       inptr++;
+                       if (*(inend - 1) == ')')
+                               len -= 2;
+                       else
+                               len--;
+               }
+
+               for (t = 0; t < G_N_ELEMENTS (tz_offsets); t++) {
+                       n = strlen (tz_offsets[t].name);
+
+                       if (n != len || strncmp (inptr, tz_offsets[t].name, n) 
!= 0)
+                               continue;
+
+                       snprintf (tzone, 6, "%+05d", tz_offsets[t].offset);
+
+                       return g_time_zone_new (tzone);
+               }
+       }
+
+       return NULL;
+}
+
+static GDateTime *
+parse_rfc822_date (date_token *tokens)
+{
+       int year, month, day, hour, min, sec, n;
+       GTimeZone *tz = NULL;
+       date_token *token;
+       GDateTime *date;
+
+       token = tokens;
+
+       year = month = day = hour = min = sec = 0;
+
+       if ((n = get_wday (token->start, token->len)) != -1) {
+               /* not all dates may have this... */
+               token = token->next;
+       }
+
+       /* get the mday */
+       if (!token || (n = get_mday (token->start, token->len)) == -1)
+               return NULL;
+
+       token = token->next;
+       day = n;
+
+       /* get the month */
+       if (!token || (n = get_month (token->start, token->len)) == -1)
+               return NULL;
+
+       token = token->next;
+       month = n;
+
+       /* get the year */
+       if (!token || (n = get_year (token->start, token->len)) == -1)
+               return NULL;
+
+       token = token->next;
+       year = n;
+
+       /* get the hour/min/sec */
+       if (!token || !get_time (token->start, token->len, &hour, &min, &sec))
+               return NULL;
+
+       token = token->next;
+
+       /* get the timezone */
+       if (!token || !(tz = get_tzone (&token))) {
+               /* I guess we assume tz is GMT? */
+               tz = g_time_zone_new_utc ();
+       }
+
+       date = g_date_time_new (tz, year, month, day, hour, min, (gdouble) sec);
+       g_time_zone_unref (tz);
+
+       return date;
+}
+
+
+#define date_token_mask(t)  (((date_token *) t)->mask)
+#define is_numeric(t)       ((date_token_mask (t) & DATE_TOKEN_NON_NUMERIC) == 
0)
+#define is_weekday(t)       ((date_token_mask (t) & DATE_TOKEN_NON_WEEKDAY) == 
0)
+#define is_month(t)         ((date_token_mask (t) & DATE_TOKEN_NON_MONTH) == 0)
+#define is_time(t)          (((date_token_mask (t) & DATE_TOKEN_NON_TIME) == 
0) && (date_token_mask (t) & DATE_TOKEN_HAS_COLON))
+#define is_tzone_alpha(t)   ((date_token_mask (t) & 
DATE_TOKEN_NON_TIMEZONE_ALPHA) == 0)
+#define is_tzone_numeric(t) (((date_token_mask (t) & 
DATE_TOKEN_NON_TIMEZONE_NUMERIC) == 0) && (date_token_mask (t) & 
DATE_TOKEN_HAS_SIGN))
+#define is_tzone(t)         (is_tzone_alpha (t) || is_tzone_numeric (t))
+
+#define YEAR    (1 << 0)
+#define MONTH   (1 << 1)
+#define DAY     (1 << 2)
+#define WEEKDAY (1 << 3)
+#define TIME    (1 << 4)
+#define TZONE   (1 << 5)
+
+static GDateTime *
+parse_broken_date (date_token *tokens)
+{
+       int year, month, day, hour, min, sec, n;
+       GTimeZone *tz = NULL;
+       date_token *token;
+       GDateTime *date;
+       int mask;
+
+       year = month = day = hour = min = sec = 0;
+       mask = 0;
+
+       token = tokens;
+       while (token) {
+               if (is_weekday (token) && !(mask & WEEKDAY)) {
+                       if ((n = get_wday (token->start, token->len)) != -1) {
+                               d(printf ("weekday; "));
+                               mask |= WEEKDAY;
+                               goto next;
+                       }
+               }
+
+               if (is_month (token) && !(mask & MONTH)) {
+                       if ((n = get_month (token->start, token->len)) != -1) {
+                               d(printf ("month; "));
+                               mask |= MONTH;
+                               month = n;
+                               goto next;
+                       }
+               }
+
+               if (is_time (token) && !(mask & TIME)) {
+                       if (get_time (token->start, token->len, &hour, &min, 
&sec)) {
+                               d(printf ("time; "));
+                               mask |= TIME;
+                               goto next;
+                       }
+               }
+
+               if (is_tzone (token) && !(mask & TZONE)) {
+                       date_token *t = token;
+
+                       if ((tz = get_tzone (&t))) {
+                               d(printf ("tzone; "));
+                               mask |= TZONE;
+                               goto next;
+                       }
+               }
+
+               if (is_numeric (token)) {
+                       if (token->len == 4 && !(mask & YEAR)) {
+                               if ((n = get_year (token->start, token->len)) 
!= -1) {
+                                       d(printf ("year; "));
+                                       mask |= YEAR;
+                                       year = n;
+                                       goto next;
+                               }
+                       } else {
+                               /* Note: assumes MM-DD-YY ordering if '0 < MM < 
12' holds true */
+                               if (!(mask & MONTH) && token->next && 
is_numeric (token->next)) {
+                                       if ((n = decode_int (token->start, 
token->len)) > 12) {
+                                               goto mday;
+                                       } else if (n > 0) {
+                                               d(printf ("mon; "));
+                                               mask |= MONTH;
+                                               month = n;
+                                       }
+                                       goto next;
+                               } else if (!(mask & DAY) && (n = get_mday 
(token->start, token->len)) != -1) {
+                               mday:
+                                       d(printf ("mday; "));
+                                       mask |= DAY;
+                                       day = n;
+                                       goto next;
+                               } else if (!(mask & YEAR)) {
+                                       if ((n = get_year (token->start, 
token->len)) != -1) {
+                                               d(printf ("2-digit year; "));
+                                               mask |= YEAR;
+                                               year = n;
+                                       }
+                                       goto next;
+                               }
+                       }
+               }
+
+               d(printf ("???; "));
+
+       next:
+
+               token = token->next;
+       }
+
+       d(printf ("\n"));
+
+       if (!(mask & (YEAR | MONTH | DAY | TIME))) {
+               if (tz != NULL)
+                       g_time_zone_unref (tz);
+
+               return NULL;
+       }
+
+       if (tz == NULL)
+               tz = g_time_zone_new_utc ();
+
+       date = g_date_time_new (tz, year, month, day, hour, min, (gdouble) sec);
+       g_time_zone_unref (tz);
+
+       return date;
+}
+
+/**
+ * g_mime_utils_header_decode_date:
+ * @str: input date string
+ *
+ * Parses the rfc822 date string.
+ *
+ * Returns: (nullable) (transfer full): the #GDateTime representation of the 
date
+ * string specified by @str or %NULL on error.
+ **/
+GDateTime *
+g_mime_utils_header_decode_date (const char *str)
+{
+       date_token *token, *tokens;
+       GDateTime *date;
+
+       if (!(tokens = datetok (str)))
+               return NULL;
+
+       if (!(date = parse_rfc822_date (tokens)))
+               date = parse_broken_date (tokens);
+
+       /* cleanup */
+       while (tokens) {
+               token = tokens;
+               tokens = tokens->next;
+               date_token_free (token);
+       }
+
+       return date;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-decode-date.h
 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-decode-date.h
--- 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-decode-date.h
   1970-01-01 01:00:00.000000000 +0100
+++ 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-decode-date.h
   2018-07-13 13:22:25.000000000 +0200
@@ -0,0 +1,23 @@
+/*  GMime
+ *  Copyright (C) 2000-2018 Jeffrey Stedfast
+ *
+ *  This library is free software; you can redistribute it and/or
+ *  modify it under the terms of the GNU Lesser General Public License
+ *  as published by the Free Software Foundation; either version 2.1
+ *  of the License, or (at your option) any later version.
+ *
+ *  This library is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *  Lesser General Public License for more details.
+ *
+ *  You should have received a copy of the GNU Lesser General Public
+ *  License along with this library; if not, write to the Free
+ *  Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+ *  02110-1301, USA.
+ */
+
+#include <glib.h>
+#include <stdio.h>
+
+GDateTime *g_mime_utils_header_decode_date (const char *str);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-podcast.c 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-podcast.c
--- 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-podcast.c   
    2018-06-14 12:21:26.000000000 +0200
+++ 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-podcast.c   
    2018-07-13 13:22:25.000000000 +0200
@@ -294,9 +294,6 @@
                         TotemPlParseData *parse_data,
                         gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        xml_node_t* doc, *channel;
        char *contents;
        gsize size;
@@ -336,7 +333,6 @@
        xml_parser_free_tree (doc);
 
        return TOTEM_PL_PARSER_RESULT_SUCCESS;
-#endif /* !HAVE_GMIME */
 }
 
 /* http://www.apple.com/itunes/store/podcaststechspecs.html */
@@ -347,9 +343,6 @@
                          TotemPlParseData *parse_data,
                          gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        TotemPlParserResult ret;
        char *uri, *new_uri, *uri_scheme;
        GFile *new_file;
@@ -368,7 +361,6 @@
        g_object_unref (new_file);
 
        return ret;
-#endif /* !HAVE_GMIME */
 }
 
 TotemPlParserResult
@@ -378,9 +370,6 @@
                          TotemPlParseData *parse_data,
                          gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        TotemPlParserResult ret;
        char *uri, *new_uri;
        GFile *new_file;
@@ -407,7 +396,6 @@
        g_object_unref (new_file);
 
        return ret;
-#endif /* !HAVE_GMIME */
 }
 
 /* Atom docs:
@@ -545,9 +533,6 @@
                          TotemPlParseData *parse_data,
                          gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        xml_node_t* doc;
        char *contents, *uri;
        gsize size;
@@ -577,7 +562,6 @@
        xml_parser_free_tree (doc);
 
        return TOTEM_PL_PARSER_RESULT_SUCCESS;
-#endif /* !HAVE_GMIME */
 }
 
 TotemPlParserResult
@@ -587,9 +571,6 @@
                              TotemPlParseData *parse_data,
                              gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        guint len;
 
        if (data == NULL)
@@ -605,7 +586,6 @@
                return totem_pl_parser_add_opml (parser, file, base_file, 
parse_data, data);
 
        return TOTEM_PL_PARSER_RESULT_UNHANDLED;
-#endif /* !HAVE_GMIME */
 }
 
 static char *
@@ -661,9 +641,6 @@
                          TotemPlParseData *parse_data,
                          gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        GFile *json_file, *feed_file;
        TotemPlParserResult ret;
        char *contents, *id, *json_uri, *feed_url;
@@ -706,7 +683,6 @@
        g_object_unref (feed_file);
 
        return ret;
-#endif /* !HAVE_GMIME */
 }
 
 gboolean
@@ -796,9 +772,6 @@
                          TotemPlParseData *parse_data,
                          gpointer data)
 {
-#ifndef HAVE_GMIME
-       WARN_NO_GMIME;
-#else
        xml_node_t* doc;
        char *contents, *uri;
        gsize size;
@@ -828,7 +801,6 @@
        xml_parser_free_tree (doc);
 
        return TOTEM_PL_PARSER_RESULT_SUCCESS;
-#endif /* !HAVE_GMIME */
 }
 
 #endif /* !TOTEM_PL_PARSER_MINI */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-podcast.h 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-podcast.h
--- 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser-podcast.h   
    2018-06-14 12:21:26.000000000 +0200
+++ 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser-podcast.h   
    2018-07-13 13:22:25.000000000 +0200
@@ -39,13 +39,6 @@
 
 #ifndef TOTEM_PL_PARSER_MINI
 
-#ifndef HAVE_GMIME
-#define WARN_NO_GMIME { \
-       g_warning("Trying to parse a podcast, but totem-pl-parser built without 
libgmime support. Please contact your distribution provider."); \
-       return TOTEM_PL_PARSER_RESULT_ERROR; \
-}
-#endif /* !HAVE_GMIME */
-
 gboolean totem_pl_parser_is_itms_feed (GFile *file);
 
 TotemPlParserResult totem_pl_parser_add_xml_feed (TotemPlParser *parser,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser.c 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser.c
--- old/totem-pl-parser-3.26.1+20180614.d22b155/plparse/totem-pl-parser.c       
2018-06-14 12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/plparse/totem-pl-parser.c       
2018-07-13 13:22:25.000000000 +0200
@@ -132,16 +132,13 @@
 #ifndef TOTEM_PL_PARSER_MINI
 #include <gobject/gvaluecollector.h>
 
-#ifdef HAVE_GMIME
-#include <gmime/gmime-utils.h>
-#endif
-
 #include "totem-pl-parser.h"
 #include "totemplparser-marshal.h"
 #include "totem-disc.h"
 #endif /* !TOTEM_PL_PARSER_MINI */
 
 #include "totem-pl-parser-mini.h"
+#include "totem-pl-parser-decode-date.h"
 #include "totem-pl-parser-wm.h"
 #include "totem-pl-parser-qt.h"
 #include "totem-pl-parser-pls.h"
@@ -2345,7 +2342,6 @@
 guint64
 totem_pl_parser_parse_date (const char *date_str, gboolean debug)
 {
-#ifdef HAVE_GMIME
        GTimeVal val;
 
        g_return_val_if_fail (date_str != NULL, -1);
@@ -2358,7 +2354,6 @@
        }
        D(g_message ("Failed to parse duration '%s' using the ISO8601 parser", 
date_str));
        /* Fall back to RFC 2822 date parsing */
-#ifdef HAVE_GMIME3
        {
                g_autoptr(GDateTime) date = NULL;
                date = g_mime_utils_header_decode_date (date_str);
@@ -2368,12 +2363,6 @@
                }
                return val.tv_sec;
        }
-#else
-       return g_mime_utils_header_decode_date (date_str, NULL);
-#endif /* HAVE_GMIME3 */
-#else
-       WARN_NO_GMIME;
-#endif /* HAVE_GMIME */
 }
 #endif /* !TOTEM_PL_PARSER_MINI */
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/totem-pl-parser-3.26.1+20180614.d22b155/totem-plparser.pc.in 
new/totem-pl-parser-3.26.1+20180713.b7f36dd/totem-plparser.pc.in
--- old/totem-pl-parser-3.26.1+20180614.d22b155/totem-plparser.pc.in    
2018-06-14 12:21:26.000000000 +0200
+++ new/totem-pl-parser-3.26.1+20180713.b7f36dd/totem-plparser.pc.in    
2018-07-13 13:22:25.000000000 +0200
@@ -7,8 +7,8 @@
 Description: Totem Playlist Parser library
 Version: @VERSION@
 Requires: glib-2.0 gobject-2.0 gio-2.0
-Requires.private: gthread-2.0 libxml-2.0 @GMIME@ @ARCHIVE@
+Requires.private: gthread-2.0 libxml-2.0 @ARCHIVE@
 Libs: -L${libdir} -ltotem-plparser
 Libs.private: @LIBGCRYPT_LIBS@
 Cflags: -I${includedir}/totem-pl-parser/1/plparser @LIBGCRYPT_CFLAGS@
-uselibcamel=@USEGMIME@
+uselibcamel=true


Reply via email to