-
-
Notifications
You must be signed in to change notification settings - Fork 0
karma.1
karma - Set song's karma
karma [ options ]
karma sets the value of karma for a song or songs. karma is a number from 0 to 100 representing a how desirable a song needs to be played. If no options are provided, **karma displays the **karma for the current playing song. If there is no song playng, karma will exit if no option is provided on the command line.
If a song is skipped, it's karma is downgraded by 1. If a song is played twice within a day, it's karma is upgraded by 4. If a song is played twice within a week, it's karma is upgraded by 3. If a song is played twice within 14 days, its karma is upgraded by 2. If a song is played twice within a month, it's karma is upgraded by 1. All songs start with a default karma of 50. The setting of karma is done by mpdev(1).
Karma is downgraded by mpdev(1) only for songs rated less than 6 and played 5 times or less and whose karma is 50 or less. In short a song can earn a permanent karma under following conditions
* it's karma becomes 60 or more. * has been rated 6 or greater. * has been played from beginning to end more than 5 times.
karma utility helps you to play god. You can increase or decrease a song's karma by any value as per your whims and fancy.
Known values for OPTION are:
--love
mark scrobble as loved on lastfm, librefm. If this option is given, all
other options are ignored
--value=karma_value
Set karma to karma_value. If not set, karma_value is set as 50
--uri=path
Finds song with uri matching path
--id=songID
Finds song with id matching songID
--karma
Find songs with karma as per expression. e.g.
--karma<50 means songs with karma < 50
--karma<=50 means songs with karma < or = 50
--karma=50 means songs with karma = 50
--karma>=50 means songs with karma > or = 50
--karma>50 means songs with karma > 50
--playcount=exp
Find songs with playcounts as per expression. e.g.
--playcount<5 means songs with play counts < 5
--playcount<=5 means songs with play counts < or = 5
--playcount=5 means songs with play counts = 5
--playcount>=5 means songs with play counts > or = 5
--playcount>5 means songs with play counts > 5
--rating
Find songs with karma as per expression. e.g.
--rating<6 means gons with ratings < 6
--rating<=6 means gons with ratings < or = 6
--rating=6 means gons with ratings = 6
--rating>=6 means gons with ratings > or = 6
--rating>6 means gons with ratings > 6
--artist=Artist
Find songs with Artist exactly matching 'Artist'
--artistany=keyword
Find songs with Artist having 'keyword' anywhere in the Artist field
--query
Display SQL query, results and exit
--help
display this help and exit
--version
output version information
1. Set the karma of the current playing song to 55
$ karma --value=52
karma id uri
---------- ---------- -------------------------------------------------------
50 12490 Hindi/Milan/09 - Sawan Ka Mahina-Milan-1967-Mukesh.flac
52 12490 Hindi/Milan/09 - Sawan Ka Mahina-Milan-1967-Mukesh.flac
2. Display the karma of the current playing song
$ karma
karma id uri
---------- ---------- -------------------------------------------------------
50 12500 Hindi/Mirza Ghalib/03 - Aah ko chahiye ek umar-.flac
3. Display the karma of a specific song
$ karma --uri="Deep Purple/1971 - Fireball/01 - Fireball.wv"
karma id uri
---------- ---------- --------------------------------------------
50 52283 Deep Purple/1971 - Fireball/01 - Fireball.wv