no more auto, seriesYear

This commit is contained in:
j 2012-09-12 18:16:54 +02:00
parent a1a8c0b428
commit 1bbfa6e0c8
2 changed files with 4 additions and 4 deletions

View file

@ -133,7 +133,7 @@ class File(models.Model):
data = ox.movie.parse_path(path)
for key in (
'normalizedPath', 'isEpisode',
'title', 'director', 'year',
'title', 'director', 'directorSort', 'year',
'season', 'episode', 'episodeTitle',
'seriesTitle', 'seriesYear'
):
@ -152,6 +152,8 @@ class File(models.Model):
data['isEpisode'] = data.get('season') != None \
or data.get('episode') != None \
or data.get('episodes') != []
if data['isEpisode'] and data['seriesYear'] == None:
data['seriesYear'] = data['year']
data['type'] = 'unknown'
for type in ox.movie.EXTENSIONS:
if data['extension'] in ox.movie.EXTENSIONS[type]:

View file

@ -354,7 +354,6 @@ def editFiles(request):
if True:
if 'ignore' in data:
models.Instance.objects.filter(file__in=files).update(ignore=data['ignore'])
files.update(auto=True)
#FIXME: is this to slow to run sync?
for i in Item.objects.filter(files__in=files).distinct():
i.update_selected()
@ -396,7 +395,6 @@ def editFile(request):
update = False
#FIXME: should all instances be ignored?
if 'ignore' in data:
f.auto = True
f.instances.update(ignore=data['ignore'])
f.save()
#FIXME: is this to slow to run sync?
@ -449,7 +447,7 @@ def getPath(request):
ids = data['id']
if isinstance(ids, basestring):
ids = [ids]
for f in models.File.objects.filter(oshash__in=ids).values('path', 'oshash'):
for f in models.File.objects.filter(oshash__in=ids).values('path', 'oshash').order_by('sort_path'):
response['data'][f['oshash']] = f['path']
return render_to_json_response(response)
actions.register(getPath, cache=True)