Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package flacon for openSUSE:Factory checked 
in at 2023-05-30 22:02:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/flacon (Old)
 and      /work/SRC/openSUSE:Factory/.flacon.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "flacon"

Tue May 30 22:02:54 2023 rev:12 rq:1089756 version:11.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/flacon/flacon.changes    2023-05-21 
19:09:37.106746830 +0200
+++ /work/SRC/openSUSE:Factory/.flacon.new.1533/flacon.changes  2023-05-30 
22:03:10.667270338 +0200
@@ -1,0 +2,6 @@
+Tue May 30 08:12:06 UTC 2023 - Andrea Manzini <andrea.manz...@suse.com>
+
+- Update to 11.1.0:
+  * Fix: In some situations, the program did not check whether the sox program 
was installed.
+
+-------------------------------------------------------------------

Old:
----
  flacon-11.0.0.tar.gz

New:
----
  flacon-11.1.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ flacon.spec ++++++
--- /var/tmp/diff_new_pack.xLnhB4/_old  2023-05-30 22:03:11.179273355 +0200
+++ /var/tmp/diff_new_pack.xLnhB4/_new  2023-05-30 22:03:11.187273402 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           flacon
-Version:        11.0.0
+Version:        11.1.0
 Release:        0
 Summary:        Audio File Encoder
 License:        LGPL-2.1-or-later

++++++ flacon-11.0.0.tar.gz -> flacon-11.1.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/CMakeLists.txt 
new/flacon-11.1.0/CMakeLists.txt
--- old/flacon-11.0.0/CMakeLists.txt    2023-05-19 09:57:35.000000000 +0200
+++ new/flacon-11.1.0/CMakeLists.txt    2023-05-28 14:23:24.000000000 +0200
@@ -33,7 +33,7 @@
 
 
 set(MAJOR_VERSION 11)
-set(MINOR_VERSION 0)
+set(MINOR_VERSION 1)
 set(PATCH_VERSION 0)
 #set(BETA_VERSION beta1)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/misc/Info.plist.in 
new/flacon-11.1.0/misc/Info.plist.in
--- old/flacon-11.0.0/misc/Info.plist.in        2023-05-19 09:57:35.000000000 
+0200
+++ new/flacon-11.1.0/misc/Info.plist.in        2023-05-28 14:23:24.000000000 
+0200
@@ -22,6 +22,9 @@
 
        <key>LSHasLocalizedDisplayName</key>
        <true/>
+       
+       <key>LSMinimumSystemVersion</key>
+       <string>11.0.0</string>
 
        <key>NSHighResolutionCapable</key>
        <true/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/misc/com.github.Flacon.metainfo.xml.in 
new/flacon-11.1.0/misc/com.github.Flacon.metainfo.xml.in
--- old/flacon-11.0.0/misc/com.github.Flacon.metainfo.xml.in    2023-05-19 
09:57:35.000000000 +0200
+++ new/flacon-11.1.0/misc/com.github.Flacon.metainfo.xml.in    2023-05-28 
14:23:24.000000000 +0200
@@ -56,9 +56,10 @@
   </screenshots>
 
   <releases>
-    <release date="2023-05-19" version="11.0.0">
+    <release date="2023-05-19" version="11.1.0">
       <description><p>Latest version of Flacon on Flathub.</p></description>
     </release>
+    <release date="2023-05-19" version="11.0.0" />
     <release date="2023-01-20" version="10.0.0" />
     <release date="2022-11-20" version="9.5.1" />
     <release date="2022-11-17" version="9.5.0" />
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/project.cpp 
new/flacon-11.1.0/project.cpp
--- old/flacon-11.0.0/project.cpp       2023-05-19 09:57:35.000000000 +0200
+++ new/flacon-11.1.0/project.cpp       2023-05-28 14:23:24.000000000 +0200
@@ -253,7 +253,10 @@
 /************************************************
 
  ************************************************/
-void Project::emitLayoutChanged() const
+void Project::emitLayoutChanged()
 {
     emit layoutChanged();
+    if (mValidator.isValid()) {
+        mValidator.revalidate();
+    }
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/project.h new/flacon-11.1.0/project.h
--- old/flacon-11.0.0/project.h 2023-05-19 09:57:35.000000000 +0200
+++ new/flacon-11.1.0/project.h 2023-05-28 14:23:24.000000000 +0200
@@ -54,7 +54,7 @@
     void removeDisc(const QList<Disc *> &discs);
 
     void emitDiscChanged(Disc *disc);
-    void emitLayoutChanged() const;
+    void emitLayoutChanged();
 
     bool discExists(const QString &cueUri);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/tests/convertertest.cpp 
new/flacon-11.1.0/tests/convertertest.cpp
--- old/flacon-11.0.0/tests/convertertest.cpp   2023-05-19 09:57:35.000000000 
+0200
+++ new/flacon-11.1.0/tests/convertertest.cpp   2023-05-28 14:23:24.000000000 
+0200
@@ -156,6 +156,48 @@
 /************************************************
 
  ************************************************/
+static QStringList parseCombinedArgString(const QString &program)
+{
+    QStringList args;
+    QString     tmp;
+    int         quoteCount = 0;
+    bool        inQuote    = false;
+    // handle quoting. tokens can be surrounded by double quotes
+    // "hello world". three consecutive double quotes represent
+    // the quote character itself.
+    for (int i = 0; i < program.size(); ++i) {
+        if (program.at(i) == QLatin1Char('"')) {
+            ++quoteCount;
+            if (quoteCount == 3) {
+                // third consecutive quote
+                quoteCount = 0;
+                tmp += program.at(i);
+            }
+            continue;
+        }
+        if (quoteCount) {
+            if (quoteCount == 1)
+                inQuote = !inQuote;
+            quoteCount = 0;
+        }
+        if (!inQuote && program.at(i).isSpace()) {
+            if (!tmp.isEmpty()) {
+                args += tmp;
+                tmp.clear();
+            }
+        }
+        else {
+            tmp += program.at(i);
+        }
+    }
+    if (!tmp.isEmpty())
+        args += tmp;
+    return args;
+}
+
+/************************************************
+
+ ************************************************/
 void ConverterTest::srcAudioExec(QSettings &spec) const
 {
     spec.beginGroup("commands");
@@ -163,7 +205,11 @@
     QStringList keys = spec.allKeys();
     for (const QString &key : qAsConst(keys)) {
         QString cmd = spec.value(key).toString();
-        if (QProcess::execute(cmd) != 0) {
+
+        QStringList args = parseCombinedArgString(cmd);
+        QString     prog = args.takeFirst();
+
+        if (QProcess::execute(prog, args) != 0) {
             throw FlaconError(QString("Command `%1` failed!").arg(cmd));
         }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/tests/convertertest.h 
new/flacon-11.1.0/tests/convertertest.h
--- old/flacon-11.0.0/tests/convertertest.h     2023-05-19 09:57:35.000000000 
+0200
+++ new/flacon-11.1.0/tests/convertertest.h     2023-05-28 14:23:24.000000000 
+0200
@@ -55,8 +55,6 @@
     const QString mInDir;
     const QString mOutDir;
 
-    QSettings *mSpec;
-
     void srcAudioExec(QSettings &spec) const;
 
     QStringList readFile(const QString &fileName);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/flacon-11.0.0/tests/data/testValidator/07 - sox not 
found/disk_01.cue" "new/flacon-11.1.0/tests/data/testValidator/07 - sox not 
found/disk_01.cue"
--- "old/flacon-11.0.0/tests/data/testValidator/07 - sox not found/disk_01.cue" 
1970-01-01 01:00:00.000000000 +0100
+++ "new/flacon-11.1.0/tests/data/testValidator/07 - sox not found/disk_01.cue" 
2023-05-28 14:23:24.000000000 +0200
@@ -0,0 +1,22 @@
+REM GENRE "Modern Rock"
+REM DATE 2011
+REM DISCID 12345678
+REM COMMENT "ExactAudioCopy v0.95b4"
+PERFORMER "Test for flacon"
+TITLE "Short file"
+FILE "short.wav" WAVE
+  TRACK 01 AUDIO
+    TITLE "Short track 1"
+    INDEX 00 00:00:00
+    INDEX 01 00:00:33
+  TRACK 02 AUDIO
+    TITLE "Short track 2"
+    INDEX 01 00:46:00
+  TRACK 03 AUDIO
+    TITLE "Short track 3"
+    INDEX 00 01:22:22
+    INDEX 01 01:25:10
+  TRACK 04 AUDIO
+    TITLE "Short track 4"
+    INDEX 00 02:39:54
+    INDEX 01 02:41:05
Binary files old/flacon-11.0.0/tests/data/testValidator/07 - sox not 
found/disk_01.w64 and new/flacon-11.1.0/tests/data/testValidator/07 - sox not 
found/disk_01.w64 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/flacon-11.0.0/tests/data/testValidator/07 - sox not 
found/flacon.conf" "new/flacon-11.1.0/tests/data/testValidator/07 - sox not 
found/flacon.conf"
--- "old/flacon-11.0.0/tests/data/testValidator/07 - sox not found/flacon.conf" 
1970-01-01 01:00:00.000000000 +0100
+++ "new/flacon-11.1.0/tests/data/testValidator/07 - sox not found/flacon.conf" 
2023-05-28 14:23:24.000000000 +0200
@@ -0,0 +1,19 @@
+[OutFiles]
+Profile=FLAC
+
+[Profiles/FLAC]
+    Format=FLAC
+    Name=Flac
+    Compression=5
+    CreateCue=false
+    OutDirectory=@TEST_DIR@/OUT
+    OutPattern=%a/{%y - }%A/%n - %t
+    ReplayGain=Disable
+    CoverEmbed/Mode = OrigSize
+    EmbedCue = True
+
+[Tags]
+DefaultCodepage=UTF-8
+
+[Programs]
+sox=/not/exists/sox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' "old/flacon-11.0.0/tests/data/testValidator/07 - sox not 
found/spec.json" "new/flacon-11.1.0/tests/data/testValidator/07 - sox not 
found/spec.json"
--- "old/flacon-11.0.0/tests/data/testValidator/07 - sox not found/spec.json"   
1970-01-01 01:00:00.000000000 +0100
+++ "new/flacon-11.1.0/tests/data/testValidator/07 - sox not found/spec.json"   
2023-05-28 14:23:24.000000000 +0200
@@ -0,0 +1,16 @@
+{
+    "disks": [
+        {
+        "cue":   "disk_01.cue",
+        "audio": "disk_01.w64",
+
+        "errors":  [
+            "The sox program is installed according to your settings, but the 
binary file can’t be found.<br>Verify that all required programs are 
installed and in your preferences."
+        ],
+        "warnings": [
+            "A maximum of 24-bit per sample is supported by this format. This 
value will be used for encoding."
+        ]
+        }
+
+    ]
+}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/tests/test_validator.cpp 
new/flacon-11.1.0/tests/test_validator.cpp
--- old/flacon-11.0.0/tests/test_validator.cpp  2023-05-19 09:57:35.000000000 
+0200
+++ new/flacon-11.1.0/tests/test_validator.cpp  2023-05-28 14:23:24.000000000 
+0200
@@ -104,7 +104,9 @@
 
         TestSettings settings(cfgFile);
 
-        Profile   profile = 
settings.readProfile(settings.readCurrentProfileId());
+        Profile profile = 
settings.readProfile(settings.readCurrentProfileId());
+        settings.readExtPrograms();
+
         Validator validator;
         validator.setProfile(&profile);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/validator.cpp 
new/flacon-11.1.0/validator.cpp
--- old/flacon-11.0.0/validator.cpp     2023-05-19 09:57:35.000000000 +0200
+++ new/flacon-11.1.0/validator.cpp     2023-05-28 14:23:24.000000000 +0200
@@ -207,6 +207,11 @@
     return false;
 }
 
+bool Validator::isValid() const
+{
+    return mProfile && !mDisks.isEmpty();
+}
+
 /************************************************
  *
  ************************************************/
@@ -422,18 +427,41 @@
 /************************************************
  *
  ************************************************/
-bool Validator::validateRasampler(const Disk *disk, QStringList &errors, 
QStringList &warnings)
+static bool needSox(const Profile *profile, const Disk *disk)
 {
-    Q_UNUSED(warnings)
+    if (profile->bitsPerSample() != BitsPerSample::AsSourcee || 
profile->sampleRate() != SampleRate::AsSource) {
+        return true;
+    }
+
+    for (const InputAudioFile &audio : disk->audioFiles()) {
+        int bps = calcQuality(audio.bitsPerSample(), profile->bitsPerSample(), 
profile->outFormat()->maxBitPerSample());
+        if (bps != audio.bitsPerSample()) {
+            return true;
+        }
 
-    bool needSox = false;
-    needSox      = needSox || (mProfile->bitsPerSample() != 
BitsPerSample::AsSourcee || mProfile->sampleRate() != SampleRate::AsSource);
+        int rate = calcQuality(audio.sampleRate(), profile->sampleRate(), 
profile->outFormat()->maxSampleRate());
+        if (rate != audio.sampleRate()) {
+            return true;
+        }
+    }
 
     for (const Track *track : disk->tracks()) {
-        needSox = needSox || track->preEmphased();
+        if (track->preEmphased()) {
+            return true;
+        }
     }
 
-    if (!needSox) {
+    return false;
+}
+
+/************************************************
+ *
+ ************************************************/
+bool Validator::validateRasampler(const Disk *disk, QStringList &errors, 
QStringList &warnings)
+{
+    Q_UNUSED(warnings)
+
+    if (!needSox(mProfile, disk)) {
         return true;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flacon-11.0.0/validator.h 
new/flacon-11.1.0/validator.h
--- old/flacon-11.0.0/validator.h       2023-05-19 09:57:35.000000000 +0200
+++ new/flacon-11.1.0/validator.h       2023-05-28 14:23:24.000000000 +0200
@@ -59,6 +59,8 @@
     bool hasWarnings() const;
     bool hasErrors() const;
 
+    bool isValid() const;
+
 signals:
     void changed();
 

Reply via email to