Friday, July 29, 2011

An updated indic lyrics script for Amarok2

It has been a long time since there has been any update to the indic lyrics script (an ability for Amarok to show lyrics of indian songs in indian scripts). I just uploaded the new version to kde-apps.org website. This version has the same functionality as the old version in that it fetches the lyrics from giitaayan.com but the iTRANS program has been converted to a Javascript routine.
Check out the screenshot on the website to get a feel of how it looks and leave comments here.

Monday, January 12, 2009

Amarok 2.0.1.1 released

I have upgraded Amarok to 2.0.1.1 when I security-updated my Intrepid to latest release (as of 11th Jan, 2009) and the application itself looks nice and polished but I am a bit unhappy with KDE lately. The reason is PLASMA which is a resource hog in it's current state. I have an AMD x86_64 dual core 4200+ with 1GB of ram and Nvidia GT 6600 and plasma is taking up 32% memory and cpu usage spiking up frequently to 40%. Because of that I think my desktop seems unresponsive a lot of the times.

Wednesday, November 5, 2008

Updated to 8.10 - Intrepid Ibex

Kubuntu Hardy was not polished enough so I waited for Intrepid to be released and finally I updated to latest version 8.10 at the end of October. The upgrade was smooth except for couple of packages which I think are not hosted on the default Kubuntu repository.
I am still using my old Amarok 1 instead of the latest Ataksak release (2beta3) so I cannot report on anything new yet. From the Amarok Blog it seems that this version is lot more stable and polished and I can start using it. Still I would wait for 2.0 release with good MTP device support. Good to know about this.

Tuesday, September 9, 2008

Updates ...

It has been ages since I last posted here. Since then Hardy Heron 8.04 had come out and I first installed KDE4 version but had lots of crashes and general instability and wierdness. Then I went to the regular version with KDE 3.5 and when KDE 4.1 beta was released, I finally decided to try KDE4 again. Now although I have it as my main windowing environment, I donot like the fact that I cannot use some of my favourite apps and the polish is still lacking.
I plan to take on porting some of the Amarok plugins I had worked on when Amarok2 final comes out and the APIs are stable. Till then I am still using version 1.4.9

Tuesday, October 23, 2007

Ubuntu 7.10 upgrade

This entry is just a place to jot down things ...
My Kubuntu upgrade to Gutsy Gibbon 7.10 went fine and did not notice any change until I looked into Xorg.0.log file. The latest X11 server has the guts of AIGLX inside it but it is turned off by default. The reason being it's dependency on restricted nvidia modules. So I followed these steps:
1) Went into adept and installed restricted-manager-kde
2) Ran restricted-manager-kde
3) Selected NVIDIA accelerated graphics driver
which automatically downloads the nvidia kernel driver and updates xorg.conf
4) Readjust xorg.conf to my liking and restart X server

...and now everything is swell.

Sunday, March 11, 2007

wiki_lyrics script enhancement

I hate it when wiki_lyrics fails if a track does not have Artist info. This happens for most of the online radio stations as they send all the track info only in Title metainfo. I modified the script to parse artist info and title info which are separated by a '-' and get the lyrics from that info. Here is the script ...


--- amarokmetalyrics.rb.bak 2007-03-12 00:06:08.213744500 -0500
+++ amarokmetalyrics.rb 2007-03-12 00:06:28.026982750 -0500
@@ -261,11 +261,19 @@
on_configure()
when 'fetchLyrics'
args = message.split()
- if args.length < 3
+ if args.length < 2
Amarok.show_error()
else
artist = Amarok.get_current_artist().to_s()
title = Amarok.get_current_title().to_s()
+ if artist.empty?
+ tmpartist, tmptitle = title.split( '-' )
+ if tmptitle == nil
+ title = tmpartist; artist = '';
+ else
+ title = tmptitle; artist = tmpartist;
+ end
+ end
on_fetch_lyrics(
Strings.cleanup_artist( artist, title ),
Strings.cleanup_title( title ),

Tuesday, February 27, 2007

Amarok playing directly from MTP device - part 2

Here is the part I promised yesterday with the changes I did to the mtpmediadevice files. The diff file can be found here. It is basically an implementation of the getProxyUrl(KURL&) call the way daapclient uses similar setup to map one url to another. Currently it is being done at the mediabrowser level as I could not figure out to do on-demand caching at mediaitem level. Moreover the MTP device has to be locked during each transfer which can be done only at MtpMediaDevice, so implementing it at MtpMediaItem/MtpTrack would have involved more complication. I will try to figure out if I can utilize any design pattern for this.
Another thing to note is I have only enabled it for doubleclick and returnpressed events so dnd and right click hasn't been enabled. Moreover copying the track to collectiondb and others do not use the cached file and neither are the cached files deleted after Amarok is shut down.

Monday, February 26, 2007

Amarok playing directly from MTP device - part 1

For the past couple of days I have been hacking into Amarok so that I can play media files directly from my MTP device by doubleclicking instead of first moving them to the collection and then to the playlist as I was led to believe in this post. It is working now and I will release the code in another post.
On the way I found this peculiar problem with KTempDir. When I use it to cache the media files, Amarok loses the metadata info associated with that MediaItem but if I use /tmp/ then it retains them. Here is the screenshot of the playlist ...

and here is the debugging output. Wrong one in red and right one in green.

amarok: [MtpMediaDevice] Proxy for: file://First_Of_May.mp3 is mtpcacheFosog7/First_Of_May.mp3
amarok: BEGIN: UrlLoader
amarok: [KDE::ProgressBar::ProgressBar(QWidget*, QLabel*)]
amarok: BEGIN: virtual void ThreadManager::Thread::run()
amarok: BEGIN: void EngineController::play(const MetaBundle&, uint)
amarok: [controller] Loading URL: mtpcacheFosog7/First_Of_May.mp3
amarok: [controller] Connecting to protocol:
amarok: BEGIN: virtual bool XineEngine::load(const KURL&, bool)
amarok: [xine-engine] Before xine_open() *****
amarok: [xine-engine] After xine_open() *****
amarok: [xine-engine] XINE_PARAM_EARLY_FINISHED_EVENT disabled
amarok: END__: virtual bool XineEngine::load(const KURL&, bool) - Took 0.048s
amarok: BEGIN: virtual bool XineEngine::play(uint)
amarok: BEGIN: void EngineSubject::stateChangedNotify(Engine::State)
amarok: [virtual void Amarok::StatusBar::engineStateChanged(Engine::State, Engine::State)] Line: 153
amarok: BEGIN: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State)
amarok: END__: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State) - Took 0.00069s
amarok: END__: void EngineSubject::stateChangedNotify(Engine::State) - Took 0.0048s
amarok: END__: virtual bool XineEngine::play(uint) - Took 0.0055s
amarok: BEGIN: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool)
amarok: [Moodbar] Resetting moodbar:
amarok: END__: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool) - Took 0.19s
amarok: END__: void EngineController::play(const MetaBundle&, uint) - Took 0.25s
amarok: [xine-engine] XINE_PARAM_EARLY_FINISHED_EVENT disabled
amarok: BEGIN: virtual void UrlLoader::completeJob()
amarok: END__: virtual void UrlLoader::completeJob() - Took 0.0003s
amarok: [ThreadManager] Job completed: UrlLoader. Jobs pending: 0
amarok: END__: UrlLoader - Took 0.47s


amarok: [MtpMediaDevice] Proxy for: file://Who S Crying Now.mp3 is /tmp/Who S Crying Now.mp3
amarok: BEGIN: UrlLoader
amarok: [KDE::ProgressBar::ProgressBar(QWidget*, QLabel*)]
amarok: BEGIN: virtual void ThreadManager::Thread::run()
amarok: BEGIN: void EngineController::play(const MetaBundle&, uint)
amarok: [controller] Loading URL: file:///tmp/Who%20S%20Crying%20Now.mp3
amarok: BEGIN: virtual bool XineEngine::load(const KURL&, bool)
amarok: [xine-engine] Before xine_open() *****
amarok: [xine-engine] After xine_open() *****
amarok: [xine-engine] XINE_PARAM_EARLY_FINISHED_EVENT disabled
amarok: END__: virtual bool XineEngine::load(const KURL&, bool) - Took 0.047s
amarok: BEGIN: virtual bool XineEngine::play(uint)
amarok: BEGIN: void EngineSubject::stateChangedNotify(Engine::State)
amarok: [virtual void Amarok::StatusBar::engineStateChanged(Engine::State, Engine::State)] Line: 153
amarok: BEGIN: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State)
amarok: END__: virtual void ContextBrowser::engineStateChanged(Engine::State, Engine::State) - Took 0.00083s
amarok: END__: void EngineSubject::stateChangedNotify(Engine::State) - Took 0.0051s
amarok: END__: virtual bool XineEngine::play(uint) - Took 0.0059s
amarok: BEGIN: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool)
amarok: [Moodbar] Resetting moodbar: /tmp/Who S Crying Now.mp3
amarok: [Moodbar] Moodbar::readFile: Trying to read /home/swapan/.kde/share/apps/amarok/moods/-1,.,tmp,Who S Crying Now.mood
amarok: [Moodbar] Moodbar::readFile: Trying to read /home/swapan/.kde/share/apps/amarok/moods/-1,.,tmp,Who S Crying Now.mood
amarok: [Moodbar] MoodServer::queueJob: Queued job for /tmp/Who S Crying Now.mp3, 1 jobs in queue.
amarok: [ContextBrowser] [CUEFILE]: /tmp/Who S Crying Now.cue - Shoot blindly and missed, searching for other cue files.
amarok: [ContextBrowser] [CUEFILE]: - Didn't find any matching cue file.
amarok: END__: virtual void ThreadManager::Thread::run() - Took 0.11s
amarok: BEGIN: virtual void ThreadManager::Thread::run()
amarok: END__: void EngineSubject::newMetaDataNotify(const MetaBundle&, bool) - Took 0.65s
amarok: END__: void EngineController::play(const MetaBundle&, uint) - Took 0.71s
amarok: BEGIN: virtual void UrlLoader::completeJob()
amarok: END__: virtual void UrlLoader::completeJob() - Took 0.00033s

Wednesday, February 21, 2007

Finished the SKY.fm integration

Finally I managed to finish the SKY.fm integration into Amarok using the ruby script. The script has to be installed in /tmp/kde-<user>/ folder for this to work. I will look into improving it. Currently just the SKY.fm scraping ruby file is available here and here is a snapshot of how it looks.


Tuesday, February 20, 2007

SKY.fm stream integration

Today I sat down to see if I could integrate SKY.fm streams into Amarok radio-streams and did come up with proof-of-concept. Basically the playlistbrowser fires up an external process and waits for it to fetch and parse the station names and playlists corresponding to those stations. Right now the external program is a hardcoded ruby script which is incomplete. The code works fine for the following /tmp/amarok-skyfm-pls.xml

<?xml version='1.0' encoding='UTF-8'?>
<stationlist>
<station name="Smooth Jazz" href="http://www.sky.fm/mp3/smoothjazz.pls" />
<station name="Top Hits" href="http://www.sky.fm/mp3/tophits.pls" />
<station name="The 80s" href="http://www.sky.fm/mp3/the80s.pls" />
<station name="Hit 70s" href="http://www.sky.fm/mp3/hit70s.pls" />
</stationlist>

Right now I need help with the script in scraping the stations and playlists off of the javascript file at fky.fm website. Code in diff -urNp output format is here (Check the next post instead). Here is a screenshot.