January 23, 2007

Plugin Infastracture

In November it was Google who changed his site a bit and the result was that Lyrics couldn't be downloaded. Then I ve found out that freecovers needed login to download pictures and the Hi-Res downloading module could not work. (It can' t even now (TS/C v0.91) work).
I know that this is a fight i m gonna loose someday so i m building a new plugin architecture specially for downloading information.
Yesterday I ve transformed the GoogleLyrics Information Provider to work in my new interface (as an internal plugin) but it will be easily updated with an external dll.
I ve also built a new Hi-Res Covers plugin using the cdcovers.to search engine. It is very easy and i m planning to release the source code of it as an example of how to build such a plugin.
(cdcoversinfoprovider plugin in action)

I m expecting Amazon plugins, Wikipedia plugins, localized lyrics plugins to appear sometime.

WARNING:
1. Programming code follows.
2. The framework is under construction

Description:
The Interface that must be implemented is (currently):

class InfoProvider
{
public:
//An Info Provider May Support more that one service
virtual BOOL Init(CNetDownloader* pDownloader) = 0;
virtual BOOL CanHandle(ITEM_INFO_TYPE iit) = 0;
virtual BOOL RetrieveInfo(ITEM_INFO_TYPE iit, LPCTSTR JobInfo) = 0;
virtual BOOL GetInfo(ITEM_INFO_TYPE iit, std::tstring& info, std::tstring& source) = 0;
//Returns a const pointer. The user must copy this value immediate after
//receiving. Also this strings belongs to InfoProvider (Client should not try to delete it)
virtual LPCTSTR GetErrorString() = 0;
virtual LPCTSTR GetInfoProviderDetails(InfoProviderDetails ipd) = 0;
//Should be thread safe. Returns 0-100;
virtual UINT GetProgress() = 0;

};


CNetDownloader is a utility that TS/C Provides for easy & streamlined Web Downloading

January 16, 2007

TeenSpirit (Conium) v0.91.606 (beta)

one more update
- Even more Language Module Fixes (more than 1 lines for each key is now supported)
- Right Click on tree now works better (4th (and final) version of the Notification Framework)
- Edit Lyrics/Comments Fixed (not removing anymore)
- Automatic Update of Treeview while Adding/Updating fixed

Download it here [url]http://www.artificialspirit.com/beta/ts606.zip[/url]

Probably 2-3 days before the final release..

Today there was the time for a major inside change after even the latest Observer Pattern failed to provide something stable and simple.
I used a technic which i call "Director - Actor". A quick and dirty description of this is the following.
Director is my application object. Actors are his observers. Every object who has access to the application object can now send notifications through director to all the actors. Even objects running on different threads can send messages to the actors and the messages will be delivered in the main thread. It supports two different methods (Send And Post just like windows).
Post Messages are handled through a Hearbeat (My MainDialog calls the 'Heartbeat' function periodically using a timer every 500ms)
PostMessages are thread safe
All Messages from other threads finally become PostMessages

I m so happy that i am even considering to write an article in CodeProject for this.

January 15, 2007

TeenSpirit (Conium) v0.91.605 (beta)

Some fixes during this Sunday.

Update#1 (604)
- TagLib was not working in 603.
- Various fixes in notifications
- Swedish added thanks to XC-SE


Update #2 (605)
- AMG Automatic Downloading fixed
- Edit Tags (track Properties) fixed
- "Windows Classic Style" redraw bug fixed

Download it here http://www.artificialspirit.com/beta/ts605.zip

January 14, 2007

TeenSpirit (Conium) v0.91.603 (beta)

I will never going to do such drastic changes all together in this project!
There were so many changes without clear scheduling and without the needed time to make them happen in time.
From November Lyrics stopped working (see the associated post) and i couldn't have a proper version to release..
Anyway now i ve got this one out as 'beta'
New (Visible) Features.
- new engine based on directshow and bass. (got rid the WMP engine) (in this version it supports mp3, ogg, mpc, avi, mpg, and much more)
- new Tag engine based on TagLib (with wma,mp3,ogg,mpc & more) support (got rid the id3lib)
- new Visualization Engine based on various sources. In this version a winamp avs plugin is present. Check it out. (also a native vis plugin is active in Quiz Dialog) (got rid the WMP Engine again)
- new Multi language Engine. (No need to compile the resources anymore and everyone can make & test his own Language Pack). Also there is no need to restart the app when changing the language.
- Docked/Undocked/Full Screen Visualization (or Video) Mode
- Faded Info View
and much more that i don't remember

Download it

Regards