Friday, June 12, 2009

Visual Studio 2010

Next major version of iTSfv (version 6) will be coded from scratch in C# using Visual Studio 2010.

My initial plans for iTSfv 6 are:

  1. Complete support for Multi-disc albums when adding new music to iTunes: automatic guessing of Disc Count and Disc Number from file system
  2. Ability to add a folder of tracks at once
  3. Prevent scanning iTunes Library.xml on startup to improve load time
  4. Zero errors while iTSfv is operating
  5. Making use of editable Location property
  6. Ability to prevent storing artwork in Artwork folder

Monday, April 27, 2009

Location property is writable since iTunes 8.1.1

I was notified about this by an iTSfv user in SourceForge. That’s great news! This means easier implementations of the following:

  • relocating existing files
  • setting new location for currently dead tracks

DateAdded property is still read-only but a desirable property to have write access.

Setting new location for dead tracks

Current implementation of most iTunes addons including iTSfv is to remove dead tracks. The following scenario can be done:

  1. iTSfv iterates through iTunes music library
  2. iTSfv reads dead track Location as Nothing. It is important to note that File.Exists(track.Location) will not cause a NullPointException. It would rate give False.
  3. It is also important to implement the iTunes naming convention. This is needed for generating the file name of the track so that it can be searched in the new folder location. However, if the music files are not iTunes managed then the file names will not follow the iTunes naming conventions.
  4. If iTSfv finds a track with empty Location then
  5. iTSfv forms the file name using the track tags
  6. iTSfv appends the new folder location, sub-folder structure and file name to form the new file path.
  7. iTSfv sets the new location to track and saves the track

Friday, September 19, 2008

Supporting closest matches when looking up lyrics

LyricWiki stores all the artist and song information using the plain English alphabet it seems. So when I have the proper tag: Željko Joksimović as the artist in my songs, I have no luck: http://lyricwiki.org/Zeljko_Joksimovic. Functionality should be added so that further entries to closest matches are possible using a text file, similar to the current replace-words.txt etc. I am thinking of the following format:

z,,,, ź,,,, ž,,,,ż

c,,,, ć

This means when there are no matches for a word with Ž then it will replace all instances of Ž with Z. The same would happen if the word had Ź. The replace should happen for both cases: simple and capital. User can just input one entry.

So when iTSfv comes across Željko Joksimović – Lane Moje song:

  1. It looks up Željko Joksimović and Lane Moje.
  2. When there are no results, iTSfv loads the closest-matches.txt file
  3. The text file is split by line
  4. Each line is split by ,,,,

Each line is a ClosestMatch object, a structure or a class. For example, ClosestMatch.Letter is z. ClosestMatch.Aliases is a new list of strings: ź, ž, ż

For each closest match object, replace of letters would happen twice: for simple and capital.

Replacing simple letters:

  • Replace ź with z
  • Replace ž with z
  • Replace ż with z

Replacing capital letters:

  • Replace Ź with Z
  • Replace Ž with Z
  • Replace Ż with Z

Optimization is possible by checking if the letter ź exists first, before starting to replace.

Željko Joksimović is ultimately replaced by Zeljko Joksimovic and lyrics are found.

 

Edit 1:

Following picture shows the possible matches determined by iTSfv for Zeljko Joksimovic.

iTSfv Closest Matches

Edit 2:

This does not quite work well for songs such as Ángel De La Muerte. In LyricWiki the song is as Ángel De La Muerte. Suppose I have the song as Angel De La Muerte. Then the above closest match method changes all the A letters to Á. The artist name changes from Avalanch to Ávalanch. Replacement could be done at character level but then it adds tremendous load on LyricWiki servers.

It is yet not clear what’s the best way to handle this issue.