diff -Nru kaffeine-2.0.18/debian/changelog kaffeine-2.0.18/debian/changelog --- kaffeine-2.0.18/debian/changelog 2020-03-23 06:16:53.000000000 +0000 +++ kaffeine-2.0.18/debian/changelog 2021-08-15 09:27:27.000000000 +0100 @@ -1,3 +1,9 @@ +kaffeine (2.0.18-1ubuntu1) focal-updates; urgency=medium + + * dvb: allow dvb scantables larger than 64KiB (LP: #1879923) + + -- Tj Sun, 15 Aug 2021 09:27:27 +0100 + kaffeine (2.0.18-1build1) focal; urgency=medium * No-change rebuild for libgcc-s1 package name change. diff -Nru kaffeine-2.0.18/debian/patches/0001-allow-scantable-download-larger-than-64KiB.patch kaffeine-2.0.18/debian/patches/0001-allow-scantable-download-larger-than-64KiB.patch --- kaffeine-2.0.18/debian/patches/0001-allow-scantable-download-larger-than-64KiB.patch 1970-01-01 01:00:00.000000000 +0100 +++ kaffeine-2.0.18/debian/patches/0001-allow-scantable-download-larger-than-64KiB.patch 2021-08-15 09:17:37.000000000 +0100 @@ -0,0 +1,96 @@ +commit 209a263ab2191f0b1d13f48a0a2fa67794357ad0 +Author: Mauro Carvalho Chehab +Date: Fri Apr 30 08:35:31 2021 +0200 + + dvbconfigdialog: increase max download size for scandata + + By the time Kaffeine was written, a 64KB max limit were + enough, but nowadays, the scandata file has already 104KB. + + Increase the limit up to 1MB, in order to fix download + issues with valid files. + + While here, also improve the download messages to show + how much data was downloaded and to report the reason + why a download was aborted. + + BUG: 436371 + + Signed-off-by: Mauro Carvalho Chehab + +Origin: upstream, https://github.com/KDE/kaffeine/commit/209a263ab2191f0b1d13f48a0a2fa67794357ad0 +Bug: https://bugs.kde.org/show_bug.cgi?id=436371 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/kaffeine/+bug/1879923 + +diff --git a/src/dvb/dvbconfigdialog.cpp b/src/dvb/dvbconfigdialog.cpp +index 7b45777..2abc606 100644 +--- a/src/dvb/dvbconfigdialog.cpp ++++ b/src/dvb/dvbconfigdialog.cpp +@@ -614,6 +614,8 @@ DvbScanFileDownloadDialog::DvbScanFileDownloadDialog(DvbManager *manager_, QWidg + setLayout(mainLayout); + mainLayout->addWidget(mainWidget); + ++ errorMsg = "Scan data update aborted."; ++ + buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); + buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); + connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept())); +@@ -655,10 +657,20 @@ void DvbScanFileDownloadDialog::progressChanged(KJob *, unsigned long percent) + + void DvbScanFileDownloadDialog::dataArrived(KIO::Job *, const QByteArray &data) + { +- if ((scanData.size() + data.size()) <= (64 * 1024)) { +- scanData.append(data); +- } else { +- job->kill(KJob::EmitResult); ++ scanData.append(data); ++ ++ /* ++ * Current size in April, 2021 is 104KB. ++ * Add an upper size limit here (1 MB), just in case, in order to ++ * prevent potential issues. ++ */ ++ int maxLimit = 1024 * 1024; ++ ++ if (scanData.size() > maxLimit) { ++ errorMsg = i18n("Scan file is becoming bigger than %1 KB.\n" ++ "Aborting, as something might be wrong...\n", ++ QString::number(maxLimit / 1024., 'f', 2)); ++ job->kill(KJob::EmitResult); + } + } + +@@ -668,7 +680,7 @@ void DvbScanFileDownloadDialog::jobFinished() + + if (job->error() != 0) { + if (job->error() == KJob::KilledJobError) { +- label->setText(i18n("Scan data update failed.")); ++ label->setText(errorMsg); + } else { + label->setText(job->errorString()); + } +@@ -678,8 +690,10 @@ void DvbScanFileDownloadDialog::jobFinished() + + if (manager->updateScanData(scanData)) { + buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); +- label->setText(i18n("Scan data successfully updated. Changes take\n" +- "effect after you have closed the configuration dialog.")); ++ label->setText(i18n("Scan data successfully updated. %1 KB received.\n" ++ "Changes take effect after you have closed\n" ++ "the configuration dialog.", ++ QString::number(scanData.size() / 1024., 'f', 2))); + } else { + label->setText(i18n("Scan data update failed.")); + } +diff --git a/src/dvb/dvbconfigdialog.h b/src/dvb/dvbconfigdialog.h +index 476afec..21994ea 100644 +--- a/src/dvb/dvbconfigdialog.h ++++ b/src/dvb/dvbconfigdialog.h +@@ -138,6 +138,7 @@ private: + QByteArray scanData; + QVBoxLayout *mainLayout; + QDialogButtonBox *buttonBox; ++ QString errorMsg; + }; + + class DvbConfigPage : public QWidget diff -Nru kaffeine-2.0.18/debian/patches/series kaffeine-2.0.18/debian/patches/series --- kaffeine-2.0.18/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ kaffeine-2.0.18/debian/patches/series 2021-08-15 09:07:48.000000000 +0100 @@ -0,0 +1 @@ +0001-allow-scantable-download-larger-than-64KiB.patch