# Several Libraries

> Keep separate libraries for different people or iPods, switch between them, and move a library to another folder or drive.

Most people need only one library. But if your family shares a Mac, or you keep a different collection on each iPod, ClassicTunes can keep several libraries, each with its own songs, playlists, podcasts, settings and iPods.

One library is open at a time. Switching to another restarts ClassicTunes on it, which takes a few seconds.

## How libraries and iPods fit together

- **Several iPods can share one library.** Each iPod still chooses its own music in its Sync Options, so two iPods in the same library can have different songs. See [Syncing](https://classictunes.app/docs/syncing).
- **Or each iPod can have its own library**, with a completely separate collection and settings.
- **Each iPod belongs to one library**: the one that last synced it. When you plug it in, ClassicTunes opens that library by itself.

The first time you connect an iPod that no library has synced, ClassicTunes asks which library it should use: this library, another library, or a new library made for it. See [Connecting an iPod](https://classictunes.app/docs/connecting#the-first-time-you-connect-an-ipod).

## Make a new library

Choose **File › Library › New Library…**. You can also click the small switch button beside the **Library** heading in the sidebar, or use **Settings › Libraries**.

1. Type a **Name**, such as "Sam's Library".
2. The **Location** shows where its folder will be made: a folder with the library's name inside **~/Library/Application Support/ClassicTunes Libraries**. Click **Change…** to make it somewhere else, for example on an external drive.
3. Click **Create and Open**.

ClassicTunes restarts on the new, empty library. Its settings start fresh too.

## Switch libraries

Any of these switch to another library:

- **File › Library**, then the library's name. The open library has a check mark.
- The switch button beside the library's name in the sidebar (the **Library** heading shows the open library's name once you have more than one).
- **File › Library › Choose Library…**, which lists every library with its location and iPods. Select one and click **Open**.
- **Settings › Libraries**: select a library and click **Open**.
- Hold down the Option key while ClassicTunes opens, and it asks which library to use.

ClassicTunes restarts on the library you chose, in the same window position. If an iPod is syncing, a CD is importing, or songs or podcasts are still being added, it asks you to try again when that's finished.

### When you plug in an iPod from another library

When you plug in an iPod that belongs to a different library from the one that's open, ClassicTunes switches to that library by itself. If something is busy (a sync, an import or a library move), it asks first: **Open Library** reopens ClassicTunes on the iPod's library, which stops what's running; **Not Now** leaves things as they are.

If you stay in the current library, the iPod's page shows "This iPod belongs to the library…", with a button to open that library. Syncing it with the open library replaces its music with this library's, and the iPod then belongs to this library.

## Manage your libraries

**Settings › Libraries** lists every library, with its location and the iPods that belong to it. A library whose folder can't be found (for example, on a drive that isn't connected) is marked **Not found**.

| Button | What it does |
|---|---|
| **Open** | Switches to the selected library. |
| **Rename…** | Gives the library a new name. |
| **Show in Finder** | Shows the library's folder. |
| **Remove from List…** | Takes the library off the list. Its folder and files stay where they are, and you can bring it back with **Add Existing Library…**; its settings are forgotten. You can't remove the library that's open. |
| **New Library…** | Makes a new library. |
| **Add Existing Library…** | Adds a library folder made earlier (one that contains library.json), for example one on another drive or copied from another Mac, and opens it. |

**Add Existing Library…** is also in **File › Library** and the sidebar's switch menu.

## Settings belong to each library

Most of **Settings › General** belongs to the open library: syncing, adding songs, importing CDs, playback, podcasts and so on. When you have more than one library, the top of the tab says which library the settings are for. A few things apply to the whole app, such as **Open ClassicTunes when an iPod is connected**, notifications and the **Libraries** tab. See [Settings](https://classictunes.app/docs/settings).

## Move a library

You can move the open library's folder, for example to an external drive with more space.

1. Open **Settings › General** and scroll to **Library**. **Location** shows where the library is now; **Show** opens it in Finder.
2. Click **Change…** and choose a folder. The library is moved into a folder called "ClassicTunes" inside the folder you choose.
3. ClassicTunes shows where it's moving from and to, and how big it is. Click **Move Library**.
4. Everything is copied and checked before switching. The old folder then goes to the Trash.
5. Click **Restart Now** to start using the library from its new place. Changes made before restarting won't be saved.

Wait for syncing, importing and podcast downloads to finish before you move a library. Don't disconnect the drive or quit ClassicTunes while it's copying.

If the folder you choose already has a ClassicTunes library in it, ClassicTunes offers to **Switch to It** instead. Your current library stays where it is.

To move a library back, click **Move Back to Default Location…**.

### What's in a library's folder

The library's folder holds its list of songs (library.json), the songs copied into it (in **Media**, sorted by artist and album), artwork, podcast downloads, converted files and backups. Copy the whole folder to back up a library, or to take it to another Mac and open it with **Add Existing Library…**.

## If a library can't be found

If a library's folder isn't there when ClassicTunes opens, for example because it's on an external drive that isn't connected, the window shows **Library Not Found** instead:

- **Try Again**: connect the drive, then click this.
- **Locate…**: choose the library's folder if you've moved it yourself. ClassicTunes restarts with it.
- **Use Default Location…**: restart with the library in the default place (**~/Library/Application Support/ClassicTunes**). The missing library isn't affected; use **Locate…** later to go back to it.
- **Open Another Library**: switch to one of your other libraries.

## From AppleScript and Shortcuts

Scripts always work on the library that's open. `library name` says which one that is:

```applescript
tell application "ClassicTunes"
    display dialog "ClassicTunes has " & library name & " open."
end tell
```

Making, switching and moving libraries isn't scriptable. A script can only sync iPods that belong to the open library; see [AppleScript](https://classictunes.app/docs/applescript#scripts-only-sync-ipods-set-up-with-this-library). There are no Shortcuts actions for libraries.
