-
 KDE-Apps.org Applications for the KDE-Desktop 
 GTK-Apps.org Applications using the GTK Toolkit 
 GnomeFiles.org Applications for GNOME 
 MeeGo-Central.org Applications for MeeGo 
 CLI-Apps.org Command Line Applications 
 Qt-Apps.org Free Qt Applications 
 Qt-Prop.org Proprietary Qt Applications 
 Maemo-Apps.org Applications for the Maemo Plattform 
 Java-Apps.org Free Java Applications 
 eyeOS-Apps.org Free eyeOS Applications 
 Wine-Apps.org Wine Applications 
 Server-Apps.org Server Applications 
 apps.ownCloud.com ownCloud Applications 
--
-
 KDE-Look.org Artwork for the KDE-Desktop 
 GNOME-Look.org Artwork for the GNOME-Desktop 
 Xfce-Look.org Artwork for the Xfce-Desktop 
 Box-Look.org Artwork for your Windowmanager 
 E17-Stuff.org Artwork for Enlightenment 
 Beryl-Themes.org Artwork for the Beryl Windowmanager 
 Compiz-Themes.org Artwork for the Compiz Windowmanager 
 EDE-Look.org Themes for your EDE Desktop 
--
-
 Debian-Art.org Stuff for Debian 
 Gentoo-Art.org Artwork for Gentoo Linux 
 SUSE-Art.org Artwork for openSUSE 
 Ubuntu-Art.org Artwork for Ubuntu 
 Kubuntu-Art.org Artwork for Kubuntu 
 LinuxMint-Art.org Artwork for Linux Mint 
 Arch-Stuff.org Art And Stuff for Arch Linux 
 Frugalware-Art.org Themes for Frugalware 
 Fedora-Art.org Artwork for Fedora Linux 
 Mandriva-Art.org Artwork for Mandriva Linux 
--
-
 KDE-Files.org Files for KDE Applications 
 OpenTemplate.org Documents for OpenOffice.org
 GIMPStuff.org Files for GIMP
 InkscapeStuff.org Files for Inkscape
 ScribusStuff.org Files for Scribus
 BlenderStuff.org Textures and Objects for Blender
 VLC-Addons.org Themes and Extensions for VLC
--
-
 KDE-Help.org Support for your KDE Desktop 
 GNOME-Help.org Support for your GNOME Desktop 
 Xfce-Help.org Support for your Xfce Desktop 
--
openDesktop.orgopenDesktop.org:   Applications   Artwork   Linux Distributions   Documents    LinuxDaily.com    Linux42.org    OpenSkillz.com   
 
Apps
News
Groups
Knowledge
Events
Forum
People
Jobs
Register
Login


Sponsoring


-
- Content .- Fans (1) . 

G15 Show Tune

   2.3  

Amarok 2.0 Script

Score 72%
Downloads:  583
Submitted:  Nov 2 2008
Updated:  Jan 1 2011

Description:

A simple script for Amarok 2.0 to display the current song title, artist and track time using the Logitech G15 keyboard display.

G15 daemon has to be running before you attempt to use this script.

This script has been now merged with Robert Riemann's G15 Amarok Plugin Plus (http://www.kde-apps.org/content/show.php/G15+Amarok+Plugin+Plus?content=76743) and officially replaces it.

The 2.3 release was put together completely by Robert Riemann, with the patches from Alex Richardson and Lambert Belkiss. Thank you guys and sorry for the slow turnaround time from my side - my own G15 is broken atm.




Changelog:

2010-12-30: Version 2.3
* Fixed the text encoding for Latin-1 encoded tags (patch by Alex Richardson)
* Fixed wrong song duration due amarok api change (patch by Lambert Belkiss)
* Show alert message in the case of g15composer not found in $PATH

2009-03-10: Version 2.2
* Fixed the text encoding for Latin-1 encoded tags
* Code cleanups, fixed up the spec file, fixed changelog
* This script is now official successor of the G15 Amarok Plugin Plus

2009-03-09: Version 2.1
* Changed encoding for the displayed text from ISO-8859-1 to IBM 850.

2009-03-07: Version 2.0
* Fixes from Robert Riemann, now it starts the composer automatically, more fancy display, merged with his
G15 Amarok Plugin Plus (http://www.kde-apps.org/content/show.php/G15+Amarok+Plugin+Plus?content=76743)

2008-11-02: Version 1.0
* Initial release




LicenseLGPL
(G15_Show_Tune-2.3.amarokscript.tar.gz)
Send to a friend
Subscribe
Other  Apps  from janoc
Report inappropriate content



-

 patch

 
 by belkiss on: Oct 17 2009
 
Score 50%

Hello, here is a small patch for your script (it seems the total time is returned in ms now)

--- G15_Show_Tune/main.js       2009-03-10 01:10:36.000000000 +0100
+++ main.js 2009-10-17 11:24:52.000000000 +0200
@@ -131,9 +131,9 @@
}
last_a = album;
var currentTime = Amarok.Engine.trackPosition();
- var totalTime = trackinfo.length;
+ var totalTime = trackinfo.length / 1000;
var track_pos = getTime(currentTime);
- var tot_time = getTime(trackinfo.length);
+ var tot_time = getTime(totalTime);
if(totalTime == 0)
{
currentTime = 1;



Here is a link on paste.to
http://www.paste.to/v/kjb3ul1b

Thank you for the app !
belkiss


Reply to this

-
.

 Needs g15composer

 
 by iss on: Nov 12 2009
 
Score 50%

If g15composer is not present it hangs whole amarok. There should be some check for g15composer and warning if it's not found.

Nice script anyway :)


Reply to this

-

 Patch

 
 by arichardson on: Aug 18 2010
 
Score 50%

This should fix some chars not being displayed properly (i.e. German Umlauts)



diff -U 3 -H -d -r -N -- G15_Show_Tune/main.js G15_Show_Tune_upd/main.js
--- G15_Show_Tune/main.js 2010-08-18 15:58:40.053998954 +0200
+++ G15_Show_Tune_upd/main.js 2010-08-18 15:56:14.000000000 +0200
@@ -50,24 +50,6 @@
return result;
}

-function convertCP437( string )
-{
- //string = "�rzte";
-
- // convert original Latin1 text to Unicode
- codecLatin1 = new QTextCodec.codecForName(new QByteArray("ISO 8859-1"));
- unicode_str = codecLatin1.toUnicode(new QByteArray(string));
-
- // now transcode Unicode to IBM 850/CP437
- codec850 = new QTextCodec.codecForName(new QByteArray("IBM 850"));
- output = codec850.fromUnicode(unicode_str).toString();
-
- // Amarok.alert(t.readAll());
- return output;
-}
-// Amarok.alert( convertCP437( "�rzte" ) ); // Just an convertion check
-
-
function startComposer()
{
if(!composerProcess)
@@ -145,14 +127,14 @@
var rating = trackinfo.rating;
var filetype = trackinfo.type;
var bitrate = trackinfo.bitrate;
- var result = "MC 1\n" +
+ var result = "MC 1\n" +
"TO 2 2 1 0 \"Track \"\n" +
- "TO 31 2 2 0 \"" + convertCP437( title.substring(pos_t, pos_t + 16)) + "\"\n" +
+ "TO 31 2 2 0 \"" + title.substring(pos_t, pos_t + 16) + "\"\n" +
"DB 0 11 159 11 1 " + currentTime + " " + totalTime + " 1\n" +
"TO 2 15 1 0 \"Band \"\n" +
- "TO 31 15 2 0 \"" + convertCP437( artist.substring(pos_b, pos_b + 16)) + "\"\n" +
+ "TO 31 15 2 0 \"" + artist.substring(pos_b, pos_b + 16) + "\"\n" +
"TO 2 24 1 0 \"Album \"\n" +
- "TO 31 24 2 0 \"" + convertCP437( album.substring(pos_a, pos_a + 16))+ "\"\n" +
+ "TO 31 24 2 0 \"" + album.substring(pos_a, pos_a + 16) + "\"\n" +
"DL 1 32 158 32 1\n" +
"TO 2 34 1 0 \"" + time + "\"\n" +
"TO 2 34 1 1 \"rating: " + rating + "\"\n" +
@@ -160,7 +142,8 @@
"PB 0 0 159 42\n" +
"MC 0";
amarok_stream.writeString("PC 0\n");
- amarok_stream.writeString(result + "\n");
+ amarok_stream.writeString(result);
+ amarok_stream.writeString("\n");
amarok_stream.flush();
// Amarok.alert(trackinfo);
} else {
@@ -195,6 +178,7 @@
amarok_pipe = new QFile(amarok_pipe_name);
amarok_pipe.open(new QIODevice.OpenMode(QIODevice.WriteOnly));
amarok_stream = new QTextStream(amarok_pipe);
+amarok_stream.setCodec(QTextCodec.codecForName(new QByteArray("IBM 850")));

// set up timer
timer = new QTimer();


Reply to this

Add commentBack






-
-
Do you like or dislike Ubuntu Unity?
 Yes, unity is alien technology!
 It is less confusing than Gnome 3 default, shell.
 Granny thinks it is much more usable than Gnome 2
 Canonical is embarrasing itself with this split project
 Gnome 3 default shell is much better
 I dislike Unity, Gnome 3 default shell is alien technology!
 None of the above, I like the 2Gb for free and Apple alike behavior. Will post a comment instead

resultmore
 
 
 Who we are
Contact
More about us
Frequently Asked Questions
Register
Twitter
Blog
Explore
Apps
Jobs
Knowledge
Events
People
Updates on identi.ca
Updates on Twitter
Facebook App
Content RSS   
Events RSS   

Participate
Groups
Forum
Add App
Public API
About KDE-Apps.org
Legal Notice
Spreadshirt Shop
CafePress Shop
Advertising
Sponsor us
Report Abuse
 

Copyright 2003-2014 KDE-Apps.org Team  
All rights reserved. KDE-Apps.org is not liable for any content or goods on this site.
All contributors are responsible for the lawfulness of their uploads.
KDE and K Desktop Environment are trademarks of KDE e.V.