Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

itunesfm

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

itunesfm

Sync last.fm play counts with your iTunes library.

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-80%
Maintainers
1
Weekly downloads
 
Created
Source

itunesfm

A small script to sync your play counts from last.fm back to iTunes. Supports both Windows and Mac OS X without any native dependencies. (Requires Music.app on OS X.)

Useful if you scrobble to last.fm from iTunes on multiple computers / devices and want to keep your local play counts consistent.

Usage

npx itunesfm
itunesfm <last.fm username>

Potential changes will be displayed in the console, and you will be prompted before anything is actually saved.

Play counts will only be updated if the last.fm play count is higher than your local play count.

Notes

Songs are matched using a fairly naive method:

  • First, we look for exact name + artist matches.
  • If none exist, we consider exact name matches only.
  • If still none exist, consider names with >= 80% similarity (via Levenshtein distance)

It should be pretty easy to improve :)

In the case of ambiguities, you will be prompted for verification: this is then recorded in a matching.json file (in /usr/local/lib/node_modules/itunesfm, or %APPDATA%\npm\node_modules\itunesfm on Windows) for future script runs.

In the case where songs cannot be matched, you can try modifying matching.json manually. You'll notice that the script prints the following:

warning: could not match (..song..) (id = <identifier string>)

matching.json maps the id strings to last.fm track URLs. Example of a valid mapping (id format varies by platform):

{
  "211801203:-536327029":["http://www.last.fm/music/Aimer/_/Last+Stardust"],
  "-1005162388:-866900706":["http://www.last.fm/music/%E3%82%84%E3%81%AA%E3%81%8E%E3%81%AA%E3%81%8E/_/%E6%98%A5%E6%93%AC%E3%81%8D"],
}

You can find the URL for a song on last.fm by checking your scrobble history and going to the track page. The format should match the example exactly (http://www.last.fm/music/<ARTIST>/_/<SONG_NAME>).

Making changes

To compile:

yarn && yarn build

Run:

yarn start

Keywords

FAQs

Package last updated on 10 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc