diff --git a/python/podcast/data_migration.py b/python/podcast/data_migration.py index 13de0da0e10292987e320e6f6d4a94018201662f..82f37d884862d1499f53539e054be640e6848eaa 100644 --- a/python/podcast/data_migration.py +++ b/python/podcast/data_migration.py @@ -41,6 +41,8 @@ def needs_migration(): if get_versionnumber() >= target_data_version: logger.info("Dataversion is fine (%d,%d).", get_versionnumber(), target_data_version) + if get_versionnumber() > target_data_version: + pyotherside.send("dbVersionHigherThanExpectedWarning") return False else: if app_is_pristine(): diff --git a/qml/components/MigrationHandler.qml b/qml/components/MigrationHandler.qml index b29b243a6377b42264aa9ccc515892085e5e5462..6850c28d4fcf85ad4c8f26747f9f7ffd3b824cf1 100644 --- a/qml/components/MigrationHandler.qml +++ b/qml/components/MigrationHandler.qml @@ -10,6 +10,7 @@ Python { signal migrationStart(int section, int miglen) signal migrationProgress(int section, int migpos) signal migrationSections(int param_start_section, int param_target_section) + signal dbVersionHigherThanExpectedWarning property int progress_max: 1 property int progress_current: 1 @@ -29,14 +30,17 @@ Python { setHandler("migrationProgress", migrationProgress) setHandler("migrationDone", migrationDone) setHandler("migrationSections", migrationSections) + setHandler("dbVersionHigherThanExpectedWarning", + dbVersionHigherThanExpectedWarning) addImportPath(Qt.resolvedUrl('.')) importModule('MigrationHandler', function () { console.log("MigrationHandler is now imported") - call('MigrationHandler.needs_migration', [], function (is_needed) { - console.log("Migration is needed: " + is_needed) - migrationNeeded(is_needed) - }) + call('MigrationHandler.needs_migration', [], + function (is_needed, db_version_too_high) { + console.log("Migration is needed: " + is_needed) + migrationNeeded(is_needed) + }) }) } diff --git a/qml/harbour-podqast.qml b/qml/harbour-podqast.qml index 12424d7287d532c2d0c22cacd56da1a4b0be7b69..2fad309eb8aacb188def9294b19d083ef80a1256 100644 --- a/qml/harbour-podqast.qml +++ b/qml/harbour-podqast.qml @@ -42,6 +42,8 @@ ApplicationWindow { pageStack.replace(Qt.resolvedUrl( "pages/DataMigration.qml")) } + + onDbVersionHigherThanExpectedWarning: dbVersiontooHighWarningNotification.publish() } cover: Qt.resolvedUrl("cover/CoverPage.qml") @@ -347,6 +349,15 @@ ApplicationWindow { } } + Notification { + id: dbVersiontooHighWarningNotification + category: "x-podqast-warnings" + appIcon: "/usr/share/harbour-podqast/images/q.png" + appName: "podQast" + summary: "Warning: your database is too new" + body: "You may encounter problems" + } + Notification { property string thepage: "Inbox" id: updatesNotification diff --git a/translations/harbour-podqast-de.ts b/translations/harbour-podqast-de.ts index c0e4996ee1edd893afbb559e9d8aaf538183cefa..95ba6104cce0f4791fe62c4eb9fabbc5ba015a63 100644 --- a/translations/harbour-podqast-de.ts +++ b/translations/harbour-podqast-de.ts @@ -1051,50 +1051,50 @@ harbour-podqast - + New posts available Neue Beiträge verfügbar - + Click to view updates Klicken um Aktualisierungen anzusehen - + New Posts are available. Click to view. Neue Beiträge verfügbar. Klicke zum Betrachten. - - + + PodQast message PodQast-Nachricht - + New PodQast message Neue PodQast-Nachricht - + Podcasts imported Podcasts importiert - - + + Podcasts imported from OPML Podcasts vom OPML importiert - + Error Fehler - - + + Audio File not existing Audiodatei existiert nicht diff --git a/translations/harbour-podqast-es.ts b/translations/harbour-podqast-es.ts index c80c63371246b2841c182391cf9e4f9de12a87bc..e57344eecef83fc625c05a87d829b5623d580ac4 100644 --- a/translations/harbour-podqast-es.ts +++ b/translations/harbour-podqast-es.ts @@ -1049,50 +1049,50 @@ harbour-podqast - + New posts available Nuevas publicaciones disponibles - + Click to view updates Haz clic para ver actualizaciones - + New Posts are available. Click to view. Hay nuevas publicaciones. Haz clic para verlas. - - + + PodQast message Mensaje de PodQast - + New PodQast message Nuevo mensaje de PodQast - + Podcasts imported podcasts importados - - + + Podcasts imported from OPML podcasts importados desde OPML - + Error Error - - + + Audio File not existing El archivo de audio no existe diff --git a/translations/harbour-podqast-fr.ts b/translations/harbour-podqast-fr.ts index 0f66804e061f2d9d11cde4366a085144f73d40a7..b93c260863768e9f5c811d4bd18c53603aa7377e 100644 --- a/translations/harbour-podqast-fr.ts +++ b/translations/harbour-podqast-fr.ts @@ -1052,50 +1052,50 @@ harbour-podqast - + New posts available Nouveaux articles disponibles - + Click to view updates Cliquez pour voir les mises à jour - + New Posts are available. Click to view. De nouveaux articles sont diponibles. Cliquez pour voir. - - + + PodQast message Message PodQast - + New PodQast message Nouveau message PodQast - + Podcasts imported Podcasts importés - - + + Podcasts imported from OPML Podcasts importés depuis OPML - + Error Erreur - - + + Audio File not existing Le fichier audio n'existe pas diff --git a/translations/harbour-podqast-sv.ts b/translations/harbour-podqast-sv.ts index 7b652c33e05038fa4aa19f1e11b3862e88482813..8a3c3b78d678878601158cdd53839ae21e601f25 100644 --- a/translations/harbour-podqast-sv.ts +++ b/translations/harbour-podqast-sv.ts @@ -1051,50 +1051,50 @@ harbour-podqast - + New posts available Nya poster tillgängliga - + Click to view updates Tryck för att visa uppdateringar - + New Posts are available. Click to view. Det finns nya poster. Tryck för att visa. - - + + PodQast message PodQast-meddelande - + New PodQast message Nytt PodQast-meddelande - + Podcasts imported poddar importerade - - + + Podcasts imported from OPML poddar importerade från OPML - + Error Fel - - + + Audio File not existing Ljudfilen finns inte diff --git a/translations/harbour-podqast-zh_CN.ts b/translations/harbour-podqast-zh_CN.ts index 5b494c2195f5dc1c0f4c7ca8ef88655d9c294d8b..25d4af41fa6e2df2f5468089a862c2c6bd36e21b 100644 --- a/translations/harbour-podqast-zh_CN.ts +++ b/translations/harbour-podqast-zh_CN.ts @@ -1049,50 +1049,50 @@ harbour-podqast - + New posts available 有可获取的新内容 - + Click to view updates 点击以查看更新 - + New Posts are available. Click to view. 有可用新内容,点击以查看。 - - + + PodQast message PodQast 消息 - + New PodQast message 新 PodQast 消息 - + Podcasts imported 播客已导入 - - + + Podcasts imported from OPML 已从 OPML 导入播客 - + Error 错误 - - + + Audio File not existing 音频文件不存在 diff --git a/translations/harbour-podqast.ts b/translations/harbour-podqast.ts index 90be4447db064bc0084b71a483bd61bfdaee53ab..65bb8d8caffa5eb53816d04c07fddf7f46981671 100644 --- a/translations/harbour-podqast.ts +++ b/translations/harbour-podqast.ts @@ -1051,50 +1051,50 @@ harbour-podqast - + New posts available New posts available - + Click to view updates Click to view updates - + New Posts are available. Click to view. New Posts are available. Click to view. - - + + PodQast message PodQast message - + New PodQast message New PodQast message - + Podcasts imported Podcasts imported - - + + Podcasts imported from OPML Podcasts imported from OPML - + Error Error - - + + Audio File not existing Audio File not existing