Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old February 9th, 2007   #11
MetalMusicAddict
Tall Cafè Ubuntu
 
MetalMusicAddict's Avatar
 
Join Date: Jan 2005
My beans are hidden!
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

Ill try it. Im not worried about the time. Ill let you know 1000 folders worth of CDs takes. Goes off to try.

Last edited by MetalMusicAddict; February 9th, 2007 at 07:02 PM..
MetalMusicAddict is offline   Reply With Quote
Old February 9th, 2007   #12
MetalMusicAddict
Tall Cafè Ubuntu
 
MetalMusicAddict's Avatar
 
Join Date: Jan 2005
My beans are hidden!
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

I cant get it to work on the root music dir. Just for fun I ran it on a artists folder itself and it seems to choke on folders with spaces in them. Editing the .XML file to add the other folders doesnt work either.

Code:
<?xml version="1.0"?>
<directory>
<file name="Leviathan" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Lifesblood" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Remission" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Blood Mountain" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Call Of The Mastodon" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Live 2003 Tilburg Netherlands" timestamp="1171063155" custom_icon="cover.jpg"/>
<file name="Live Club Quattro - Osaka, Japan" timestamp="1171063155" custom_icon="cover.jpg"/>
</directory>
The the code might need something added for the spaces.

Something has changed between the original script and your last. I think the original one handled the spaces. I do have a couple of folders that do have a image in them. Before the ones with spaces showed. Now they do not. If I posted the .XML for the root folder of my music it would show this as well. Nothing with a space in it.

Last edited by MetalMusicAddict; February 9th, 2007 at 07:31 PM..
MetalMusicAddict is offline   Reply With Quote
Old February 9th, 2007   #13
zerwas
A Carafe of Ubuntu
 
zerwas's Avatar
 
Join Date: Dec 2004
Location: Germany
Beans: 130
Ubuntu 9.10 Karmic Koala
Send a message via ICQ to zerwas Send a message via AIM to zerwas Send a message via MSN to zerwas Send a message via Yahoo to zerwas Send a message via Skype™ to zerwas
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

I think we really need an easy way to do this!
Anyone has the same opinion? We should create a feature request for this.
zerwas is offline   Reply With Quote
Old February 9th, 2007   #14
spockrock
Dipped in Ubuntu
 
spockrock's Avatar
 
Join Date: May 2005
Location: Yoshi Island
Beans: 584
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

I am not surprised that it was not incorporated into gnome already.....
spockrock is offline   Reply With Quote
Old February 9th, 2007   #15
MetalMusicAddict
Tall Cafè Ubuntu
 
MetalMusicAddict's Avatar
 
Join Date: Jan 2005
My beans are hidden!
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

Maybe some crap IP infringement?
MetalMusicAddict is offline   Reply With Quote
Old February 10th, 2007   #16
spockrock
Dipped in Ubuntu
 
spockrock's Avatar
 
Join Date: May 2005
Location: Yoshi Island
Beans: 584
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

I thought it was in mac osx as well cover.*, oh well.... btw so I had to go through about 500+ metal albums and fix the 100 something Folders.jpg to folder.jpg, so this would work, and damn it took a long time... hahahha, I am sure I could of wrote a script but meuh...
spockrock is offline   Reply With Quote
Old February 10th, 2007   #17
barney_1
Ubuntu Extra Shot
 
barney_1's Avatar
 
Join Date: Jun 2006
Beans: 365
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

Hmmm... write a script or change 100 captial Fs by hand... it's a toss up.

I'm running Kubuntu and am new to the KDE desktop. How much work do you think I'd have to go through to adapt this method for KDE? It's a pretty nice feature, I appreciate the work you guys are putting in on it.
barney_1 is offline   Reply With Quote
Old March 27th, 2007   #18
fifo
First Cup of Ubuntu
 
Join Date: Mar 2007
My beans are hidden!
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

Well this is something that I'd quite like to do, but I can't stand php (sorry) and I wanted to have a go at fixing some of the shortcomings, so I've written my own version in python.

This should handle spaces in directory names (as well as other strange characters, but nautilus' quoting rules seem rather obscure, so maybe there are things I've missed here).

You can specify your own shell-type pattern (--names) for matching the image filename (the default is "[Ff]older.jpg").

There is also a switch (-R) to make it work recursively across nested directories.

Download: custom_icon.py

Code:
$ python custom_icon.py --help
usage: custom_icon.py [options] folder [folder2 ...]

options:
  --version        show program's version number and exit
  -h, --help       show this help message and exit
  --names=NAMES    specification to match image filenames [default:
                   "[Ff]older.jpg"]
  -R, --recursive  set icons for folders recursively

$ python custom_icon.py ~/music
/home/user/music ...
done.

$ nautilus -q
fifo is offline   Reply With Quote
Old June 7th, 2007   #19
TeKniKal
Spilled the Beans
 
Join Date: Oct 2006
Location: Belgium (Europe)
Beans: 14
Ubuntu 9.10 Karmic Koala
Send a message via MSN to TeKniKal Send a message via Skype™ to TeKniKal
Exclamation Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

Quote:
Originally Posted by fifo View Post
Well this is something that I'd quite like to do, but I can't stand php (sorry) and I wanted to have a go at fixing some of the shortcomings, so I've written my own version in python.

This should handle spaces in directory names (as well as other strange characters, but nautilus' quoting rules seem rather obscure, so maybe there are things I've missed here).

You can specify your own shell-type pattern (--names) for matching the image filename (the default is "[Ff]older.jpg").

There is also a switch (-R) to make it work recursively across nested directories.

Download: Attachment 28357

Code:
$ python custom_icon.py --help
usage: custom_icon.py [options] folder [folder2 ...]

options:
  --version        show program's version number and exit
  -h, --help       show this help message and exit
  --names=NAMES    specification to match image filenames [default:
                   "[Ff]older.jpg"]
  -R, --recursive  set icons for folders recursively

$ python custom_icon.py ~/music
/home/user/music ...
done.

$ nautilus -q
Works quite well, but it doesn't work for folders with an exclamation mark in them, I guess. Anyhow, I ran it on my music folder, and the folder "Weird Al Yankovic - Polka Party!" didn't get a thumb. I will take a look at your source code when I have some time (and more experience with Python).

Already thanks for this script, ignoring this minor bug it works just great
TeKniKal is offline   Reply With Quote
Old August 4th, 2007   #20
click4851
Way Too Much Ubuntu
 
Join Date: Nov 2005
Location: Pacific Northwest
Beans: 221
Kubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Make folder icons use Folder.jpg (Like Windows XP My Music folder does)

I love this idea....but I have my collection setup using in WIN XP /media/artist/album/songs.xxx with the album art in with the songs (folder.jpg style) and the thumbs are sometimes 1,2,3, up to 4 little album covers per artist. If I were to move some to Ubuntu would these scripts duplicate that or would I just get 1 thumb per album ?
__________________
AMD 64 3000+, 2G RAM, ASUS K8N , XFX GS7800, Kubuntu , WinXP(dual boot/seperate HD)

Stalker's Law: As an online discussion grows longer, the probability of a comparison involving how much the United States sucks approaches one.
click4851 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:44 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry