From 782df37487b53db51984f37f7d0e31cd328f3a1a Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 24 Jan 2023 19:57:33 +0100 Subject: [PATCH 1/1] server: ls -l=c: Don't print chunk table in case of dynamic chunks. The chunk table stored in the osl disk object of the paraslash database is useless for audio formats which support dynamic chunks (aac only). Omit this part of the ls output. --- aft.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/aft.c b/aft.c index afe8c49d..a15a1d2c 100644 --- a/aft.c +++ b/aft.c @@ -800,6 +800,12 @@ static int print_chunk_table(struct ls_data *d, struct para_buffer *b) int ret, i; char *buf; + para_printf(b, "%s\nchunk_time: %lu:%lu\n", d->path, + (long unsigned) d->afhi.chunk_tv.tv_sec, + (long unsigned) d->afhi.chunk_tv.tv_usec + ); + if (afh_supports_dynamic_chunks(d->afsi.audio_format_id)) + return 0; ret = aft_get_row_of_hash(d->hash, &aft_row); if (ret < 0) return ret; @@ -807,12 +813,7 @@ static int print_chunk_table(struct ls_data *d, struct para_buffer *b) AFTCOL_CHUNKS, &chunk_table_obj)); if (ret < 0) return ret; - para_printf(b, "%s\n" - "chunk_time: %lu:%lu\nchunk_offsets: ", - d->path, - (long unsigned) d->afhi.chunk_tv.tv_sec, - (long unsigned) d->afhi.chunk_tv.tv_usec - ); + para_printf(b, "chunk_offsets: "); buf = chunk_table_obj.data; for ( i = 0; -- 2.39.2