everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* [PATCH] av_ff_common: set TRACKNUMBER comment from "track"
@ 2023-10-12  9:22 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2023-10-12  9:22 UTC (permalink / raw)
  To: dtas-all

ffprobe aways says `track' instead of `TRACKNUMBER'; but
the rest of our code follows FLAC metadata conventions;
so use `TRACKNUMBER'.

(avprobe is untested since the libav project is dead)
---
 lib/dtas/source/av_ff_common.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/dtas/source/av_ff_common.rb b/lib/dtas/source/av_ff_common.rb
index 0c84b2f..3839272 100644
--- a/lib/dtas/source/av_ff_common.rb
+++ b/lib/dtas/source/av_ff_common.rb
@@ -144,6 +144,11 @@ def av_ff_ok?
       comments[k] = -DTAS.try_enc(v, enc)
     end
 
+    # ffprobe always uses "track", favor FLAC convention "TRACKNUMBER":
+    if @comments['TRACK'] && !@comments['TRACKNUMBER']
+      @comments['TRACKNUMBER'] = @comments.delete('TRACK')
+    end
+
     ! @astreams.compact.empty?
   end
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-12  9:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-12  9:22 [PATCH] av_ff_common: set TRACKNUMBER comment from "track" Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).