Why you don't see it
Mounting file systems is a privileged operation on Unix systems. The udisks
daemon is used to provide a way for non-privileged users to mount volumes (such as the USB Mass Storage service offered by your phone), but will only allow active sessions to perform the operation.
When you are logged on at the console and haven't locked the screen, you are considered to have an active session. When you ssh
into the system, this is not the case. The idea is to only let someone with physical access to the system mount removable devices.
If you mount the phone manually, your music player should be able to access the files on it.
How to find it
Run dmesg
and look for your device. It should show up as something like /dev/sdb2
. "sd" for scsi disk (scsi instructions are standard for disks now), a letter for the disk (a, b, c, etc), and a number for the partition.
Or run sudo fdisk -l
to get a list of your disks and partitions. You'll see it here somewhere.
Mount it manually
Once you find the device path (eg, /dev/sdb2), mount it with this command:
mount /dev/sdb2 /mnt
If you want, make a folder and mount it there instead:
mkdir ~/android
mount /dev/sdb2 ~/android
Based on the MD5 lookup in Oli's script (thanks!), I've written a Python script that uses the eyeD3 module to find MP3s, look up the album artwork from Banshee's cache, and embed the artwork inside the MP3s. It skips any files that already have artwork embedded.
It's not perfect, but it worked on about 90% of my MP3s, and you can manually handle any exceptions using EasyTag. As it stands the script expects the MP3s to be two directory levels deep from the target directory (music root/artist/album). The script prints a report once it's done highlighting any files it couldn't process or for which it couldn't find artwork.
Obviously you need to install Python and the eyeD3 module to use it:
#! /usr/bin/env python
import os, sys, glob, eyeD3, hashlib
CACHE_FILE_PREFIX = os.getenv("HOME") + "/.cache/media-art/album-"
def embedAlbumArt(dir = "."):
artworkNotFoundFiles = []
errorEmbeddingFiles = []
noMetadataFiles = []
mp3s = findMP3Files(dir)
for mp3 in mp3s:
print "Processing %s" % mp3
tag = eyeD3.Tag()
hasMetadata = tag.link(mp3)
if not hasMetadata:
print "No Metadata - skipping."
noMetadataFiles.append(mp3)
continue
if hasEmbeddedArtwork(tag):
print "Artwork already embedded - skipping."
continue
artworkFilename = findAlbumArtworkFile(tag)
if not artworkFilename:
print "Couldn't find artwork file - skipping."
artworkNotFoundFiles.append(mp3)
continue
print "Found artwork file: %s" % (artworkFilename)
wasEmbedded = embedArtwork(tag, artworkFilename)
if wasEmbedded:
print "Done.\n"
else:
print "Failed to embed.\n"
errorEmbeddingFiles.append(mp3)
if artworkNotFoundFiles:
print "\nArtwork not found for:\n"
print "\n".join(artworkNotFoundFiles)
if errorEmbeddingFiles:
print "\nError embedding artwork in:\n"
print "\n".join(errorEmbeddingFiles)
if noMetadataFiles:
print "\nNo Metadata found for files:\n"
print "\n".join(noMetadataFiles)
def findMP3Files(dir = "."):
pattern = "/".join([dir, "*/*", "*.mp3"])
mp3s = glob.glob(pattern)
mp3s.sort()
return mp3s
def hasEmbeddedArtwork(tag):
return len(tag.getImages())
def findAlbumArtworkFile(tag):
key = "%s\t%s" % (tag.getArtist(), tag.getAlbum())
md5 = getMD5Hash(key)
filename = CACHE_FILE_PREFIX + md5 + ".jpg"
if os.path.exists(filename):
return filename
else:
return 0
def getMD5Hash(string):
string = string.encode("utf-8")
md5 = hashlib.md5()
md5.update(string)
return md5.hexdigest()
def embedArtwork(tag, artworkFilename):
tag.addImage(eyeD3.ImageFrame.FRONT_COVER, artworkFilename)
success = 0
try:
success = tag.update()
except:
success = 0
return success
if __name__ == "__main__":
if len(sys.argv) == 1:
print "Usage: %s path" % (sys.argv[0])
else:
embedAlbumArt(sys.argv[1])
Best Answer
Try removing
~/.config/banshee-1/banshee.db
(~
means your home folder).If you don't see the
.config
folder inside your home folder, pressCTRL+H
to make hidden files visible, and pressCTRL+H
again to make them invisible again when you're done.~/.config/banshee-1/banshee.db
is the SQLite database where Banshee stores your music library. When you remove it it will be created again when you start Banshee.Source: http://banshee.fm/support/faq/