Catalina deleted all my Audiobooks!: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
 
(14 intermediate revisions by the same user not shown)
Line 25: Line 25:


=== What worked for me ===
=== What worked for me ===
I decided to salvage only the Audiobooks from Audible (386 files), and let the rest stay in the iTunes Library. Why, you ask? It's pretty simple. I added loads of kid's CDs to my iTunes Library, so the kids can play them on iPod Touches instead of CD-Players. Now the ''but'': GracenoteDB and similar services come in handy when adding CDs, but...one CD can have more than one artist (worst case, another for each track), iTunes sorts (more like "spreads") the contents of the CD in multiple Artist-Folders in iTunes Library...
For the moment, I decided to salvage only the Audiobooks from Audible (386 files of the 13,500 in total), and let the rest stay in the iTunes Library. Why, you ask? It's pretty simple. I added loads of kid's CDs to my iTunes Library, so the kids can play them on iPod Touches instead of CD-Players. Now the ''but'': GracenoteDB and similar services come in handy when adding CDs, but...one CD can have more than one artist (worst case, another for each track), iTunes sorts (more like "spreads") the contents of the CD in multiple Artist-Folders in iTunes Library...(read on, I found a solution later on)




Line 61: Line 61:
==== The hard part: Extracting all Other Audiobooks ====
==== The hard part: Extracting all Other Audiobooks ====
I tried different approaches, but ended up with the most obvious:
I tried different approaches, but ended up with the most obvious:
* Mount the disk containing the iTunes Library on a VM with Mojave<ref>I recommend VMWare Fusion 11.x.</ref><ref>Download Mojave: https://support.apple.com/en-us/HT210190 <- there's an AppStore-Link in the Article</ref>
* Mount the disk containing the iTunes Library on a VM with Mojave<ref>I recommend VMWare Fusion 11.x.</ref><ref>Download Mojave: https://support.apple.com/en-us/HT210190 <- there's an AppStore-Link in the Article</ref><ref>Somehow mounting didn't work. But sharing the Music Folder did.</ref>
* Use good, old iTunes to export the Audiobooks using a Script I originally developed for [[AppleScript Launcher]]<ref>This could also be done with bash and mp3info, but the grouping and Metadata of iTunes are more accurate.</ref>
* Use good, old iTunes to export the Audiobooks using a Script I originally developed for [[AppleScript Launcher]]<ref>This could also be done with bash and mp3info, but the grouping and Metadata of iTunes are more accurate.</ref>
** Create a (Smart) Playlist with all the Audiobooks to export
** Create a (Smart) Playlist with all the Audiobooks to export
** Select all items
** Select all items
** run <code>Export Selected Tracks….applescript</code><ref>[[AppleScript: Export Selected Tracks….applescript]]</ref>
** run <code>Export Selected Tracks….applescript</code><ref>[[AppleScript: Export Selected Tracks….applescript]]</ref><ref>You can also use drag&drop, but then you don't have a nice sorting like you get with the [[AppleScript]]
** Optional: Delete the exported items from your Library
** Optional: Delete the exported items from your Library
** Optional: Also use this Script for the before mentioned Audible-Content
** Optional: Also use this Script for the before mentioned Audible-Content
Line 72: Line 72:
* This is a desaster!
* This is a desaster!
* Storing lotsa GB of Audiobooks in <code>~/Library/Containers/com.apple.BKAgentService</code> is insane!
* Storing lotsa GB of Audiobooks in <code>~/Library/Containers/com.apple.BKAgentService</code> is insane!
* Ratings, playcounts etc. are lost forever (okay, I could add readout to the [[AppleScript]], but where should it be saved?)
* ''I only add the books I'm about to read to Books.app''
* ''I only add the books I'm about to read to Books.app''
* I expect Podcasts will be the same nightmare!
* I expect Podcasts/Movies will be the same nightmare! (but much simpler, each is one file in folders <code>./Podcasts</code> and <code>./Movies</code>)
** Update to Movies: Actually that one's fine. TV.App continues to use iTunes Media/Movies folder.
** Update to Podcasts: https://apple.stackexchange.com/questions/366075/how-to-add-podcasts-manually-to-the-new-podcasts-app-on-macos-catalina
* Links
* Links
** https://kirkville.com/how-to-manage-audiobooks-in-a-post-itunes-world/
** https://kirkville.com/how-to-manage-audiobooks-in-a-post-itunes-world/
Line 79: Line 82:
** https://www.macobserver.com/news/catalina-media-file-locations/
** https://www.macobserver.com/news/catalina-media-file-locations/
** https://macmost.com/how-to-manage-an-audiobook-collection-in-macos-catalina.html (Manual management of Audiobooks)
** https://macmost.com/how-to-manage-an-audiobook-collection-in-macos-catalina.html (Manual management of Audiobooks)
** https://apple.stackexchange.com/questions/366075/how-to-add-podcasts-manually-to-the-new-podcasts-app-on-macos-catalina
** https://discussions.apple.com/thread/250739880 considering Music Videos...
* Ideas
** Why not change the Media Kind from Audiobook to Music?
----
Footnotes:
<references/>
[[Category:Mac OS X]]

Latest revision as of 15:20, 25 February 2020

What? It deleted all the Audiobooks? No, not really. But hid them well and left it to me to remedy the situation.

The Problem

Upgrading from Mojave to Catalina was mostly harmless. Fitting for an earth-made OS. :-) At some time (I guess it was opening Books), Catalina tried to move all my Audiobooks from iTunes (now Music) to iBooks (now Books). Since my iTunes Library is on an USB-drive, and the iBooks-Library is on the internal SSD (with obviously less space) this failed. That wouldn't be so bad, if the AudioBooks where still usable in iTunes.

The Analysis

  • Q: Are they still in iTunes?
  • A: Can't find them in Music-App.
  • Q: Have the files been left over?
  • A: Try find . -name \*.aa\* -print in your Music/iTunes Library. In my case, it found all my Audible-Audiobooks (.aa)

So, they are still there...

The Solution

What doesn't work #1

CatalinaBooksMusic01.png CatalinaBooksMusic02.png This is really annoying. This stupid app doesn't even tell me how much I should free. Absolutely useless.

What doesn't work #2

$ ln -s /Volumes/Daten\ HD\ \(Portable\ Samsung\ 2TB\)/Users/SOMEONE/Music/Audiobooks/Audiobooks /Users/SOMEONE/Library/Containers/com.apple.BKAgentService/Data/Documents/iBooks/Books/

Alias doesn't work, too![1]

What worked for me

For the moment, I decided to salvage only the Audiobooks from Audible (386 files of the 13,500 in total), and let the rest stay in the iTunes Library. Why, you ask? It's pretty simple. I added loads of kid's CDs to my iTunes Library, so the kids can play them on iPod Touches instead of CD-Players. Now the but: GracenoteDB and similar services come in handy when adding CDs, but...one CD can have more than one artist (worst case, another for each track), iTunes sorts (more like "spreads") the contents of the CD in multiple Artist-Folders in iTunes Library...(read on, I found a solution later on)


The easy part: Extract all Audible Audiobooks

This script will move all Audible Audiobooks to another location. From there, you can add them (as needed) to Books.

#!/bin/bash
#set -x

GITUNESLIB="/Volumes/Daten HD (Portable Samsung 2TB)/Users/SOMEONE/Music/iTunes/iTunes Music"
GTARGETFOLDER="/Volumes/Daten HD (Portable Samsung 2TB)/Audiobooks Salvaged After Catalina-Fuckup"
GEXTENSIONS=".aa" # m4b=Apple, aa=Audible
#GEXTENSIONS=".m4b .aa" # m4b=Apple, aa=Audible

# Find Audiobooks
for EXT in ${GEXTENSIONS}; do
	echo "Searching for \"${EXT}\"..."
	find "${GITUNESLIB}" -name \*${EXT}\* -print | while read LINE; do
		echo "Found: $LINE"
        	BOOK="`echo \"${LINE}\" | rev|cut -d/ -f2 | rev`"
        	ARTIST="`echo \"${LINE}\" | rev|cut -d/ -f3 | rev`"
#         	echo "Book: $BOOK"
#		echo "Artist: $ARTIST"

		# Create Parent Folders
		mkdir -p "${GTARGETFOLDER}/${ARTIST}/${BOOK}"

		# Move Audiobook 
		mv "${LINE}" "${GTARGETFOLDER}/${ARTIST}/${BOOK}/"
	done # done find
done # done extensions

# EOF

The hard part: Extracting all Other Audiobooks

I tried different approaches, but ended up with the most obvious:

  • Mount the disk containing the iTunes Library on a VM with Mojave[2][3][4]
  • Use good, old iTunes to export the Audiobooks using a Script I originally developed for AppleScript Launcher[5]
    • Create a (Smart) Playlist with all the Audiobooks to export
    • Select all items
    • run Export Selected Tracks….applescript[6]<ref>You can also use drag&drop, but then you don't have a nice sorting like you get with the AppleScript
    • Optional: Delete the exported items from your Library
    • Optional: Also use this Script for the before mentioned Audible-Content

More on that matter...


Footnotes:

  1. Tried everything I could think of: restarting BKA-Daemon, rebooting...Nothing worked.
  2. I recommend VMWare Fusion 11.x.
  3. Download Mojave: https://support.apple.com/en-us/HT210190 <- there's an AppStore-Link in the Article
  4. Somehow mounting didn't work. But sharing the Music Folder did.
  5. This could also be done with bash and mp3info, but the grouping and Metadata of iTunes are more accurate.
  6. AppleScript: Export Selected Tracks….applescript