-
 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 (10) .- Knowledge Base  . 

klastfm

   0.7  

Amarok 2.0 Script

Score 80%
Homepage:  Link
Depends on  KDE 4.x
Downloads:  713
Submitted:  Jul 3 2010
Updated:  May 31 2012

Description:

First of all: This is not an Amarok script in the common sense. Do not install this in Amarok! Read this file to get the idea!

This tool grabs your statistic from last.fm and merges it into your existing amarok database.

Since last.fm relies on MusicBrainz ( http://musicbrainz.org ) for tagging, in general it is a good idea to tag your media with MusicBrainz Picard ( http://musicbrainz.org/doc/MusicBrainz_Picard ) By tagging your music with Picard (or any other ID3 tagger using MusicBrainz) you will get the best results when using this script. All tracks not recognized by this script are skipped.

It will synchronize your playcount (how often you listened to a specific track) and the first and last played date of a track (with the accuracy of a few days).

Listed on kde-apps.org http://kde-apps.org/content/show.php?content=127016

Sourcecode available at github.com http://github.com/gauda/klastfm

When reporting errors, please include your last.fm username in the bugreport!




Changelog:

Klastfm is now based on LastToLibre, an external app to download your last.fm history, removed the option to rate the tracks



License:
MIT

Send to a friend
Subscribe
Other  Apps  from gauda
Report inappropriate content



goto page: prev   1  2  3  4  5 

-
.

 Error on openSUSE

 
 by BatmansGehilfe on: Aug 28 2011
 
Score 50%

Hello there

Everytime I try to start the script, I get the following error:

./lib/klastfm.rb:28:in `initialize': uninitialized constant Klastfm::Mysql (NameError)
from ./klastfm:10:in `new'
from ./klastfm:10

Any suggestions on this? I would really love to run that script on my database!

Greetings


Reply to this

-

 Re: Error on openSUSE

 
 by gauda on: Aug 28 2011
 
Score 50%

did you install all the dependencies? can you post the output of
gem list


Reply to this

-

 Re: Re: Error on openSUSE

 
 by BatmansGehilfe on: Aug 28 2011
 
Score 50%

At least I tried to ;-)

Here we go:


*** LOCAL GEMS ***

activemodel (3.0.10)
activerecord (3.0.10)
activesupport (3.0.10)
arel (2.0.10)
builder (2.1.2)
crack (0.1.8)
httparty (0.7.8)
i18n (0.5.0)
logger (1.2.8)
progressbar (0.9.1)
tzinfo (0.3.29)


Reply to this

-

 Re: Re: Re: Error on openSUSE

 
 by gauda on: Aug 28 2011
 
Score 50%

well, you're missing the mysql gem ;)
sudo gem install mysql –no-rdoc –no-ri


Reply to this

-

 Re: Re: Re: Re: Error on openSUSE

 
 by BatmansGehilfe on: Aug 29 2011
 
Score 50%

Oh... Now the script startet working, but unfortunately dies later with this output:


getting all tracks played in the last 277 weeks
./lib/klastfm.rb:88:in `[]': can't convert String into Integer (TypeError)0:09:02
from ./lib/klastfm.rb:88:in `date_tracks'
from ./lib/klastfm.rb:87:in `each'
from ./lib/klastfm.rb:87:in `date_tracks'
from ./lib/klastfm.rb:85:in `each'
from ./lib/klastfm.rb:85:in `date_tracks'
from ./klastfm:17
from /var/lib/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
from /var/lib/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'
from ./klastfm:14


Reply to this

-
.

 Re: Error on openSUSE

 
 by bitcrazy on: Aug 31 2011
 
Score 50%

So we are two now:-(


If men could get pregnant, abortion would be a sacrament.
Reply to this

-

 Re: Re: Error on openSUSE

 
 by gauda on: Sep 1 2011
 
Score 50%

i just published a new version. please update and try again!



-
.

 Thanks, easy fix for corrupted embeddemysql db!

 
 by abelau on: Sep 1 2011
 
Score 70%

I had my embedded mysql database in amarok corrupted quite a number of times, and lost most of my track stats. This klastfm is exactly what I'm looking for to get back some stats :-) Thanks.

Just a brief note such that other gentoo users with amarok using the default embedded mysql database may save a few mins.

1. backup the directory (~/.kde4/share/apps/amarok) just in case you mess it up

2. as of 1Sep2011, I need to keyword a few packages that is not in stable amd64:
dev-ruby/httparty
dev-ruby/fakeweb
dev-ruby/crack

3. install the following package:
httparty ruby-progressbar activerecord mysql-ruby

4. create and run this script in ~/.kde4/share/apps/amarok to create a sql socket

#!/bin/sh
/usr/sbin/mysqld --defaults-file=`pwd`/my.cnf --default-storage-engine=MyISAM --datadir=`pwd`/mysqle --socket=`pwd`/sock --skip-grant-tables --skip-innodb

5. change config.yaml:
uncomment the socket line
change the database to "amarok"
change the lastfm username and API key accordingly

6. ruby ./klastfm


Reply to this

-
.

 Re: Thanks, easy fix for corrupted embeddemysql db

 
 by gauda on: Sep 1 2011
 
Score 50%

hey abelau, thanks for this nice gentoo howto. i will add a link in the readme file in the next release!


Reply to this

-
.

 Re: Re: Thanks, easy fix for corrupted embeddemysq

 
 by abelau on: Sep 2 2011
 
Score 50%

Thanks for your wonderful contribution Gauda :-)

Just wondering if klastfm could update the "first played" field to the date of the track first added to my lastfm db? I guess it's probably not as straight-forward, but would be really helpful stat as I always like to generate playlist by date-added to find my recently bought collections.

and can I selectively sync a particular field?


Reply to this

-
.

 Re: Re: Re: Thanks, easy fix for corrupted embedde

 
 by abelau on: Sep 3 2011
 
Score 50%

I noticed that set_dates is by default set to true, and checking the doc, it looks like the first played date and last played date should be set by klastfm
However, after starting fresh with a new sqlite db in Amarok (v2.4.0 on KDE 4.6.5) followed by klastfm, most of my tracks have the "First played" and "Last played" field being blank, and a small portion of my tracks showed "never" in the 2 fields.
Any clue how I might get the "First played" and "Last played" field synced?
Thanks


Reply to this

-
.

 Re: Re: Re: Re: Thanks, easy fix for corrupted emb

 
 by abelau on: Sep 3 2011
 
Score 50%

just an update. I download the most current version as of today, and the dates are correctly updated.... yay....!!!!!! :D


Reply to this

-

 Re: Thanks, easy fix for corrupted embeddemysql db

 
 by mmdanziger on: Nov 7 2011
 
Score 50%

I've tried to follow the instructions here but I'm unable to connect to the db. What am I doing wrong?

config.yaml:
# mysql settings
mysql:
# uncomment this (and correct the path) if you're using amarok with embedded mysql
# socket: ~/.kde4/share/apps/amarok/sock
socket: ~/.kde/share/apps/amarok/sock
host: localhost
database: amarok
#username: amarok_username
#password: amarok_password

socket script:
#!/bin/sh
/usr/sbin/mysqld --defaults-file=`pwd`/my.cnf --default-storage-engine=MyISAM --datadir=`pwd`/mysqle --socket=`pwd`/sock --skip-grant-tables --skip-innodb

when I run the socket script (in ~/.kde/share/apps/amarok/ of course) I get:
111107 11:17:07 [Note] Plugin 'FEDERATED' is disabled.
111107 11:17:07 [Note] Plugin 'InnoDB' is disabled.
111107 11:17:07 [Warning] Can't open and lock time zone table: Table 'mysql.time_zone_leap_second' doesn't exist trying to live without them
111107 11:17:07 [ERROR] Can't open and lock privilege tables: Table 'mysql.servers' doesn't exist
111107 11:17:07 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-1ubuntu8.1' socket: '~/.kde/share/apps/amarok/sock' port: 3306 (Ubuntu)

Which appears to be functional but when I run the script, I get:

./lib/klastfm.rb:28:in `initialize': Cannot connect to the database. Check config/config.yaml (RuntimeError)
from ./klastfm:10:in `new'
from ./klastfm:10

What am I missing? Do I need a username and password? The db isn't encrypted or anything... I'm really new to sql so there's probably something really simple that I'm just missing. Any help would be much appreciated.


Reply to this

-

 Re: Re: Thanks, easy fix for corrupted embeddemysq

 
 by abelau on: Nov 7 2011
 
Score 50%

no expert here, but when I am using it on my gentoo system, I leave the amarok username and password unchanged (uncommented), as below:
database: amarok
username: amarok_username
password: amarok_password


Reply to this

-

 Re: Re: Re: Thanks, easy fix for corrupted embedde

 
 by mmdanziger on: Nov 7 2011
 
Score 50%

fixed it! the problem was my host line. i've encountered this before, that localhost doesn't work

host: 127.0.0.1

did the trick. i'm on linux mint kde (kubuntu 10.10 ). hope this helps someone.


Reply to this

-
.

 Still aborting

 
 by BatmansGehilfe on: Sep 1 2011
 
Score 50%

Hi!

Thanks for replying and the new version as well. Note that downloading in both the previous and the new version works well. But after downloading unfortunately I still get a similar error message to the one above:

getting all tracks played in the last 277 weeks
Track Error: ["artist", "Rick Wakeman"] | ETA: 00:09:36
#<TypeError: can't convert String into Integer>
./lib/klastfm.rb:94:in `[]': can't convert String into Integer (TypeError)
from ./lib/klastfm.rb:94:in `date_tracks'
from ./lib/klastfm.rb:87:in `each'
from ./lib/klastfm.rb:87:in `date_tracks'
from ./lib/klastfm.rb:85:in `each'
from ./lib/klastfm.rb:85:in `date_tracks'
from ./klastfm:16
from /var/lib/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
from /var/lib/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'
from ./klastfm:13


Reply to this

-

 Re: Still aborting

 
 by gauda on: Sep 1 2011
 
Score 50%

hello, to debug this it would be helpful to know your last.fm username. can you provide it please? you can also send me a private message!


Reply to this

-

 Re: Re: Still aborting

 
 by BatmansGehilfe on: Sep 3 2011
 
Score 50%

Sent you my username - thanks!


Reply to this

-
.

 Re: Re: Still aborting

 
 by deniamik on: Sep 3 2011
 
Score 50%

Hi, great script, I would really love to run it on my database ;-)
just to let you know, I've got the same error result as BatmansGehilfe:
--------------------------------------
getting all tracks played in the last 116 weeks
Track Error: ["artist", "ABC"]ooooooooooooooo | ETA: 00:04:11
#<TypeError: can't convert String into Integer>
./lib/klastfm.rb:94:in `[]': can't convert String into Integer (TypeError)
from ./lib/klastfm.rb:94:in `date_tracks'
from ./lib/klastfm.rb:87:in `each'
from ./lib/klastfm.rb:87:in `date_tracks'
from ./lib/klastfm.rb:85:in `each'
from ./lib/klastfm.rb:85:in `date_tracks'
from ./klastfm:16
from /var/lib/gems/1.8/gems/activerecord-3.1.0/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
from /var/lib/gems/1.8/gems/activerecord-3.1.0/lib/active_record/transactions.rb:208:in `transaction'
from ./klastfm:13
--------------------------------------
Is there anything from my what I can do for debugging or fixing?
Thank you for this great script!


Reply to this

-
.

 Re: Still aborting

 
 by bitcrazy on: Sep 11 2011
 
Score 50%

Take a look in the logfile and you will see, that tracks and artists are mixed up.
This won't be fixed, I guess.


If men could get pregnant, abortion would be a sacrament.
Reply to this

-

 Re: Re: Still aborting

 
 by abelau on: Sep 27 2011
 
Score 50%

I have encountered similar error with the 26Sep2011 snapshot.

getting all tracks you ever submitted to last.fm (ca. 2000)
get playcount: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:02:45

creating a statistic entry for every track
creating stat: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01

getting all tracks played in the last 194 weeks
Track Error: ["artist", "Kenny G"]oooooooooooooooooooooooooooooooo| ETA: 00:00:00
#<TypeError: can't convert String into Integer>
./lib/klastfm.rb:91:in `[]': can't convert String into Integer (TypeError)
from ./lib/klastfm.rb:91:in `date_tracks'
from ./lib/klastfm.rb:84:in `each'
from ./lib/klastfm.rb:84:in `date_tracks'
from ./lib/klastfm.rb:82:in `each'
from ./lib/klastfm.rb:82:in `date_tracks'
from ./klastfm:16
from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.14/lib/active_record/transactions.rb:182:in `transaction'
from ./klastfm:13


Looking into klastfm.rb, it seems to me that the error occurs when the track was not found in the collection and was in the process of storing it for logging purpose. I commented the 2 lines because i don't think it affects the core functionality at all, and the script ran till the end successfully updating amarok db, with the following message (not sure if it's helpful or not)

getting all tracks you ever submitted to last.fm (ca. 2000)
get playcount: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:01:33

creating a statistic entry for every track
creating stat: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:01

getting all tracks played in the last 194 weeks
Track Error: ["artist", "Kenny G"]oooooooooooooooooooooooooooooooo| ETA: 00:00:00
#<TypeError: can't convert String into Integer>
Track Error: ["name", "Loving You"]
#<TypeError: can't convert String into Integer>
Track Error: ["url", "www.last.fm/music/Kenny+G/_/Loving+You"]
#<TypeError: can't convert String into Integer>
Track Error: ["rank", "1"]
#<TypeError: can't convert String into Integer>
Track Error: ["mbid", nil]
#<TypeError: can't convert String into Integer>
Track Error: ["playcount", "4"]
#<TypeError: can't convert String into Integer>
Track Error: ["image", ["http://userserve-ak.last.fm/serve/34/532732.jpg", "http://userserve-ak.last.fm/serve/64/532732.jpg", "http://userserve-ak.last.fm/serve/126/532732.jpg"]]
#<TypeError: can't convert String into Integer>
date tracks: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:21:00

save the statistics of all 1380 tracks to database
saving: 100% |ooooooooooooooooooooooooooooooooooooooooooooo| Time: 00:00:08

Runtime: 22 minutes


Reply to this

-
.

 Error en Fedora

 
 by Passy22 on: Sep 12 2011
 
Score 50%

Oh, to me, don't work... this is outpout of script:

./klastfm
./lib/lastfm.rb:43:in `all_tracks': undefined method `[]' for nil:NilClass (NoMethodError)
from ./lib/klastfm.rb:46:in `get_all_tracks'
from ./klastfm:11

I don't know can be...

Thanks for help and sorry for my English ;)


Reply to this

-
.

 Version 0.6

 
 by bitcrazy on: Sep 15 2011
 
Score 50%

getting all tracks played in the last 267 weeks
Track Error: ["artist", "Echo & The Bunnymen"] | ETA: 00:09:06
#<TypeError: can't convert String into Integer>
./lib/klastfm.rb:91:in `[]': can't convert String into Integer (TypeError)
from ./lib/klastfm.rb:91:in `date_tracks'
from ./lib/klastfm.rb:84:in `each'
from ./lib/klastfm.rb:84:in `date_tracks'
from ./lib/klastfm.rb:82:in `each'
from ./lib/klastfm.rb:82:in `date_tracks'
from ./klastfm:16
from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
from /usr/lib64/ruby/gems/1.8/gems/activerecord-2.3.11/lib/active_record/transactions.rb:182:in `transaction'
from ./klastfm:13


If men could get pregnant, abortion would be a sacrament.
Reply to this

-

 Error

 
 by jonorland on: Oct 30 2011
 
Score 50%

Getting this error. Any idea why?

$ ruby ./klastfm
getting all tracks you ever submitted to last.fm (ca. 13450)
get playcount: 100% |oooooooooooooooooooooooooooooooooooo| Time: 01:07:31

creating a statistic entry for every track
creating stat: 100% |oooooooooooo| Time: 00:08:41

1. retry:
#<EOFError: end of file reached>
getting all tracks played in the last 349 weeks
./lib/klastfm.rb:84:in `date_tracks': undefined method `each' for nil:NilClass (NoMethodError) | ETA: --:--:--
from ./lib/klastfm.rb:82:in `each'
from ./lib/klastfm.rb:82:in `date_tracks'
from ./klastfm:16
from /var/lib/gems/1.8/gems/activerecord-3.1.1/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
from /var/lib/gems/1.8/gems/activerecord-3.1.1/lib/active_record/transactions.rb:208:in `transaction'
from ./klastfm:13


Reply to this

-

 Re: Error

 
 by jonorland on: Nov 5 2011
 
Score 50%

Is it a bug or something with my data? The last line from the log is:
D, [2011-11-05T11:51:40.495798 #4760] DEBUG -- : SQL (1637.7ms) UPDATE `statistics` SET createdate = 0, accessdate = 0 WHERE (url in (115994,126259,130365,
[deleted long line of numbers]
143709,133444,139603))
D, [2011-11-05T11:51:42.006253 #4760] DEBUG -- :  (1.6ms) ROLLBACK


Reply to this

-
.

 Re: Error

 
 by bateau on: Dec 6 2011
 
Score 50%

same here


Reply to this

-

 Re: Error

 
 by bateau on: Dec 6 2011
 
Score 50%

Forgot to mention: running stock kubuntu oneiric, kdesc updated to 4.7.3


Reply to this

goto page: prev   1  2  3  4  5 

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.