Theme support

Registered by silvadouglas

Spec for Cover thumbnailer support theming.
See the "Whiteboard" below for more informations

-- Original message --
First excuse my English, I do not speak very well ... Well, I have a suggestion to you because I love the Cover Thumbnailer. My suggestion is about the image that is displayed in the music folders on Linux, which is a cover album, however, the user is stuck with only this CD image anything more. I wish you the option to put a layer of vinyl, type it here: [URL=http://img96.imageshack.us/i/rolledgoldvinil.jpg/][IMG]http://img96.imageshack.us/img96/4133/rolledgoldvinil.jpg[/IMG][/URL]

 Thank you and keep up the good work.

Blueprint information

Status:
Complete
Approver:
Fabien LOISON
Priority:
Medium
Drafter:
Fabien LOISON
Direction:
Approved
Assignee:
Fabien LOISON
Definition:
Approved
Series goal:
Accepted for v0.9
Implementation:
Implemented
Milestone target:
milestone icon v0.9
Started by
Fabien LOISON
Completed by
Fabien LOISON

Sprints

Whiteboard

I am working on the support of multiple themes for Cover thumbnailer.

The themes will be stored in:
/usr/share/cover-thumbnailer/theme/<theme_name>/

In this folder, two files will alway be needed:
* __init__.py
* theme.info
* thumb.png

===========================================================
The __init__.py file:
===========================================================

Contain the code for generating the thumbnail for the theme.
an example can be found here: http://bazaar.launchpad.net/~flozz/cover-thumbnailer/v0.9/view/head:/cover-thumbnailer/themes/classic/__init__.py

~~~~ Minimal Code ~~~~
#!/usr/bin/python
# -*- coding: utf-8 -*-

import sys
import os.path

import Image

def music_folder(thumbobj, basepath, imglist=[], crop=True, mosaic=False):
    pass #Do some stuff
    #return a PIL image

def picture_folder(thumbobj, basepath, imglist=[], max_pictures=3):
    pass #Do some stuff
    #return a PIL image

def other_folder(thumbobj, basepath, imglist=[]):
    pass #Do some stuff
    #return a PIL image
~~~~~~~~~~~~~~~~~~~

===========================================================
The theme.info file:
===========================================================

Contain informations about the theme.

~~~~ Example for the classic theme ~~~~
name = "Cover Thumbnailer Classic"
desc = "The original Cover Thumbnailer theme"
version = "0.9"
author = "Fabien LOISON"
email = "flo AT flogisoft DOT com"
licence = "GPLv3+"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

===========================================================
The thumb.png file:
===========================================================
A preview of the theme, the picture should be a png. Its size should be 480 x 230px
example: http://pix.toile-libre.org/?img=1299412322.png

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.