Hi, I'm trying to create a media center piece of software for KDE. It's something I do during my spare time so it's far from being useable now. But it makes me learn Python and some of the Qt/KDE technologies, such as QML, Nepomuk, Phonon, ...
I'm currently trying to display a list of movies in a grid. I get the movies list from Nepomuk, fill a model with it and feed the grid with this model. It works quite well (the QML gridview is a bit disappointing, but that's another story). The Nepomuk query is built to look for movies stored at some specific path(s), provided by the conf. For example, I ask Nepomuk to look for files tagged as "Movie" and stored in /home/francois/Movies. This directory actually contains 19 movies. What bothers me for months is that sometimes, for some reason, the grid will display more than the 19 expected files. I get duplicate entries. If I run the same Nepomuk query (Sparql query) in Nepomuk Shell, I always get the expected result set. Same if I run it through sopranocmd (See http://techbase.kde.org/Development/Tutorials/Metadata/Nepomuk/TipsAndTricks#Debugging_the_created_data). So I guess the problem is not Nepomuk, but rather something going wrong between my model and my view. The source code of the problematic part is a bit long, so you can check it here : http://gitorious.org/helmo/helmo/blobs/movies- plugin/services/localvideolibrary.py If you're kind enough to take a look at the code, you have to know how the LocalVideoLibrary works : * It's first initialized via the __init__ method. * Then, we call the _prepare method. It builds the Nepomuk query and emits a "prepared" signal when done. When the KDirLister is done fetching data, it emits a "ready" signal. * Eventually, the _fetch method catches the "ready" signal and fills the GridView with the previously prepared data. I did that so I can display a loading indicator while querying the Nepomuk datastore. I did some small tests which lead me to the conclusion that the culprit might be KDirModel or KDirLister, but I'm not sure. I also read this post by Marco : http://mail.kde.org/pipermail/nepomuk/2012- November/003449.html and now wonder if one can use a KDirModel with Nepomuk ? I'm taking any help, advice, criticism, or idea to sort this out. I'm stuck with this for more than a year :/ I'll be glad to provide further explanations, code or whatever you may need. I'm also looking for someone who has knowledge in Python + KDE technologies and who would be interested in mentoring me (reviewing some code, giving me advices or help, ...). Please get in touch with me if you're interested Thanks a lot. Cheers, -- François PS : I first posted this on forum.kde.org. The thread is here : http://forum.kde.org/viewtopic.php?f=64&t=108603 >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<