move EXTENSIONS to ox.file and add image type
This commit is contained in:
parent
5c6ff50027
commit
0effb090a3
2 changed files with 17 additions and 13 deletions
16
ox/file.py
16
ox/file.py
|
@ -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)
|
||||
|
|
14
ox/movie.py
14
ox/movie.py
|
@ -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']
|
||||
|
||||
'''
|
||||
|
|
Loading…
Reference in a new issue