Google Summer of Code Report 2 June – 8 June 2014

Hello everybody,

As I said in my previous I have worked on “Scan Selected Files” feature. It is very useful, if you want to perform search for selected files only. Here’s what it will do:

  • Get the selected files. If no file is selected then it will take all the files.
  • Get the Albums of all the files. If more than two files have same album then their album is taken only once.
  • Then it will search for those albums in MusicBrainz database and display the result.

The main problem in implementing this feature was how to get the albums of all files and add the album only once. For this I cannot use a Linked List or an array as it would cost me a polynomial time complexity. So, I decided to use a Hash Table and Glib already has Hash Tables for strings. Hence, a GHashTable is created.

Whenever an album is retrieved from the files, it is searched into the GHashTable. If it is found then it is not added otherwise it will be added. So, this would give me a linear time complexity atleast better than polynomial time.

Moreover, Scan Selected Files does its search Asynchronously.

The coming week I will try to implement the DiscID search and also do some more bug fixing and memory leak fixing.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s