Bug 420623 - "Counter" generated resource cannot be archived with project
Summary: "Counter" generated resource cannot be archived with project
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (other bugs)
Version First Reported In: 20.04.0
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-26 14:39 UTC by forlorn18
Modified: 2021-04-01 13:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description forlorn18 2020-04-26 14:39:25 UTC
SUMMARY

When having a "Counter" clip in Project Bin (generated through "Project"->"Generators"->"Counter"), the project can't be archived because "You have 1 missing clip in your project".

STEPS TO REPRODUCE

1. Create empty project (with whatever project settings - mine is default "HD 1080p 25 fps")
2. Add a "Counter" clip with "Project"->"Generators"->"Counter" then "OK" with default config (store the resulting file anywhere, e.g. "/tmp/count.mlt")
3. Try to archive project through "Project"->"Archive Project"

OBSERVED RESULT

Generated "/tmp/count.mlt" file is listed in "Playlist clips" category which is correct I think.
"You have 1 missing clip in your project" warning is displayed : the missing file is in "Other clips" category, announced path is "/home/user/kdenlive/<producer>". "<producer>" is displayed as is, and for sure doesn't exists.

EXPECTED RESULT

No clip should be missing and no erroneous "[...]/<producer>" file should be looked for.

SOFTWARE/OS VERSIONS

Stable AppImage versions 20.04.0-x86_64 and 19.12.3-x86_64
Host is running linux Debian Unstable (up to date) with Gnome 3

ADDITIONAL INFORMATION

I locally fixed this issue with the following patch (for both 19.12.3 and 20.04.0 branches), assuming "Counter" playlist depends on no other resource the same way as "Color" clip does :

---
 src/project/dialogs/projectsettings.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/project/dialogs/projectsettings.cpp b/src/project/dialogs/projectsettings.cpp
index cd7f1e544..eea0bb2d5 100644
--- a/src/project/dialogs/projectsettings.cpp
+++ b/src/project/dialogs/projectsettings.cpp
@@ -576,7 +576,7 @@ QStringList ProjectSettings::extractPlaylistUrls(const QString &path)
     for (int i = 0; i < files.count(); ++i) {
         QDomElement e = files.at(i).toElement();
         QString type = Xml::getXmlProperty(e, QStringLiteral("mlt_service"));
-        if (type != QLatin1String("colour")) {
+        if ( (type != QLatin1String("colour")) && (type != QLatin1String("count")) ) {
             QString url = Xml::getXmlProperty(e, QStringLiteral("resource"));
             if (type == QLatin1String("timewarp")) {
                 url = Xml::getXmlProperty(e, QStringLiteral("warp_resource"));
--
Comment 1 Julius Künzel 2021-04-01 13:56:14 UTC
Git commit 0329427786a3e804c60bc23b2b2099506eb4a9fc by Julius Künzel.
Committed on 01/04/2021 at 13:55.
Pushed by jlskuz into branch 'release/21.04'.

Fix archiving for generator mlt clips

M  +1    -1    src/project/dialogs/projectsettings.cpp

https://invent.kde.org/multimedia/kdenlive/commit/0329427786a3e804c60bc23b2b2099506eb4a9fc
Comment 2 Julius Künzel 2021-04-01 13:56:40 UTC
Thanks for your report! You're patch seems to be almost the best solution, but I decided to solve it slightly different, because we have the same problem with all generators. However your work made it much easier for my to find the problem and fix it!

P.S.: If you suggest code changes/patches it would be easier for the team to review if you open a merge request on https://invent.kde.org/multimedia/kdenlive