Catalina deleted all my Audiobooks!: Difference between revisions

From Wurst-Wasser.net
Jump to navigation Jump to search
Line 25: Line 25:


==== The easy part: Extract all Audible Audiobooks ====
==== 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
  #!/bin/bash
  #set -x
  #set -x
   
   
  GITUNESLIB="/Volumes/Daten HD (Portable Samsung 2TB)/Users/heiko/Music/iTunes/iTunes Music"
  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"
  GTARGETFOLDER="/Volumes/Daten HD (Portable Samsung 2TB)/Audiobooks Salvaged After Catalina-Fuckup"
  GEXTENSIONS=".aa" # m4b=Apple, aa=Audible
  GEXTENSIONS=".aa" # m4b=Apple, aa=Audible
Line 51: Line 53:
  done # done extensions
  done # done extensions
   
   
exit 0
# Look for my self-made mp3s...
echo "Search for large files..."
find "${GITUNESLIB}" -type f -size +10M -print | while read LINE; do
echo "Found: $LINE"
done # done find
# find . -name \*.aa\* -exec cp "{}" /Volumes/Daten\ HD\ \(Portable\ Samsung\ 2TB\)/Audiobooks\ Salvaged\ After\ Catalina-Fuckup/dot-aa/ \;
  # EOF
  # EOF
=== More on that matter ===
* This is a desaster!
* Storing lotsa GB of Audiobooks in <code>/User//Library/Containers/com.apple.BKAgentService</code> is insane!
* I only add the books I'm about to read to Books.app
* Links
** https://kirkville.com/how-to-manage-audiobooks-in-a-post-itunes-world/
** https://discussions.apple.com/thread/250724365


==== The hard part: Extracting all Other Audiobooks ====
==== The hard part: Extracting all Other Audiobooks ====

Revision as of 15:56, 9 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 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

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

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 the iTunes Library...


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

More on that matter

The hard part: Extracting all Other Audiobooks