commit r128gain for openSUSE:Factory
Hello community, here is the log from the commit of package r128gain for openSUSE:Factory checked in at 2020-09-22 21:13:50 Comparing /work/SRC/openSUSE:Factory/r128gain (Old) and /work/SRC/openSUSE:Factory/.r128gain.new.4249 (New) Package is "r128gain" Tue Sep 22 21:13:50 2020 rev:4 rq:835997 version:1.0.3 Changes: --- /work/SRC/openSUSE:Factory/r128gain/r128gain.changes2020-06-11 10:17:47.265678830 +0200 +++ /work/SRC/openSUSE:Factory/.r128gain.new.4249/r128gain.changes 2020-09-22 21:14:58.900128907 +0200 @@ -1,0 +2,7 @@ +Mon Sep 21 20:45:19 UTC 2020 - Martin Hauke + +- Update to version 1.0.3: + * Fix race causing futures to be forgotten too early + * Read/write MP4 tags using lowercase key format (fixes #22) + +--- Old: r128gain-1.0.2.tar.gz New: r128gain-1.0.3.tar.gz Other differences: -- ++ r128gain.spec ++ --- /var/tmp/diff_new_pack.Qzvn6W/_old 2020-09-22 21:15:00.012129879 +0200 +++ /var/tmp/diff_new_pack.Qzvn6W/_new 2020-09-22 21:15:00.016129882 +0200 @@ -18,7 +18,7 @@ Name: r128gain -Version:1.0.2 +Version:1.0.3 Release:0 Summary:Fast audio loudness (ReplayGain / R128) scanner & tagger License:LGPL-2.0-only ++ r128gain-1.0.2.tar.gz -> r128gain-1.0.3.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/r128gain-1.0.2/r128gain/__init__.py new/r128gain-1.0.3/r128gain/__init__.py --- old/r128gain-1.0.2/r128gain/__init__.py 2020-06-08 01:23:45.0 +0200 +++ new/r128gain-1.0.3/r128gain/__init__.py 2020-09-21 21:44:01.0 +0200 @@ -2,7 +2,7 @@ """ Scan audio files and tag them with ReplayGain/R128 loudness metadata. """ -__version__ = "1.0.2" +__version__ = "1.0.3" __author__ = "desbma" __license__ = "LGPLv2" @@ -96,12 +96,6 @@ return r -def format_ffmpeg_filter(name, params): - """ Build a string to call a FFMpeg filter. """ - return "%s=%s" % (name, -":".join("%s=%s" % (k, v) for k, v in params.items())) - - def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threading=True, ffmpeg_path=None, start_evt=None): """ Get R128 loudness loudness level and sample peak. """ @@ -391,11 +385,11 @@ isinstance(mf, mutagen.mp4.MP4)): # https://github.com/xbmc/xbmc/blob/9e855967380ef3a5d25718ff2e6db5e3dd2e2829/xbmc/music/tags/TagLoaderTagLib.cpp#L806-L812 if loudness is not None: - mf[":COM.APPLE.ITUNES:REPLAYGAIN_TRACK_GAIN"] = mutagen.mp4.MP4FreeForm(("%.2f dB" % (RG2_REF_R128_LOUDNESS_DBFS - loudness)).encode()) - mf[":COM.APPLE.ITUNES:REPLAYGAIN_TRACK_PEAK"] = mutagen.mp4.MP4FreeForm(("%.6f" % (peak)).encode()) + mf[":com.apple.iTunes:replaygain_track_gain"] = mutagen.mp4.MP4FreeForm(("%.2f dB" % (RG2_REF_R128_LOUDNESS_DBFS - loudness)).encode()) + mf[":com.apple.iTunes:replaygain_track_peak"] = mutagen.mp4.MP4FreeForm(("%.6f" % (peak)).encode()) if album_loudness is not None: - mf[":COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_GAIN"] = mutagen.mp4.MP4FreeForm(("%.2f dB" % (RG2_REF_R128_LOUDNESS_DBFS - album_loudness)).encode()) - mf[":COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_PEAK"] = mutagen.mp4.MP4FreeForm(("%.6f" % (album_peak)).encode()) + mf[":com.apple.iTunes:replaygain_album_gain"] = mutagen.mp4.MP4FreeForm(("%.2f dB" % (RG2_REF_R128_LOUDNESS_DBFS - album_loudness)).encode()) + mf[":com.apple.iTunes:replaygain_album_peak"] = mutagen.mp4.MP4FreeForm(("%.6f" % (album_peak)).encode()) else: raise RuntimeError("Unhandled '%s' tag format for file '%s'" % (mf.__class__.__name__, @@ -443,8 +437,8 @@ elif (isinstance(mf.tags, mutagen.mp4.MP4Tags) or isinstance(mf, mutagen.mp4.MP4)): -track = (":COM.APPLE.ITUNES:REPLAYGAIN_TRACK_GAIN" in mf) and (":COM.APPLE.ITUNES:REPLAYGAIN_TRACK_PEAK" in mf) -album = (":COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_GAIN" in mf) and (":COM.APPLE.ITUNES:REPLAYGAIN_ALBUM_PEAK" in mf) +track = (":com.apple.iTunes:replaygain_track_gain" in mf) and (":com.apple.iTunes:replaygain_track_peak" in mf) +album = (":com.apple.iTunes:replaygain_album_gain" in mf) and (":com.apple.iTunes:replaygain_album_peak" in mf) else: logger().warning("Unhandled '%s' tag format for file %r" % (mf.__class__.__name__, @@ -598,10 +592,11 @@ # get results start_evt.set() pending_futures = futures +retained_futures = set() + while futures: done_futures, pending_futures = concurrent.futures.wait(pending_futures,
commit r128gain for openSUSE:Factory
Hello community, here is the log from the commit of package r128gain for openSUSE:Factory checked in at 2020-06-11 10:14:07 Comparing /work/SRC/openSUSE:Factory/r128gain (Old) and /work/SRC/openSUSE:Factory/.r128gain.new.3606 (New) Package is "r128gain" Thu Jun 11 10:14:07 2020 rev:3 rq:813389 version:1.0.2 Changes: --- /work/SRC/openSUSE:Factory/r128gain/r128gain.changes2020-02-03 11:15:09.881900925 +0100 +++ /work/SRC/openSUSE:Factory/.r128gain.new.3606/r128gain.changes 2020-06-11 10:17:47.265678830 +0200 @@ -1,0 +2,7 @@ +Wed Jun 10 10:44:05 UTC 2020 - Martin Hauke + +- Update to version 1.0.2: + * Better handling of non unicode filenames + * Pass ffmpeg verbosity flags + +--- Old: r128gain-1.0.1.tar.gz New: r128gain-1.0.2.tar.gz Other differences: -- ++ r128gain.spec ++ --- /var/tmp/diff_new_pack.8KZrOI/_old 2020-06-11 10:17:49.373685597 +0200 +++ /var/tmp/diff_new_pack.8KZrOI/_new 2020-06-11 10:17:49.377685610 +0200 @@ -1,7 +1,7 @@ # # spec file for package r128gain # -# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2020, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: r128gain -Version:1.0.1 +Version:1.0.2 Release:0 Summary:Fast audio loudness (ReplayGain / R128) scanner & tagger License:LGPL-2.0-only ++ r128gain-1.0.1.tar.gz -> r128gain-1.0.2.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/r128gain-1.0.1/r128gain/__init__.py new/r128gain-1.0.2/r128gain/__init__.py --- old/r128gain-1.0.1/r128gain/__init__.py 2020-02-02 14:23:54.0 +0100 +++ new/r128gain-1.0.2/r128gain/__init__.py 2020-06-08 01:23:45.0 +0200 @@ -2,7 +2,7 @@ """ Scan audio files and tag them with ReplayGain/R128 loudness metadata. """ -__version__ = "1.0.1" +__version__ = "1.0.2" __author__ = "desbma" __license__ = "LGPLv2" @@ -109,7 +109,7 @@ start_evt.wait() logger().info("Analyzing loudness of file%s %s..." % ("s" if (len(audio_filepaths) > 1) else "", -", ".join("'%s'" % (audio_filepath) for audio_filepath in audio_filepaths))) +", ".join(repr(audio_filepath) for audio_filepath in audio_filepaths))) # build command line ffmpeg_inputs = [] @@ -121,7 +121,7 @@ ffmpeg_input = ffmpeg.input(audio_filepath, **additional_ffmpeg_args).audio ffmpeg_inputs.append(ffmpeg_input) - output_streams = [] + output_streams = [] ffmpeg_r128_streams = [] for ffmpeg_input in ffmpeg_inputs: if calc_peak: @@ -155,7 +155,7 @@ cmd = ffmpeg.compile(ffmpeg.output(*output_streams, os.devnull, **additional_ffmpeg_args, - f="null"), + f="null").global_args("-hide_banner", "-nostats"), cmd=ffmpeg_path or "ffmpeg") # run @@ -231,7 +231,7 @@ futures[future] = ALBUM_GAIN_KEY for audio_filepath in audio_filepaths: if skip_tagged and has_loudness_tag(audio_filepath)[0]: -logger().info("File '%s' already has a track gain tag, skipping track gain scan" % (audio_filepath)) +logger().info("File %r already has a track gain tag, skipping track gain scan" % (audio_filepath)) # create dummy future future = executor.submit(lambda: None) else: @@ -260,15 +260,14 @@ try: result = done_future.result() except Exception as e: - # raise if audio_filepath == ALBUM_GAIN_KEY: -logger().warning("Failed to analyze files %s: %s %s" % (", ".join("'%s'" % (audio_filepath) for audio_filepath in audio_filepaths), +logger().warning("Failed to analyze files %s: %s %s" % (", ".join(repr(audio_filepath) for audio_filepath in audio_filepaths), e.__class__.__qualname__, e)) else: -logger().warning("Failed to analyze file '%s': %s %s" % (audio_filepath, - e.__class__.__qualname__, - e)) +logger().warning("Failed to analyze file %r: %s %s" % (audio_filepath, +
commit r128gain for openSUSE:Factory
Hello community, here is the log from the commit of package r128gain for openSUSE:Factory checked in at 2020-02-03 11:15:03 Comparing /work/SRC/openSUSE:Factory/r128gain (Old) and /work/SRC/openSUSE:Factory/.r128gain.new.26092 (New) Package is "r128gain" Mon Feb 3 11:15:03 2020 rev:2 rq:769354 version:1.0.1 Changes: --- /work/SRC/openSUSE:Factory/r128gain/r128gain.changes2020-01-15 16:50:09.921340978 +0100 +++ /work/SRC/openSUSE:Factory/.r128gain.new.26092/r128gain.changes 2020-02-03 11:15:09.881900925 +0100 @@ -1,0 +2,7 @@ +Sun Feb 2 13:51:04 UTC 2020 - Martin Hauke + +- Update to version 1.0.1 + * Logging fix + * Improve & refractor recursive progress report + +--- Old: r128gain-1.0.0.tar.gz New: r128gain-1.0.1.tar.gz Other differences: -- ++ r128gain.spec ++ --- /var/tmp/diff_new_pack.3qAYNC/_old 2020-02-03 11:15:11.757901873 +0100 +++ /var/tmp/diff_new_pack.3qAYNC/_new 2020-02-03 11:15:11.785901888 +0100 @@ -1,6 +1,7 @@ # # spec file for package r128gain # +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2020, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -17,20 +18,20 @@ Name: r128gain -Version:1.0.0 +Version:1.0.1 Release:0 Summary:Fast audio loudness (ReplayGain / R128) scanner & tagger -License:LGPL-2.0 +License:LGPL-2.0-only Group: Productivity/Multimedia/Sound/Players URL:https://github.com/desbma/r128gain Source: https://github.com/desbma/r128gain/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: python3-setuptools -Requires: python3-future Requires: python3-crcmod >= 1.7 Requires: python3-ffmpeg-python >= 0.2 -Requires: python3-mutagen >= 1.38 +Requires: python3-future +Requires: python3-mutagen >= 1.43 Requires: python3-tqdm >= 4.28.1 BuildArch: noarch ++ r128gain-1.0.0.tar.gz -> r128gain-1.0.1.tar.gz ++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/r128gain-1.0.0/freeze.py new/r128gain-1.0.1/freeze.py --- old/r128gain-1.0.0/freeze.py2020-01-12 01:55:20.0 +0100 +++ new/r128gain-1.0.1/freeze.py2020-02-02 14:23:54.0 +0100 @@ -9,7 +9,8 @@ with open(os.path.join("r128gain", "__init__.py"), "rt") as f: version = re.search("__version__ = \"([^\"]+)\"", f.read()).group(1) -build_exe_options = {"optimize": 0} +build_exe_options = {"optimize": 0, + "excludes": ["tkinter"]} setup(name="r128gain", version=version, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/r128gain-1.0.0/r128gain/__init__.py new/r128gain-1.0.1/r128gain/__init__.py --- old/r128gain-1.0.0/r128gain/__init__.py 2020-01-12 01:55:20.0 +0100 +++ new/r128gain-1.0.1/r128gain/__init__.py 2020-02-02 14:23:54.0 +0100 @@ -2,7 +2,7 @@ """ Scan audio files and tag them with ReplayGain/R128 loudness metadata. """ -__version__ = "1.0.0" +__version__ = "1.0.1" __author__ = "desbma" __license__ = "LGPLv2" @@ -20,6 +20,7 @@ import shutil import subprocess import sys +import threading import ffmpeg import mutagen @@ -42,12 +43,28 @@ RG2_REF_R128_LOUDNESS_DBFS = -18 OPUS_REF_R128_LOUDNESS_DBFS = -23 ALBUM_GAIN_KEY = 0 +try: + OPTIMAL_THREAD_COUNT = len(os.sched_getaffinity(0)) +except AttributeError: + OPTIMAL_THREAD_COUNT = os.cpu_count() def logger(): return logging.getLogger("r128gain") +@contextlib.contextmanager +def dynamic_tqdm(*tqdm_args, **tqdm_kwargs): + """ Context manager that returns a tqdm object or None depending on context. """ + with contextlib.ExitStack() as cm: +if sys.stderr.isatty() and logger().isEnabledFor(logging.INFO): + progress = cm.enter_context(tqdm.tqdm(*tqdm_args, **tqdm_kwargs)) + cm.enter_context(tqdm_logging.redirect_logging(progress)) +else: + progress = None +yield progress + + def is_audio_filepath(filepath): """ Return True if filepath is a supported audio file. """ # TODO more robust way to identify audio files? (open with mutagen?) @@ -85,8 +102,12 @@ ":".join("%s=%s" % (k, v) for k, v in params.items())) -def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threading=True, ffmpeg_path=None): +def get_r128_loudness(audio_filepaths, *, calc_peak=True, enable_ffmpeg_threading=True, ffmpeg_path=None, + start_evt=None): """