Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fix schedule #9791

Merged
merged 4 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion medusa/show/coming_episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def get_coming_episodes(categories, sort, group, paused=app.COMING_EPS_DISPLAY_P
result['qualityValue'] = result['quality']
result['quality'] = get_quality_string(result['quality'])
result['airs'] = sbdatetime.sbftime(result['localtime'], t_preset=timeFormat).lstrip('0').replace(' 0', ' ')
result['weekday'] = 1 + date.fromordinal(result['airdate']).weekday()
# Monday - Sunday (0 - 6)
result['weekday'] = date.fromordinal(result['airdate']).weekday()
result['tvdbid'] = result['indexer_id']
result['airdate'] = sbdatetime.sbfdate(result['localtime'], d_preset=dateFormat)
result['localtime'] = result['localtime'].toordinal()
Expand Down
2 changes: 1 addition & 1 deletion themes-default/slim/src/components/history-compact.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</template>
<img v-else-if="row.statusName ==='Failed'" src="images/no16.png"
width="16" height="16" style="vertical-align:middle;"
v-tooltip.right="`${row.provider.name} download failed: ${row.resource} (${row.actionDate})`"
v-tooltip.right="`${row.provider.name} download failed: ${row.resource} (${fuzzyParseDateTime(row.actionDate)})`"
>
</div>
</span>
Expand Down
2 changes: 1 addition & 1 deletion themes-default/slim/src/components/schedule/calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="day-column" v-for="day in groupedSchedule" :key="day.airdate">
<span class="day-header" :title="day.airdate ? `airs ${day.airdate}` : 'No shows for this day'">{{day.header}}</span>
<ul v-if="day.episodes.length > 0">
<li v-for="episode in day.episodes" :key="episode.episodeSlug" class="calendar-show">
<li v-for="episode in day.episodes" :key="`${episode.showSlug}${episode.episodeSlug}`" class="calendar-show">
<div class="poster">
<app-link :title="episode.showName" :href="`home/displayShow?showslug=${episode.showSlug}`">
<asset default-src="images/poster.png" :show-slug="episode.showSlug" type="posterThumb" :link="false" />
Expand Down
6 changes: 3 additions & 3 deletions themes-default/slim/src/store/modules/schedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ const getters = {
if (!weekDay) {
weekDay = {
airdate: episode.airdate,
header: days[episode.weekday - 1],
header: days[episode.weekday],
class: 'soon',
episodes: []
};
Expand All @@ -161,7 +161,7 @@ const getters = {
missed, today, soon, later
} = state;
const { displayPaused } = rootState.config.layout.comingEps;
const days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
const newArray = [];

if (sort === 'date') {
Expand Down Expand Up @@ -212,7 +212,7 @@ const getters = {

if (sort === 'network') {
const { getScheduleFlattened } = getters;
const filteredSchedule = getScheduleFlattened.filter(item => item.paused || displayPaused);
const filteredSchedule = getScheduleFlattened.filter(item => !item.paused || displayPaused);

for (const episode of filteredSchedule.sort((a, b) => a.network.localeCompare(b.network))) {
let network = newArray.find(item => item.header === episode.network);
Expand Down
Loading