Skip to content
joslinm edited this page Sep 14, 2010 · 3 revisions

The Torrent class is used to hold all the values of each individual torrents. Its lifecycle looks something like this:

—> Created by class TorrentBuilder
—> Continuously checked for information for other purposes (directory building for example)
—> Disposed at end of cycle (when all the torrents in the folder have been processed)

In order to create an easier way of moving data around, an array of strings is created that hold all the information in designated places. If the user does not wish to gather bitrates, for example, then that value will be left null. The framework for the array is as such:

Information[0-10] — Music information

  • information0 —> Artist
  • information1 —> Album
  • information2 —> AlbumType
  • information3 —> bitrate
  • information4 —> year
  • information5 —> physical format (CD,DVD,VINYL,WEB)
  • information6 —> bit format (MP3,FLAC)

*Information[10-20] — File Information

  • information10 —> path
  • information11 —> file name
  • information12 —> birth

The extra space is a bit excessive but also allows for expansion if necessary. All in all, the program isn’t heavy enough that CPU cost cutting measures need to be examined. I’m comfortable with following an organized program initially.

Everything is rather self-explanatory, except perhaps birth. Birth is an important attribute and is used very often in TorrentBuilder; it merely represents which site it had come from. In this case, it is only between Waffles.FM & What.CD

Clone this wiki locally