IMDB automation crashed on second watchlist. fix #322
This commit is contained in:
@@ -23,7 +23,14 @@ class IMDB(Automation):
|
|||||||
movies = []
|
movies = []
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
|
enablers = self.conf('automation_urls_use').split(',')
|
||||||
|
|
||||||
|
index = -1
|
||||||
for csv_url in self.conf('automation_urls').split(','):
|
for csv_url in self.conf('automation_urls').split(','):
|
||||||
|
index += 1
|
||||||
|
if not enablers[index]:
|
||||||
|
continue
|
||||||
|
|
||||||
prop_name = 'automation.imdb.last_update.%s' % md5(csv_url)
|
prop_name = 'automation.imdb.last_update.%s' % md5(csv_url)
|
||||||
last_update = float(Env.prop(prop_name, default = 0))
|
last_update = float(Env.prop(prop_name, default = 0))
|
||||||
|
|
||||||
@@ -36,6 +43,8 @@ class IMDB(Automation):
|
|||||||
for column in csv_reader.next():
|
for column in csv_reader.next():
|
||||||
headers[column] = nr
|
headers[column] = nr
|
||||||
nr += 1
|
nr += 1
|
||||||
|
else:
|
||||||
|
csv_reader.next()
|
||||||
|
|
||||||
for row in csv_reader:
|
for row in csv_reader:
|
||||||
created = int(time.mktime(parse(row[headers['created']]).timetuple()))
|
created = int(time.mktime(parse(row[headers['created']]).timetuple()))
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
@@ -587,4 +587,9 @@
|
|||||||
.group_userscript .bookmarklet span {
|
.group_userscript .bookmarklet span {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.active .group_imdb_automation:not(.disabled) {
|
||||||
|
background: url('../../images/imdb_watchlist.png') no-repeat right 50px;
|
||||||
|
min-height: 210px;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user