shithub: libtags

Download patch

ref: 5287e980106078295287e6485d624c48fe225cec
parent: cb906b7f354c006a9f26d08bcf9de36678c5a47b
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Dec 9 08:36:03 EST 2020

add very basic IT support

--- /dev/null
+++ b/it.c
@@ -1,0 +1,14 @@
+#include "tagspriv.h"
+
+int
+tagit(Tagctx *ctx)
+{
+	char d[4+26+1];
+
+	if(ctx->read(ctx, d, 4+26) != 4+26 || memcmp(d, "IMPM", 4) != 0)
+		return -1;
+	d[4+26] = 0;
+	txtcb(ctx, Ttitle, "", d+4);
+
+	return 0;
+}
--- a/mkfile
+++ b/mkfile
@@ -7,6 +7,7 @@
 	id3genres.$O\
 	id3v1.$O\
 	id3v2.$O\
+	it.$O\
 	m4a.$O\
 	opus.$O\
 	tags.$O\
--- a/tags.c
+++ b/tags.c
@@ -12,6 +12,7 @@
 extern int tagflac(Tagctx *ctx);
 extern int tagid3v2(Tagctx *ctx);
 extern int tagid3v1(Tagctx *ctx);
+extern int tagit(Tagctx *ctx);
 extern int tagm4a(Tagctx *ctx);
 extern int tagopus(Tagctx *ctx);
 extern int tagwav(Tagctx *ctx);
@@ -25,6 +26,7 @@
 	{tagm4a, Fm4a},
 	{tagopus, Fopus},
 	{tagwav, Fwav},
+	{tagit, Fit},
 };
 
 void
--- a/tags.h
+++ b/tags.h
@@ -32,6 +32,7 @@
 	Fm4a,
 	Fopus,
 	Fwav,
+	Fit,
 
 	Fmax,
 };