1
0
mirror of https://github.com/devfake/flox.git synced 2024-11-08 19:32:29 +01:00

check for apple tv+

This commit is contained in:
devfake 2019-12-21 14:23:00 +01:00
parent 314e57df23
commit fcf629ffc3
3 changed files with 27 additions and 14 deletions

View File

@ -25,15 +25,18 @@
</span>
</div>
<div class="big-teaser-buttons no-select" :class="{'without-watchlist': item.rating != null || ! auth}">
<a v-if="isOnNetflix(item.homepage)" :href="item.homepage" target="_blank" class="button-netflix">
<a v-if="isOn('netflix', item.homepage)" :href="item.homepage" target="_blank" class="button-netflix">
Netflix
</a>
<a v-if="isOnAmazon(item.homepage)" :href="item.homepage" target="_blank" class="button-amazon">
Amazon
<a v-if="isOn('amazon', item.homepage)" :href="item.homepage" target="_blank" class="button-amazon">
Amazon Prime
</a>
<a v-if="isOnDisney(item.homepage)" :href="item.homepage" target="_blank" class="button-disney">
<a v-if="isOn('disney', item.homepage)" :href="item.homepage" target="_blank" class="button-disney">
Disney+
</a>
<a v-if="isOn('apple', item.homepage)" :href="item.homepage" target="_blank" class="button-apple">
Apple TV+
</a>
<span @click="openTrailer()" v-if="item.youtube_key" class="button-trailer"><i class="icon-trailer"></i> {{ lang('watch trailer') }}</span>
<!-- <span class="button-watchlist" v-if="item.rating == null && auth && ! rated" @click="addToWatchlist(item)"><i class="icon-watchlist"></i> {{ lang('add to watchlist') }}</span>-->
<!-- <span class="button-watchlist" v-if="item.watchlist && auth && ! rated" @click="removeItem()"><i class="icon-watchlist-remove"></i> {{ lang('remove from watchlist') }}</span>-->

View File

@ -16,16 +16,8 @@ export default {
}
},
isOnNetflix(homepage) {
return homepage && homepage.includes('netflix');
},
isOnAmazon(homepage) {
return homepage && homepage.includes('amazon');
},
isOnDisney(homepage) {
return homepage && homepage.includes('disney');
isOn(type, homepage) {
return homepage && homepage.includes(type);
},
genreAsString(genre) {

View File

@ -154,6 +154,24 @@
}
}
.button-apple {
background: #444444;
color: #fff;
i {
font-style: normal;
}
&:hover {
background: lighten(#444444, 10%);
}
&:active {
background: #444444;
}
}
.icon-trailer {
background: url(../../../public/assets/img/trailer.png);
width: 7px;