-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change route schedule to vueRouter. * Added web_host to api. * Moved schedule.mako header to schedule.vue. * updated routes for schedule.vue. * Added web_host to general.js. * Add apiv2 route for schedule. (coming episodes) * Made a start with the list layout. * Add externals * Use https * Add attributes to schedule apiv2 route. * Add search.vue component for the forced and manual searched buttons. * Implement banner and list layouts. * Add poster layout * implemented calendar layout. * Fix calendar.vue episode schedule calculation * Add toggles for showing missed, today, soon, later. * Improved layout for the filter buttons. * Moved grouped and sorted functions to schedule.js * Use _ for unsused params. * Added styling for schedule.vue page. * Improved sorting per category (soon, later, etc) * Used this now for each layout. * Moved groupedSchedule to schedule.js * Rest of the refactor * Fix text color on filter buttons. * Improved styling vue-good-table columns filters. * Reduced the margings. * Applied same styling to home => table layouts. * Added the select-columns filter to history layouts. * Updated version vue-good-table * yarn lint & yarn lint-css * updated yarn.lock * Fix test * remove unused imports (lint)
- Loading branch information
Showing
41 changed files
with
2,838 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# coding=utf-8 | ||
"""Request handler for series and episodes.""" | ||
from __future__ import unicode_literals | ||
|
||
import logging | ||
|
||
from medusa.logger.adapters.style import BraceAdapter | ||
from medusa.server.api.v2.base import BaseRequestHandler | ||
from medusa.show.coming_episodes import ComingEpisodes | ||
|
||
log = BraceAdapter(logging.getLogger(__name__)) | ||
log.logger.addHandler(logging.NullHandler()) | ||
|
||
|
||
class ScheduleHandler(BaseRequestHandler): | ||
"""Coming episodes request handler.""" | ||
|
||
#: resource name | ||
name = 'schedule' | ||
#: identifier | ||
identifier = None | ||
#: allowed HTTP methods | ||
allowed_methods = ('GET',) | ||
|
||
def get(self): | ||
"""Query episode's history information.""" | ||
sort = self.get_argument('sort', default='desc') | ||
categories = self.get_arguments('category[]') or ['missed'] | ||
paused = self.get_argument('paused', default=False) | ||
|
||
grouped_coming_episodes = ComingEpisodes.get_coming_episodes(categories, sort, True, paused) | ||
data = {section: [] for section in grouped_coming_episodes} | ||
|
||
for section, coming_episodes in grouped_coming_episodes.items(): | ||
for coming_episode in coming_episodes: | ||
data[section].append({ | ||
'airdate': coming_episode['airdate'], | ||
'airs': coming_episode['airs'], | ||
'epName': coming_episode['name'], | ||
'epPlot': coming_episode['description'], | ||
'season': coming_episode['season'], | ||
'episode': coming_episode['episode'], | ||
'episodeSlug': 's{season:02d}e{episode:02d}'.format( | ||
season=coming_episode['season'], episode=coming_episode['episode'] | ||
), | ||
'indexerId': coming_episode['indexer_id'], | ||
'indexer': coming_episode['indexer'], | ||
'network': coming_episode['network'], | ||
'paused': coming_episode['paused'], | ||
'quality': coming_episode['qualityValue'], | ||
'showSlug': coming_episode['series_slug'], | ||
'showName': coming_episode['show_name'], | ||
'showStatus': coming_episode['status'], | ||
'tvdbid': coming_episode['tvdbid'], | ||
'weekday': coming_episode['weekday'], | ||
'runtime': coming_episode['runtime'], | ||
'externals': coming_episode['externals'] | ||
}) | ||
|
||
return self._ok(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.