<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/106042/">http://git.reviewboard.kde.org/r/106042/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 4th, 2012, 6:11 p.m., <b>Matěj Laitl</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/106042/diff/7/?file=83643#file83643line42" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/nepomukcollection/NepomukCollection.h</a>
<span style="font-weight: normal;">
(Diff revision 7)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">41</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="p">};</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">33</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="cm"> * NepomukCollection is a plugin to use Nepomuk as a backend instead of the SQL</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Nicpick: instead -> "in addition to"</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">It actually is the goal of the nepomuk collection to replace the main MySql-embedded default. Even though that might not be possible currently and an SQL storage will always be needed.
I would be happy if we ever get there, with very good performance and easy-of-use.
For now I agree with this nitpick, but you could add it's the goal to actually be a replacement.</pre>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On September 4th, 2012, 6:11 p.m., <b>Matěj Laitl</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/106042/diff/7/?file=83644#file83644line124" style="color: black; font-weight: bold; text-decoration: underline;">src/core-impl/collections/nepomukcollection/NepomukCollection.cpp</a>
<span style="font-weight: normal;">
(Diff revision 7)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">NepomukCollection::isDirInCollection( const QString &path )</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">62</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="k">return</span> <span class="kc">false</span><span class="p">;</span></pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This works for now, but cannot one configure which folders Nepomuk indexes? You should use these for this call. (not a merge-blocker)</pre>
</blockquote>
<p>On September 4th, 2012, 6:26 p.m., <b>Edward Hades Toroshchin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Phalgun, add a // TODO comment here, so that this can be investigated in the future.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You shouldn't try to change nepomuk's indexed folders. Instead create an opt-in or opt-out list for the content that it does need to include in the collection. i.e. add an additional query join (or equivalent, I'm not well versed in SPARQL) including/excluding based on file location.</pre>
<br />
<p>- Bart</p>
<br />
<p>On September 4th, 2012, 4:51 p.m., Phalgun Guduthur wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Amarok, Edward Hades Toroshchin, Vishesh Handa, and Matěj Laitl.</div>
<div>By Phalgun Guduthur.</div>
<p style="color: grey;"><i>Updated Sept. 4, 2012, 4:51 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Nepomuk plugin for Amarok.
Almost all of the code changes can be found in src/core-impl/collections/nepomukcollection/*
And a minor change in src/core-impl/collections/support/MemoryMeta.cpp
Code builds and after Nepomuk plugin is activated in the "Settings" dialog, Nepomuk Plugin comes into play and queries all the tracks in your machine. The query is not 'that' fast and might take several seconds depending on the number of tracks in your box.
IMPORTANT : Make sure Nepomuk is enabled if you want to give the plugin a spin.
===========================================================================
Commit messages :
Code formatting changes
Removed unnecessary documentation
Set right Logger
The logger shows the progres of the collection updation correctly now.
The number of tracks were calculated using a small sparql query
removed local variable
Removed secondary Nepomuk meta hashmaps.
Left all the duplicate object checking to MapChanger.
The CMakeLists logs the presence of Nepomuk
Initialized the labellists in NepomukTrack constructor
Code formatting changes
fixing strohels nitpicks
Code formatting changes
vHanda nitpicks in review board
1. Moved soprano model instanciation after query string construction
2. QString -> QString::fromLatin1() for sparql query string
3. Nested album gains into album sub query
4. removed extraneous code that cropped up. (nao::has)
5. revamped tags query as I was only querying uri and not names of tags
If nepomuk is not found, the user gets a logger message informing the same
Code formatting changes to fit 90chars per line
The progress bar says which track is being updated
The Includes order for NepomukCollection was fixed
Make Nepomuk dependency optional
Modified debug string to be concise and meaningful
Formatting changes and documentation - part 2
Also deleted the .autosave file that creeped along the other commits
Documentation + Formatting - Part 1 ( meta classes )
Added year implementation
The sparql metadata query is complete with the major metadata.
Lyrics and Album art is yet to be done.
Code builds.
Code still in Nepomuk 1
Implemented label metadata ( tags ) in sparql enumeration
Code formatting changes
SPARQL query implemented instead of Nepomuk::Resource API
Hefty changes in the core of the background job of the query of tracks
and subsequent enumeration.
Initially a manual sparql query which queries for all properties of the
track and other meta data like artist, album etc.
The meta HashMaps are changed to incorporate Resource URIs and Labels
instead of resources themselves, as keys.
Year and labels ( tags in nepomuk ) are yet to be implemented
Added a resource data member to NepomukTrack
The resource was needed to store and extract ratings and score. It gets
constructed in the constructor using the QUrl
Removed a unnecessary debug line
Modified NepomukTrack constructor
The constructor now takes in the uri of the track resource as an argument
instead of the Nepomuk::Resource itself.
Manual sparql query : NepomukTrack changes
To support the usage of manual sparql query, a lot of support functions are
added to NepomukTrack. A lot of these are setter functions which were
previously set from the resource of the track.
This was removed as a optimization technique as any use of Nepomuk::Resource
::getProperty() consumes more cycles.
Year gets populated now
The query uses nmm:releaseDate and if it finds a date, populates
the track using a NepomukYear object.
added NepomukTrack::setYear()
Revamped NepomukYear like other meta objects
The constructor takes in a string argument
A tracks() method is implemented which returns all tracks of that year
Add label details to track during query and enumeration
Like other meta parameters, labels are now added to the NepomukTrack object
Removed unused functions in NepomukLabel
tracks() was not a function that was defined in Meta::Label. It is mostly
not needed by any class/GUI. Wasn't being used, so what the hell.
Added and implemented label specific functions in NepomukTrack
Removed debug library include
And removed other extraneous library includes in NepomukYear
Added NepomukLabel in CMakeLists.txt
Added NepomukLabel
Amarok labels == Nepomuk tags
Removed unnecessary libraries that were included
Added Replay Gain to NepomukTrack
Remove extraneous argument to NepomukYear constructor
Const correctness
Arguments wherever applicable are prepended with const modifier
to comply with coding standards.
Commenting and documenting for NepomukConstrucMetaJob
Duplicate meta objects are no longer created
Using HashMaps for each meta type, duplicate objects that might have been
created or else have eliminated. Now, all of artist, album, genre, composer
and track will have only one corresponding Nepomuk{meta} objects.
NepomukTrack::prettyName() returns right name
NepomukTrack::prettyName() now returns nie:title
nie:title is used for title of track
But this doesn't solve the problem completely.
A few tracks now have titles that start with
file://yadayadayada..
if condition to CMakeLists.txt
Nepomuk plugin is built only if Nepomuk found.
Haven't tested this yet
Merge branch 'gsoc' of git://hades.name/amarok into gsoc
Implemented collection() in NepomukTrack
nepomuk: use null album ptr for unknown albums
memory collection: fix crash due to empty album
Resolved graying out of tracks
Still empty NepomukAlbum are constructed when a track with no album is
encountered. This might be the reason for the numerous 'Unknown Album'.
The reason for not fixing this is, there might be a bug in
MemoryMeta::MemoryChanger::addExistingTrack() which doesnt handle
empty albums right. It is breaking the code.
Plugin builds collection only if Nepomuk is enabled
In the constructor of NepomukCollection, buildCollection() is called only
if Nepomuk is found.
Removed commented code.
tracks query and enumeration is a background job
The background job is complete and the collection updates dynamically.
Code builds.
Removed a TODO in Collection Factory as it was done.
Backqround job works
But in a crude way. The constructor is stopped from exiting
using a while(1) loop. This looks and is wrong.
Background job of NepomukCollection added
The query and enumeration runs as a background job in
NepomukCollection. But the UI doesn't show the tracks
properly. I suspect this is because the UI gets updated
even before the tracks are queried and enumerated. There
should be a mechanism to push the queried results in batches.
This should solve this issue
Remove unwanted NepomukTrack constructors
Warning messages if nepomuk is not enabled
Removed freak error that was incorporated in destructor of NepomukCollection
Added documentation
Removed a redundant function in NepomukCollection
m_collectionReady changes value more meaningfully
Nepomuk Collection works with albums, but artists are clubbed
While local collection lists all the different artists on level 1,
nepomukcollection clubs all the artists into one 'Various Artists'. Albums
are listed properly. With unknown albums listed as unknown.
Incorporated the use of MapChanger
Code compiles and builds. But on running, Amarok crashes.
I suspect it is because the Track::album() returns something that is not
being handled properly by the caller
Tried to check for meta objects before inserting into MetaMaps
But Amarok crashes on startup with Dr.Konqi error. Added a new constructor for NepomukAlbum that takes a album name and ArtistPtr as arguments
Deleted notifyObservers()
Deleted commented code. And reverted CMakeLists.txt since the nepomukcollection wasn't compiling or else. Will look into this at a later stage
NepomukTrack::score() now returns 0
Deleted commented lines, ones of NQM,NQMHelper etc
Removed extraneous functions
Deleted setup{meta}map() and renamed setupTrackMap to setupMetaMap.
Now nepomuk collection loads only if Nepomuk and Soprano are found
Fixed 0 tracks bug in GUI
Removed commented code
addTrack() added to NepomukAlbum
And corresponding changes were made in NepomukCollection
to populate AlbumMap during construction of TrackMap
Nepomuk Collection playsgit status
The tracks in each meta object are populated
during construction of TrackMap
Revamped Nepomuk{Meta}::tracks()
Added a new function called addTrack() which is used
to add a track to a meta object as soon as the tracks
are queried in the construction of TrackMap in NepomukCollection
Tracks and genres are now added to the respective MetaMaps
The tracks don't list in the GUI yet.
Formatting changes in other files
Modified argument placing in constructor of NepomukTrack
The arguments are ordered according to other
meta classes.
Merge branch 'gsoc' of git://hades.name/amarok into gsoc
New constructor for NepomukTrack
A construtor which takes MetaPtrs as arguments
nepomukcollection: remove old files
Nepomuk Collection shows a count of the tracks!
Have to implement the other meta maps. Hopefully the
drop down works then.
Was returning reference of a local variable. Fixed it
Setting my repo up, guided by dr_lepper
Added collections/CMakeLists.txt on amend
Changed commit msg on amend too</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Minimal. Plan to spend the remaining time on testing the plugin. </pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/core-impl/collections/nepomukcollection/meta/NepomukLabel.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukLabel.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukTrack.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukTrack.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukYear.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukYear.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/support/MemoryMeta.cpp <span style="color: grey">(37ba510f61605af7ebd803aee3529bde18ad84c5)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukGenre.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukGenre.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukComposer.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukComposer.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukArtist.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukArtist.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukAlbum.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/meta/NepomukAlbum.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/amarok_collection-nepomukcollection.desktop <span style="color: grey">(815e69e492e819740aba620cc399a8ee79eace74)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukYear.h <span style="color: grey">(504cbe2b146ae9a53291de9e82fa384467eb14e1)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukYear.cpp <span style="color: grey">(1f13de0bd24e56b1b64b8c45f1d22720dd487a3c)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukTrack.cpp <span style="color: grey">(7db01cf34b3765f18f8b8b3cf6efbdf07af6e564)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukTrack.h <span style="color: grey">(77dd8c70c8b0727655dfe1db89c7bd19208e77e5)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukRegistry.cpp <span style="color: grey">(8afa199f73035eb7d95a8913eb1cbe9fea8b2ebd)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukRegistry.h <span style="color: grey">(a21347eca2ab519a3c8b5b1f14650878fd7b4333)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukQueryMaker.cpp <span style="color: grey">(33163eaa0b279dedcf92de01346312930f10d944)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukGenre.cpp <span style="color: grey">(945074c4737ac2856469d5041ca2ea888d609bad)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukQueryMaker.h <span style="color: grey">(50067decec72f34a845e1da50e74cdf19e9c0f83)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukGenre.h <span style="color: grey">(ce0e3b71515d88e57dd3d01beba85e3cdfd8ede6)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukConstructMetaJob.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukConstructMetaJob.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukCollectionFactory.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukCollectionFactory.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukComposer.h <span style="color: grey">(1b11325ec488f202a7b13b10d36c8216b487ae89)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukComposer.cpp <span style="color: grey">(f21251eab6798bb499d01900151b2c9a1783deae)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukCollection.cpp <span style="color: grey">(cb185e818de2e00091f9cb03f4b19ccface14635)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukArtist.h <span style="color: grey">(6fcedf3ac3724083b6992deb71fb659d9b2dc5d0)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukArtist.cpp <span style="color: grey">(13ddf0142796d90af265d28a06d60110da64f138)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukCollection.h <span style="color: grey">(928b1458782f0145a012c81468f22edfafc0f547)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukAlbum.cpp <span style="color: grey">(6a09a1bbb4ea9bdfc08280326d29a351c666ab25)</span></li>
<li>src/core-impl/collections/CMakeLists.txt <span style="color: grey">(c78b9202ece71b51189c4e47d85acfa4a74ef8d6)</span></li>
<li>src/core-impl/collections/nepomukcollection/CMakeLists.txt <span style="color: grey">(7cfd4b056000cf5de18c87d1d014b6670703e796)</span></li>
<li>src/core-impl/collections/nepomukcollection/NepomukAlbum.h <span style="color: grey">(185c25a0fe5b19248a3ab40c1d9d84fd66e6d2fe)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/106042/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>