Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gupnp-av for openSUSE:Factory checked in at 2022-06-18 22:05:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gupnp-av (Old) and /work/SRC/openSUSE:Factory/.gupnp-av.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gupnp-av" Sat Jun 18 22:05:48 2022 rev:43 rq:983443 version:0.14.1 Changes: -------- --- /work/SRC/openSUSE:Factory/gupnp-av/gupnp-av.changes 2022-04-30 00:45:19.930940700 +0200 +++ /work/SRC/openSUSE:Factory/.gupnp-av.new.1548/gupnp-av.changes 2022-06-18 22:05:53.835631168 +0200 @@ -1,0 +2,7 @@ +Mon Jun 13 11:29:39 UTC 2022 - Dominique Leuenberger <[email protected]> + +- Update to version 0.14.1: + + Add utility function to format GDateTime to the iso variant + DIDL expects. + +------------------------------------------------------------------- Old: ---- gupnp-av-0.14.0.tar.xz New: ---- gupnp-av-0.14.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gupnp-av.spec ++++++ --- /var/tmp/diff_new_pack.aXXdiz/_old 2022-06-18 22:05:54.315631850 +0200 +++ /var/tmp/diff_new_pack.aXXdiz/_new 2022-06-18 22:05:54.319631855 +0200 @@ -17,7 +17,7 @@ Name: gupnp-av -Version: 0.14.0 +Version: 0.14.1 Release: 0 Summary: Library to ease the handling and implementation of UPnP A/V profiles License: LGPL-2.0-or-later ++++++ gupnp-av-0.14.0.tar.xz -> gupnp-av-0.14.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/.gitignore new/gupnp-av-0.14.1/.gitignore --- old/gupnp-av-0.14.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/gupnp-av-0.14.1/.gitignore 2022-06-03 20:15:12.000000000 +0200 @@ -0,0 +1,11 @@ +build-aux +*~ +gupnp-av-marshal* +*.swp + +/tests/test-search-criteria-parser +/vala/gupnp-av-1.0.stamp +/vala/gupnp-av-1.0.vapi +build +meson.build.user + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/NEWS new/gupnp-av-0.14.1/NEWS --- old/gupnp-av-0.14.0/NEWS 2021-09-18 18:51:58.864944200 +0200 +++ new/gupnp-av-0.14.1/NEWS 2022-06-03 20:15:12.000000000 +0200 @@ -1,3 +1,11 @@ +0.14.1 (stable) +=============== +- Add utility function to format GDateTime to the iso variant + DIDL expects + +All contributors to this release: + - Jens Georg <[email protected]> + 0.14.0 (stable) ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/libgupnp-av/gupnp-didl-lite-object.c new/gupnp-av-0.14.1/libgupnp-av/gupnp-didl-lite-object.c --- old/gupnp-av-0.14.0/libgupnp-av/gupnp-didl-lite-object.c 2021-09-18 18:51:58.873944500 +0200 +++ new/gupnp-av-0.14.1/libgupnp-av/gupnp-didl-lite-object.c 2022-06-03 20:15:12.000000000 +0200 @@ -2645,3 +2645,49 @@ return ret; } + +/** + * gupnp_format_date_time_for_didl_lite: + * @date_time: DateTime to format + * + * Get the representation of DateTime as an ISO8601 string. + * + * DLNA requires a specific subset of ISO8601 + * Returns: (transfer full): @date_time formatted as an ISO8601 string + */ +char * +gupnp_format_date_time_for_didl_lite (GDateTime *date_time, gboolean date_only) +{ + g_return_val_if_fail (date_time != NULL, NULL); + + if (date_only) { + return g_date_time_format (date_time, "%F"); + } + + const char *format = "%FT%H:%M:%S"; + char *base_string = g_date_time_format (date_time, format); + GString *iso_string = g_string_new (base_string); + + // Check if we have sub-second precision. If so, we use that as well, + // but cannot use %f since that will use microsecond precision, but DLNA + // only allows for millisecond so we append the milliseconds manually + if (g_date_time_get_microsecond (date_time) % G_TIME_SPAN_SECOND != 0) { + g_string_append_printf ( + iso_string, + ".%03d", + g_date_time_get_microsecond (date_time) / 1000); + } + + GTimeSpan utc_offset = g_date_time_get_utc_offset (date_time); + if (utc_offset == 0) { + g_string_append (iso_string, "Z"); + } else { + char *time_zone = g_date_time_format (date_time, "%:z"); + g_string_append (iso_string, time_zone); + g_free (time_zone); + } + + g_free (base_string); + + return g_string_free (iso_string, FALSE); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/libgupnp-av/gupnp-didl-lite-object.h new/gupnp-av-0.14.1/libgupnp-av/gupnp-didl-lite-object.h --- old/gupnp-av-0.14.0/libgupnp-av/gupnp-didl-lite-object.h 2021-09-18 18:51:58.874944400 +0200 +++ new/gupnp-av-0.14.1/libgupnp-av/gupnp-didl-lite-object.h 2022-06-03 20:15:12.000000000 +0200 @@ -277,6 +277,9 @@ char * gupnp_didl_lite_object_get_xml_string (GUPnPDIDLLiteObject *object); +char * +gupnp_format_date_time_for_didl_lite (GDateTime *date_time, gboolean date_only); + G_END_DECLS #endif /* __GUPNP_DIDL_LITE_OBJECT_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/meson.build new/gupnp-av-0.14.1/meson.build --- old/gupnp-av-0.14.0/meson.build 2021-09-18 18:51:58.881944700 +0200 +++ new/gupnp-av-0.14.1/meson.build 2022-06-03 20:15:12.000000000 +0200 @@ -1,4 +1,4 @@ -project('gupnp-av', 'c', version : '0.14.0', default_options: ['c_std=c11']) +project('gupnp-av', 'c', version : '0.14.1', default_options: ['c_std=c11']) gnome = import('gnome') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-av-0.14.0/vala/GUPnPAV-1.0.metadata new/gupnp-av-0.14.1/vala/GUPnPAV-1.0.metadata --- old/gupnp-av-0.14.0/vala/GUPnPAV-1.0.metadata 2021-09-18 18:51:58.886944800 +0200 +++ new/gupnp-av-0.14.1/vala/GUPnPAV-1.0.metadata 2022-06-03 20:15:12.000000000 +0200 @@ -12,3 +12,4 @@ .expression skip ProtocolError skip protocol_error_quark skip +format_date_time_for_didl_lite.date_only default=false
