Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For detailed explanation on how things work, check out [Nuxt.js docs](https://nu

## Dev env
#### Node
Node version `=14.18.2`
Node version `=14.21.3`

Node Version Manager (.nvmrc) has 14.18.2 as recommended, run `nvm install` and `nvm use` in `app` folder

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valóban, itt el lett felejtve frissíteni a readme-t az .nvmrc aktuális állapotáról, köszi! viszont akkor ebben a sorban is frissíteni kellene

#### Yarn
Expand Down
4 changes: 2 additions & 2 deletions app/components/BottomArcsiPlayer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ import { mediaServerURL } from '~/constants'

export default {
validate ({ params, store }) {
// Check if arcsiShows exists
return store.state.arcsiShows.length
// Check if arcsiShowsForTiles exists
return store.state.arcsiShowsForTiles.length
},
data () {
return {
Expand Down
31 changes: 23 additions & 8 deletions app/components/HeaderBlock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,14 @@ export default {

const minutes = today.getMinutes()

// refresh arcsiShows every 10 minutes
// refresh arcsiShowsForTiles every 10 minutes
if (minutes % 10 === 0) {
this.refreshAllShows()
this.refreshArcsiShowsForTiles()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question about tiles: Is it only going to change when we add new shows or also whenever a new episode is published?

Anyway I think schedule 10 min is okay but hopefully we can be more relaxed about shows tiles after this split, what do you think?

}

// refresh arcsiShowsForSchedule every 10 minutes
if (minutes % 10 === 0) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a két if (minutes % 10 === 0) ugyanaz, össze lehet vonni és egy blokkon belül menjen a két call?

this.refreshArcsiShowsForSchedule()
}

// refresh rareShows every 3 minutes
Expand All @@ -68,14 +73,24 @@ export default {
this.refreshCustomSchedule()
}
},
async refreshAllShows () {
await this.$axios.get(arcsiShowsBaseURL + '/all_without_items', config)
async refreshArcsiShowsForTiles () {
await this.$axios.get(`${arcsiShowsBaseURL}/all_tiles`, config)
.then((res) => {
this.$store.commit('refreshArcsiShowsForTiles', res.data)
})
.catch((e) => {
this.$sentry.captureException(e)
this.error({ statusCode: 404, message: 'Arcsi Shows Tiles endpoint not found' })
})
},
async refreshArcsiShowsForSchedule () {
await this.$axios.get(`${arcsiShowsBaseURL}/all_schedule`, config)
.then((res) => {
this.$store.commit('refreshAllShowsList', res.data)
this.$store.commit('refreshArcsiShowsForSchedule', res.data)
})
.catch((e) => {
this.$sentry.captureException(e)
this.error({ statusCode: 404, message: 'All shows endpoint not found' })
this.error({ statusCode: 404, message: 'Arcsi Shows Schedule endpoint not found' })
})
},
async refreshRareShows () {
Expand All @@ -85,7 +100,7 @@ export default {
})
.catch((e) => {
this.$sentry.captureException(e)
this.error({ statusCode: 404, message: 'Rare Shows not found' })
this.error({ statusCode: 404, message: 'CMS Rare Shows not found' })
})
},
async refreshCustomSchedule () {
Expand All @@ -95,7 +110,7 @@ export default {
})
.catch((e) => {
this.$sentry.captureException(e)
this.error({ statusCode: 404, message: 'Custom schedule not found' })
this.error({ statusCode: 404, message: 'CMS Custom schedule not found' })
})
}

Expand Down
Loading