Update your iTunes "played counts" with your Last.fm scrobbles.
This script will try to update the "played count" and the "played date" value of your iTunes songs by getting the number of scrobbles for those songs from a http://last.fm/ profile.
Differences in song titles and the usage of special characters on song names may prevent the script from recognizing the songs properly.
The script is available on both Ruby and Python. Both versions will perform the same tasks however, due to the way that both languages deal with character encoding, normalization and parameterization, the results may be different. Please use the one that produces the best results for your iTunes library.
There are a couple of things needed for either of the scripts to work.
Follow the instructions for the version of the script that you wish to use. Last.fm instructions are required for both versions.
A last.fm user account is required (to obtain the scrobbles from). You can create an account at http://last.fm/join if you do not have one already.
A last.fm API account is also required. You can obtain an API key at http://last.fm/api
For the Ruby version of the script the following gems are required:
- getoptlong
- json
- open-uri
- progress_bar
- rb-appscript
- unidecoder
You can install gems with:
sudo gem install <gem_name>
For the Python version of the script the following modules are required:
- appscript
- getopt
- json
- os.path
- progress
- requests
- sys
- time
- unidecode
You can install modules with:
sudo pip install <module_name>
Nothing special to be done. Just download the version of the script that you wish to use.
Both versions of the script use the same arguments.
Usage:
lastfm2itunes.rb -u <username> -k <apikey> [-f <filename>] [-h] [-p]
Options:
-f, --datafile <filename> datafile name (optional)
-h, --help show help (optional)
-k, --apikey <api_key> last.fm api key
-p, --lastplayed update the last played date (optional)
-u, --username <username> last.fm username
Usage:
lastfm2itunes.py -u <username> -k <apikey> [-f <filename>] [-h] [-p]
Options:
-f, --datafile <filename> datafile name (optional)
-h, --help show help (optional)
-k, --apikey <api_key> last.fm api key
-p, --lastplayed update the last played date (optional)
-u, --username <username> last.fm username
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Please read the CONTRIBUTING.md file for more details on how to contribute to this project.
This project uses SemVer for versioning. For the versions available, see the tags on this repository.
- Frederico Martins - fscm
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details