[subtitle] FPS field removed

This commit is contained in:
Julien Veyssier 2013-02-27 17:45:57 +01:00
commit d54adca470
5 changed files with 2 additions and 12 deletions

View file

@ -71,7 +71,6 @@ class SubtitlesPage(BasePage):
url = "http://davidbillemont3.free.fr/%s"%href
subtitle = Subtitle(id,name)
subtitle.url = url
subtitle.fps = 0
subtitle.language = "fre"
subtitle.nb_cd = nb_cd
subtitle.description = "no desc"
@ -115,7 +114,6 @@ class SubtitlesPage(BasePage):
id = "%s|%s"%(self.browser.geturl().split('/')[-1],href)
subtitle = Subtitle(id,name)
subtitle.url = url
subtitle.fps = 0
subtitle.language = "fre"
subtitle.nb_cd = nb_cd
subtitle.description = "no desc"

View file

@ -118,7 +118,6 @@ class SubtitlesPage(BasePage):
#link = self.parser.select(second_cell,'a',1)
#lang = link.attrib.get('href','').split('/')[-1].split('-')[-1]
#nb_cd = int(cells[2].text.strip().lower().replace('cd',''))
#fps = 0
#desc = ''
#cell_dl = cells[4]
#href = self.parser.select(cell_dl,'a',1).attrib.get('href','')
@ -127,7 +126,6 @@ class SubtitlesPage(BasePage):
#subtitle = Subtitle(id,name)
#subtitle.url = url
#subtitle.fps = fps
#subtitle.language = lang
#subtitle.nb_cd = nb_cd
#subtitle.description = "no desc"
@ -155,11 +153,9 @@ class SubtitlePage(BasePage):
desc_line = f.getparent().text_content()
desc += "\n"+" ".join(desc_line.split())
name = "%s (%s)"%(title,file_name)
fps = 0
subtitle = Subtitle(id,name)
subtitle.url = url
subtitle.fps = fps
for lshort,llong in LANGUAGE_CONV.items():
if lang == llong:
lang = lshort

View file

@ -102,11 +102,9 @@ class SeasonPage(BasePage):
file_names = self.parser.select(filenames_line,'td')[2].text_content().strip().replace('.srt','.srt\n')
desc = u"files :\n"
desc += file_names
fps = 0
subtitle = Subtitle(id,name)
subtitle.url = url
subtitle.fps = fps
subtitle.language = lang
subtitle.nb_cd = nb_cd
subtitle.description = desc

View file

@ -38,13 +38,12 @@ def sizeof_fmt(num):
class SubtitleInfoFormatter(IFormatter):
MANDATORY_FIELDS = ('id', 'name', 'url', 'fps', 'description')
MANDATORY_FIELDS = ('id', 'name', 'url', 'description')
def format_obj(self, obj, alias):
result = u'%s%s%s\n' % (self.BOLD, obj.name, self.NC)
result += 'ID: %s\n' % obj.fullid
result += 'URL: %s\n' % obj.url
result += 'FPS: %s\n' % obj.fps
result += 'LANG: %s\n' % obj.language
result += 'NB CD: %s\n' % obj.nb_cd
result += '\n%sDescription%s\n' % (self.BOLD, self.NC)

View file

@ -40,8 +40,7 @@ class Subtitle(CapBaseObject):
"""
name = StringField('Name of subtitle')
url = StringField('Direct url to subtitle file')
fps = FloatField('Framerate of corresponding video')
nb_cd = IntField('Number of cd')
nb_cd = IntField('Number of cd or files')
language = StringField('Language of the subtitle')
description=StringField('Description of corresponding video')