# What! No iTunes! Changes in Yate for the Music/TV Applications

Mac OS 10.14 and earlier has iTunes. Mac OS 10.15 and later has Music, TV and Podcasts. Running iTunes on 10.15 or later is not an option. When you install 10.15 or later, the iTunes application is removed.

If you have just updated to Catalina or Big Sur or later and you've previously saved iTunes PIDs, they will not work. You should do an Actions>Batch Extract Persistent IDs to acquire the new PIDs.

Unless knowing which application is referenced is critical, all references to iTunes in Yate's UI and help has been replaced with Apple App or Apple Apps. Yate automatically determines whether it should be communicating with the Music or TV application. There is no way to manually specify this. Unfortunately, there is no programmatic access to the Podcasts application.

While some of these might be redundant, here are a few of the more important UI changes:

- The application's iTunes menu is now named Apple Apps.
- The main window column iTunes has been renamed to Linked.
- The main window column PID has been renamed to Linked PID.
- The main window's filter property previously named iTunes (linked) is now named Is Linked.
- The Preference section previously named iTunes is now named Apple Apps.
- The Export Set Special Export Field previously named iTunes PID is now named Linked PID.
- The Export Set Special Export Field previously named PID is now named Apple App PID.
- The Rename Template token named iTunes PID has been renamed to Linked PID.
- The file property previously named Is Linked to iTunes is now named Is Linked.
- The file property previously named iTunes Grouping Compatibility is now named Grouping Compatibility.
- The file property previously named iTunes PID is now named Linked PID.
- The iTunes PID UDTI is now read and written as Apple App PID. Older iTunes PID tags will still be read.
- All action statements which contained iTunes in their names have been renamed.
- The phrase Mastered for iTunes has been replaced with Apple Digital Master.

# Associating Files with a Particular Application post iTunes

When dragging tracks from Music or TV, Yate determines its source by the Media Type specified in the drag operation from the source application. A file with a Media Type of Music Video is associated with Music. All other files containing video are associated with TV. All other files are associated with Music.

When attempting to link or add a file to Music or TV, the determination is made as follows: If the file contains video and has a Media Type field of Music Video, the target application will be Music. Any other file containing video will be targeted to TV. Any other file will be targeted to Music.

A persistent ID (PID) is a sequence of hexadecimal digits. When using an Apple App PID to link, the PIDs specify the target application as follows:

No prefix
  Where there is no prefix (ie. starts with a hexadecimal digit), it is a PID acquired previously from iTunes. These PIDs are effectively invalidated.
M prefix
  implies a PID associated with the Music application. Note that the M prefix is case insensitive.
V prefix
  implies a PID associated with the TV application. Note that the V prefix is case insensitive.

# The Media Type field

The Media Type field is far more restricted on 10.15 or later. When exporting to the Music Application the only types where an attempt to set the application's Media Kind will take place are Music or Music Video.

When exporting to the TV Application the only types where an attempt to set the application's Media Kind will take place are Home Video, Movie or TV Show.

There are a few special considerations if you want to relocate a file containing video from Music to TV or vice versa:

- To move a file from TV to Music do the following:
  - Load the file into Yate and do an Apple Apps>Link to Apple App
  - Do an Apple Apps>Remove from Apple App. This will also remove any Apple App PID UDTIs.
  - Change the Media Type field to Music Video.
  - Do an Apple Apps>Add to Apple App.
- To move a file from Music to TV do the following:
  - Load the file into Yate and do an Apple Apps>Link to Apple App
  - Do an Apple Apps>Remove from Apple App. This will also remove any Apple App PID UDTIs.
  - Change the Media Type field to anything other than Music Video.
  - Do an Apple Apps>Add to Apple App.

# Preferences-Apple Apps Metadata Types

Interfacing with the Music Application

- Episode, Episode ID, Season, Show Name and Sort Show Name are not supported. While you can still use the metadata in Yate it is never imported from or exported to the application.
- The only difference is that the only Media Type values which can be read or written are Music and Music Video.

Interfacing with the TV Application

- Album Artist, Classical metadata, Disc, Disc Count, Loved/Disliked, Skip when shuffling, Track and Track Count are not supported. While you can still use the metadata in Yate it is never imported from or exported to the application. Note that Loved/Dislike is visible in the TV application's UI but the corresponding interface has been removed from the AppleScript support.
- The Artist and Sort Artist fields are interpreted as the director in the TV application.
- Other library only metadata can be read and written to the application but the data may never actually be used or displayed.
- The only Media Types which can be read or written are Movie, Home Video and TV Show

# Dragging Tracks into Yate from the Music and TV Applications

Dragging in audio tracks from the Music application works fine. Every dragged file will be linked. Music videos will only be linked if they are dragged into Yate from the Songs view.

Movies can be dragged from the TV application and will be automatically linked. TV shows can be dragged the TV application but as the necessary information is not provided, they will not be automatically linked.

# Artwork

In 10.15 and later, both Music and TV do not update artwork when told to refresh the files. Two workarounds are provided.

The Extreme Update Apple Apps set of actions, supplied on the resources page is an action based workaround. The actions essentially remove tracks from the applications preserving all content, user playlist information and special library only metadata and then put them back. This was our first workaround. This method is slow and cannot preserve the presense of the tracks in smart playlists.

A second built-in solution was provided in Yate v6.0. The Artwork menu has a Patch Artwork in Apple App item. The associated functionality is far faster but has the limitation, due to yet another bug, that at most one artwork item will be present in the tracks when it completes. A same named action statement is also provided.

# A few Suggestions

If you are going to use Yate in conjunction with the TV application, it is recommended that you enable the Preferences - File List setting named Do not enforce formatting of the Year field. The TV application will ignore all changes to the Year field unless they are of the form yyyy-mm-dd. So that you can safely forget about Year fields with only year content, it is recommended that you set the Preferences - Video Normalize the Year Field if required setting.

While the use of persistent IDs (PIDs) is always recommended, it is especially recommended if you're going to tag music videos in the Music application.