From da9f9b375358dfd8e9ede4bf3b4ad27fb759dfd8 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 10 Jun 2021 14:11:57 +0930 Subject: [PATCH] Remove duplicate blob metadata. --- Makefile | 10 +++++----- dbindex.c | 27 --------------------------- dbindex.h | 1 + 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/Makefile b/Makefile index 153b89f..45fe3da 100644 --- a/Makefile +++ b/Makefile @@ -102,13 +102,13 @@ SOURCES= \ music-player.c \ notify.c -disk-monitor: disk-monitor.o dbindex.o dbmarshal.o notify.o -disk-indexer: disk-indexer.o dbindex.o dbmarshal.o notify.o analyse.o +disk-monitor: disk-monitor.o dbindex.o dbmarshal.o blobs.o notify.o +disk-indexer: disk-indexer.o dbindex.o dbmarshal.o blobs.o notify.o analyse.o audio-cmd: audio-cmd.o notify.o blobs.o -music-player: music-player.o notify.o dbindex.o dbmarshal.o +music-player: music-player.o notify.o dbindex.o dbmarshal.o blobs.o input-monitor: input-monitor.o notify.o blobs.o -disk-util: disk-util.o dbindex.o dbmarshal.o -http-monitor: http-monitor.o dbindex.o notify.o dbmarshal.o ../libeze/libeze.a +disk-util: disk-util.o dbindex.o dbmarshal.o blobs.o +http-monitor: http-monitor.o dbindex.o notify.o dbmarshal.o blobs.o ../libeze/libeze.a dbindex.o: dbmarshal.h diff --git a/dbindex.c b/dbindex.c index 52fc2dc..283f696 100644 --- a/dbindex.c +++ b/dbindex.c @@ -42,26 +42,6 @@ // prototype void dblist_dump(dbtxn *txn, dbindex *db); -ez_blob_desc DBDISK_DESC[] = { - EZ_BLOB_START(dbdisk, 1, 4), - EZ_BLOB_STRING(dbdisk, 1, uuid), - EZ_BLOB_STRING(dbdisk, 2, label), - EZ_BLOB_STRING(dbdisk, 3, type), - EZ_BLOB_STRING(dbdisk, 4, mount), -}; - -ez_blob_desc DBFILE_DESC[] = { - EZ_BLOB_START(dbfile, 2, 7), - EZ_BLOB_INT32(dbfile, 1, diskid), - EZ_BLOB_INT64(dbfile, 2, size), - EZ_BLOB_INT64(dbfile, 3, mtime), - EZ_BLOB_INT64(dbfile, 4, duration), - EZ_BLOB_STRING(dbfile, 5, path), - EZ_BLOB_STRING(dbfile, 6, title), - EZ_BLOB_STRING(dbfile, 7, artist), - EZ_BLOB_TRANSIENTP(dbfile, 8, full_path), -}; - /* TODO: playlist should be linked list @@ -110,13 +90,6 @@ struct dblistfile { uint32_t seq; }; -ez_blob_desc DBLIST_DESC[] = { - EZ_BLOB_START(dblist, 3, 3), - EZ_BLOB_INT32(dblist, 1, size), - EZ_BLOB_STRING(dblist, 2, name), - EZ_BLOB_STRING(dblist, 3, comment), -}; - struct dbindex { int res; // last result diff --git a/dbindex.h b/dbindex.h index 73d53fe..34f6200 100644 --- a/dbindex.h +++ b/dbindex.h @@ -118,6 +118,7 @@ void dbfile_scan_close(dbscan *scan); extern ez_blob_desc DBDISK_DESC[]; extern ez_blob_desc DBFILE_DESC[]; +extern ez_blob_desc DBLIST_DESC[]; /* Player support */ int dbfile_next(dbindex *db, dbfile **f, char **fpath); -- 2.39.2