move EXTENSIONS to ox.file and add image type

This commit is contained in:
j 2013-10-14 20:07:05 +02:00
parent 5c6ff50027
commit 0effb090a3
2 changed files with 17 additions and 13 deletions

View file

@ -14,6 +14,22 @@ from ox.utils import json
__all__ = ['sha1sum', 'oshash', 'avinfo', 'makedirs']
EXTENSIONS = {
'audio': [
'aac', 'flac', 'm4a', 'mp3', 'oga', 'ogg', 'wav', 'wma'
],
'image': [
'bmp', 'gif', 'jpeg', 'jpg', 'png', 'svg', 'webp'
],
'subtitle': [
'idx', 'srt', 'sub'
],
'video': [
'3gp',
'avi', 'divx', 'dv', 'flv', 'm2t', 'm4v', 'mkv', 'mov', 'mp4',
'mpeg', 'mpg', 'mts', 'ogm', 'ogv', 'rm', 'vob', 'webm', 'wmv'
],
}
def cmd(program):
local = os.path.expanduser('~/.ox/bin/%s' % program)

View file

@ -11,22 +11,10 @@ import unicodedata
from normalize import normalize_name
from text import get_sort_name, find_re
from file import EXTENSIONS
__all__ = ['parse_movie_path', 'create_movie_path', 'get_oxid']
EXTENSIONS = {
'audio': [
'aac', 'flac', 'm4a', 'mp3', 'oga', 'ogg', 'wav', 'wma'
],
'subtitle': [
'idx', 'srt', 'sub'
],
'video': [
'3gp',
'avi', 'divx', 'dv', 'flv', 'm2t', 'm4v', 'mkv', 'mov', 'mp4',
'mpeg', 'mpg', 'mts', 'ogm', 'ogv', 'rm', 'vob', 'webm', 'wmv'
],
}
LANGUAGES = ['en', 'fr', 'de', 'es', 'it']
'''