Better key system for season

This commit is contained in:
Kylart 2017-07-07 13:07:44 +02:00
parent 5c66468627
commit a8263723df
2 changed files with 10 additions and 2 deletions

View File

@ -11,6 +11,14 @@ exports.getSeason = (url, res) => {
malScraper.getSeason(query.year, query.season).then((result) => {
console.log(`[Mal-Scraper] (Seasons): Now having ${query.season} ${query.year}.`)
const keys = Object.keys(result.info)
keys.forEach((key) => {
result.info[key].forEach((elem, index) => {
result.info[key][index].key = Math.random()
})
})
res.writeHead(200, {'Content-Type': 'application/json'})
res.write(JSON.stringify(result))
res.end()

View File

@ -48,7 +48,7 @@
<transition-group name="list">
<v-col md6 xs12 v-for="item in computedSeason[i].items"
style="display: inline-block"
:key="item.title + item.synopsis + item.releaseDate">
:key="item.key">
<v-row class="elem elevation-3" v-ripple="true">
<!-- Header of elem -->
<v-col xs12 v-tooltip:bottom="{ html: item.title }">
@ -214,7 +214,7 @@
})
}
} else return ''
})
})
}
},
components: {