Loading .gitlab-ci.yml +19 −7 Original line number Diff line number Diff line configure: cache: paths: - _build stages: - config - compile - test config: stage: config needs: [] script: - meson build - meson _build compile: stage: compile needs: ["config"] script: - meson build - ninja -C build - ninja -C _build test: stage: test needs: ["compile"] script: - meson build - ninja -C build - ninja -C build test - ninja -C _build test lib/mlm/file-tags.vala +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ namespace MLM { /* The path of the file. */ private string path; /* The modification date of the file. */ private GLib.TimeVal time; private GLib.DateTime time; /* The file. */ private Id3Tag.File file; /* The ID3 tag. */ Loading lib/mlm/util.vala +5 −8 Original line number Diff line number Diff line Loading @@ -65,16 +65,16 @@ namespace MLM { * @param filename the file name. * @return the modification time of a file. */ public static GLib.TimeVal get_file_time(string filename) { public static GLib.DateTime get_file_time(string filename) { try { var file = GLib.File.new_for_path(filename); var info = file.query_info("time::modified", GLib.FileQueryInfoFlags.NONE); return info.get_modification_time(); return info.get_modification_date_time(); } catch (GLib.Error e) { GLib.warning("There was an error reading from ‘%s’.\n", filename); } return GLib.TimeVal(); return new GLib.DateTime.now_local(); } /** Loading @@ -82,14 +82,11 @@ namespace MLM { * @param filename the file name. * @param time the modification time. */ public static void set_file_time(string filename, GLib.TimeVal time) { public static void set_file_time(string filename, GLib.DateTime time) { try { var file = GLib.File.new_for_path(filename); var info = new GLib.FileInfo(); info.set_attribute_uint64("time::modified", (uint64)time.tv_sec); info.set_attribute_uint32("time::modified-usec", (uint32)time.tv_usec); info.set_attribute_uint64("time::access", (uint64)time.tv_sec); info.set_attribute_uint32("time::access-usec", (uint32)time.tv_usec); info.set_modification_date_time(time); file.set_attributes_from_info(info, GLib.FileQueryInfoFlags.NONE); } catch (GLib.Error e) { GLib.warning("There was an error writing to ‘%s’.\n", filename); Loading lib/test/test-case.vala +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ namespace MLM.Test { * Creates a new test case with a given name. * @param name the name of the test case. */ public TestCase(string name) { protected TestCase(string name) { this.suite = new GLib.TestSuite(name); } Loading man/mlm-tags.xml +10 −10 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ <varlistentry> <term><option>-c</option></term> <term>--comment=COMMENT</term> <term><option>--comment=COMMENT</option></term> <listitem> <para>Set the comment.</para> </listitem> Loading @@ -174,7 +174,7 @@ <varlistentry> <term><option>-s</option></term> <term>--composer=COMPOSER</term> <term><option>--composer=COMPOSER</option></term> <listitem> <para>Set the composer.</para> </listitem> Loading @@ -182,7 +182,7 @@ <varlistentry> <term><option>-o</option></term> <term>--original-artist=ARTIST</term> <term><option>--original-artist=ARTIST</option></term> <listitem> <para>Set the original artist.</para> </listitem> Loading @@ -190,7 +190,7 @@ <varlistentry> <term><option>-f</option></term> <term>--cover-picture=FILENAME</term> <term><option>--cover-picture=FILENAME</option></term> <listitem> <para>Set the album cover picture. It can be a PNG or a JPG file.</para> Loading @@ -199,7 +199,7 @@ <varlistentry> <term><option>-u</option></term> <term>--artist-picture=FILENAME</term> <term><option>--artist-picture=FILENAME</option></term> <listitem> <para>Set the artist picture. It can be a PNG or a JPG file.</para> </listitem> Loading @@ -207,7 +207,7 @@ <varlistentry> <term><option>-r</option></term> <term>--remove</term> <term><option>--remove</option></term> <listitem> <para>Remove all tags from the MP3 files.</para> </listitem> Loading @@ -215,7 +215,7 @@ <varlistentry> <term><option>-p</option></term> <term>--print=FORMAT</term> <term><option>--print=FORMAT</option></term> <listitem> <para>Formated print; see the <citetitle><replaceable>FORMAT FLAGS</replaceable></citetitle> section below.</para> Loading @@ -224,7 +224,7 @@ <varlistentry> <term><option>-G</option></term> <term>--genres</term> <term><option>--genres</option></term> <listitem> <para>Printa all the standard genres.</para> </listitem> Loading @@ -232,7 +232,7 @@ <varlistentry> <term><option>-F</option></term> <term>--output-cover-picture=FILENAME</term> <term><option>--output-cover-picture=FILENAME</option></term> <listitem> <para>Saves the album cover picture in the specified filename. This option cannot be used with multiple MP3 files.</para> Loading @@ -241,7 +241,7 @@ <varlistentry> <term><option>-A</option></term> <term>--output-artist-picture=FILENAME</term> <term><option>--output-artist-picture=FILENAME</option></term> <listitem> <para>Saves the artist picture in the specified filename. This option cannot be used with multiple MP3 files.</para> Loading Loading
.gitlab-ci.yml +19 −7 Original line number Diff line number Diff line configure: cache: paths: - _build stages: - config - compile - test config: stage: config needs: [] script: - meson build - meson _build compile: stage: compile needs: ["config"] script: - meson build - ninja -C build - ninja -C _build test: stage: test needs: ["compile"] script: - meson build - ninja -C build - ninja -C build test - ninja -C _build test
lib/mlm/file-tags.vala +1 −1 Original line number Diff line number Diff line Loading @@ -259,7 +259,7 @@ namespace MLM { /* The path of the file. */ private string path; /* The modification date of the file. */ private GLib.TimeVal time; private GLib.DateTime time; /* The file. */ private Id3Tag.File file; /* The ID3 tag. */ Loading
lib/mlm/util.vala +5 −8 Original line number Diff line number Diff line Loading @@ -65,16 +65,16 @@ namespace MLM { * @param filename the file name. * @return the modification time of a file. */ public static GLib.TimeVal get_file_time(string filename) { public static GLib.DateTime get_file_time(string filename) { try { var file = GLib.File.new_for_path(filename); var info = file.query_info("time::modified", GLib.FileQueryInfoFlags.NONE); return info.get_modification_time(); return info.get_modification_date_time(); } catch (GLib.Error e) { GLib.warning("There was an error reading from ‘%s’.\n", filename); } return GLib.TimeVal(); return new GLib.DateTime.now_local(); } /** Loading @@ -82,14 +82,11 @@ namespace MLM { * @param filename the file name. * @param time the modification time. */ public static void set_file_time(string filename, GLib.TimeVal time) { public static void set_file_time(string filename, GLib.DateTime time) { try { var file = GLib.File.new_for_path(filename); var info = new GLib.FileInfo(); info.set_attribute_uint64("time::modified", (uint64)time.tv_sec); info.set_attribute_uint32("time::modified-usec", (uint32)time.tv_usec); info.set_attribute_uint64("time::access", (uint64)time.tv_sec); info.set_attribute_uint32("time::access-usec", (uint32)time.tv_usec); info.set_modification_date_time(time); file.set_attributes_from_info(info, GLib.FileQueryInfoFlags.NONE); } catch (GLib.Error e) { GLib.warning("There was an error writing to ‘%s’.\n", filename); Loading
lib/test/test-case.vala +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ namespace MLM.Test { * Creates a new test case with a given name. * @param name the name of the test case. */ public TestCase(string name) { protected TestCase(string name) { this.suite = new GLib.TestSuite(name); } Loading
man/mlm-tags.xml +10 −10 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ <varlistentry> <term><option>-c</option></term> <term>--comment=COMMENT</term> <term><option>--comment=COMMENT</option></term> <listitem> <para>Set the comment.</para> </listitem> Loading @@ -174,7 +174,7 @@ <varlistentry> <term><option>-s</option></term> <term>--composer=COMPOSER</term> <term><option>--composer=COMPOSER</option></term> <listitem> <para>Set the composer.</para> </listitem> Loading @@ -182,7 +182,7 @@ <varlistentry> <term><option>-o</option></term> <term>--original-artist=ARTIST</term> <term><option>--original-artist=ARTIST</option></term> <listitem> <para>Set the original artist.</para> </listitem> Loading @@ -190,7 +190,7 @@ <varlistentry> <term><option>-f</option></term> <term>--cover-picture=FILENAME</term> <term><option>--cover-picture=FILENAME</option></term> <listitem> <para>Set the album cover picture. It can be a PNG or a JPG file.</para> Loading @@ -199,7 +199,7 @@ <varlistentry> <term><option>-u</option></term> <term>--artist-picture=FILENAME</term> <term><option>--artist-picture=FILENAME</option></term> <listitem> <para>Set the artist picture. It can be a PNG or a JPG file.</para> </listitem> Loading @@ -207,7 +207,7 @@ <varlistentry> <term><option>-r</option></term> <term>--remove</term> <term><option>--remove</option></term> <listitem> <para>Remove all tags from the MP3 files.</para> </listitem> Loading @@ -215,7 +215,7 @@ <varlistentry> <term><option>-p</option></term> <term>--print=FORMAT</term> <term><option>--print=FORMAT</option></term> <listitem> <para>Formated print; see the <citetitle><replaceable>FORMAT FLAGS</replaceable></citetitle> section below.</para> Loading @@ -224,7 +224,7 @@ <varlistentry> <term><option>-G</option></term> <term>--genres</term> <term><option>--genres</option></term> <listitem> <para>Printa all the standard genres.</para> </listitem> Loading @@ -232,7 +232,7 @@ <varlistentry> <term><option>-F</option></term> <term>--output-cover-picture=FILENAME</term> <term><option>--output-cover-picture=FILENAME</option></term> <listitem> <para>Saves the album cover picture in the specified filename. This option cannot be used with multiple MP3 files.</para> Loading @@ -241,7 +241,7 @@ <varlistentry> <term><option>-A</option></term> <term>--output-artist-picture=FILENAME</term> <term><option>--output-artist-picture=FILENAME</option></term> <listitem> <para>Saves the artist picture in the specified filename. This option cannot be used with multiple MP3 files.</para> Loading