diff --git a/ext/readme.md b/ext/readme.md index 72da760a4e..bc5cba778a 100644 --- a/ext/readme.md +++ b/ext/readme.md @@ -55,7 +55,7 @@ ext | `six` | [1.15.0](https://pypi.org/project/six/1.15.0/) | **`medusa`**, `ad ext | **`soupsieve`** | [1.9.6](https://pypi.org/project/soupsieve/1.9.6/) | `beautifulsoup4` | - ext | **`stevedore`** | [1.30.1](https://pypi.org/project/stevedore/1.30.1/) | `subliminal` | - ext | **`subliminal`** | [2.1.0](https://pypi.org/project/subliminal/2.1.0/) | **`medusa`** | - -ext | **`tmdbsimple`** | [2.2.11](https://pypi.org/project/tmdbsimple/2.2.11/) | **`medusa`** | - +ext | **`tmdbsimple`** | [2.7.0](https://pypi.org/project/tmdbsimple/2.7.0/) | **`medusa`** | - ext | **`tornado`** | [5.1.1](https://pypi.org/project/tornado/5.1.1/) | **`medusa`**, `tornroutes` | - ext | **`tornroutes`** | [0.5.1](https://pypi.org/project/tornroutes/0.5.1/) | **`medusa`** | - ext | `trans` | [2.1.0](https://pypi.org/project/trans/2.1.0/) | `imdbpie` | File: `trans.py` diff --git a/ext/tmdbsimple/__init__.py b/ext/tmdbsimple/__init__.py index 2099330faf..b7d8a53439 100644 --- a/ext/tmdbsimple/__init__.py +++ b/ext/tmdbsimple/__init__.py @@ -4,11 +4,11 @@ tmdbsimple ~~~~~~~~~~ -*tmdbsimple* is a wrapper, written in Python, for The Movie Database (TMDb) -API v3. By calling the functions available in *tmdbsimple* you can simplify -your code and easily access a vast amount of movie, tv, and cast data. To find -out more about The Movie Database API, check out the overview page -http://www.themoviedb.org/documentation/api and documentation page +*tmdbsimple* is a wrapper, written in Python, for The Movie Database (TMDb) +API v3. By calling the functions available in *tmdbsimple* you can simplify +your code and easily access a vast amount of movie, tv, and cast data. To find +out more about The Movie Database API, check out the overview page +http://www.themoviedb.org/documentation/api and documentation page https://developers.themoviedb.org/3/getting-started https://www.themoviedb.org/documentation/api/status-codes @@ -17,25 +17,39 @@ """ __title__ = 'tmdbsimple' -__version__ = '2.2.11' +__version__ = '2.7.0' __author__ = 'Celia Oakley' __copyright__ = 'Copyright (c) 2013-2020 Celia Oakley' __license__ = 'GPLv3' import os +import requests from .account import Account, Authentication, GuestSessions, Lists from .base import APIKeyError from .changes import Changes -from .configuration import Configuration, Certifications, Timezones +from .configuration import Configuration, Certifications from .discover import Discover -from .find import Find +from .find import Find, Trending from .genres import Genres from .movies import Movies, Collections, Companies, Keywords, Reviews -from .people import People, Credits, Jobs +from .people import People, Credits from .search import Search -from .tv import TV, TV_Seasons, TV_Episodes, TV_Changes, Networks - +from .tv import TV, TV_Seasons, TV_Episodes, TV_Episode_Groups, TV_Changes, Networks + +__all__ = ['Account', 'Authentication', 'GuestSessions', 'Lists', + 'APIKeyError', + 'Changes', + 'Configuration', 'Certifications', + 'Discover', + 'Find', 'Trending', + 'Genres', + 'Movies', 'Collections', 'Companies', 'Keywords', 'Reviews', + 'People', 'Credits' + 'Search', + 'TV', 'TV_Seasons', 'TV_Episodes', 'TV_Episode_Groups', 'TV_Changes', 'Networks' + ] API_KEY = os.environ.get('TMDB_API_KEY', None) API_VERSION = '3' +REQUESTS_SESSION = requests.Session() diff --git a/ext/tmdbsimple/account.py b/ext/tmdbsimple/account.py index e1ba13c1d4..b1da44a2d7 100644 --- a/ext/tmdbsimple/account.py +++ b/ext/tmdbsimple/account.py @@ -3,7 +3,7 @@ """ tmdbsimple.account ~~~~~~~~~~~~~~~~~~ -This module implements the Account, Authentication, and Lists functionality +This module implements the Account, Authentication, and Lists functionality of tmdbsimple. Created by Celia Oakley on 2013-10-31. @@ -25,7 +25,7 @@ class Account(TMDB): BASE_PATH = 'account' URLS = { 'info': '', - 'lists': '/{id}/lists', + 'lists': '/{id}/lists', 'favorite_movies': '/{id}/favorite/movies', 'favorite_tv': '/{id}/favorite/tv', 'favorite': '/{id}/favorite', @@ -43,9 +43,9 @@ def __init__(self, session_id): def info(self, **kwargs): """ - Get the basic information for an account. + Get your account details. - Call this method first, before calling other Account methods. + Args: Returns: A dict respresentation of the JSON returned from the API. @@ -57,14 +57,15 @@ def info(self, **kwargs): self.id = response['id'] self._set_attrs_to_values(response) return response - + def lists(self, **kwargs): """ - Get the lists that you have created and marked as a favorite. + Get all of the lists created by an account. Will include private lists + if you are the owner. Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -78,12 +79,12 @@ def lists(self, **kwargs): def favorite_movies(self, **kwargs): """ - Get the list of favorite movies for an account. + Get the list of your favorite movies. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -97,12 +98,12 @@ def favorite_movies(self, **kwargs): def favorite_tv(self, **kwargs): """ - Get the list of favorite TV series for an account. + Get the list of your favorite TV shows. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -116,7 +117,7 @@ def favorite_tv(self, **kwargs): def favorite(self, **kwargs): """ - Add or remove a movie to an accounts favorite list. + This method allows you to mark a movie or TV show as a favorite item. Args: media_type: 'movie' | 'tv' @@ -130,8 +131,8 @@ def favorite(self, **kwargs): kwargs.update({'session_id': self.session_id}) payload = { - 'media_type': kwargs.pop('media_type', None), - 'media_id': kwargs.pop('media_id', None), + 'media_type': kwargs.pop('media_type', None), + 'media_id': kwargs.pop('media_id', None), 'favorite': kwargs.pop('favorite', None), } @@ -141,12 +142,12 @@ def favorite(self, **kwargs): def rated_movies(self, **kwargs): """ - Get the list of rated movies (and associated rating) for an account. + Get a list of all the movies you have rated. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' - language: (optional) ISO 639-1 code. + language: (optional) ISO 639-1 value. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -160,12 +161,12 @@ def rated_movies(self, **kwargs): def rated_tv(self, **kwargs): """ - Get the list of rated TV shows (and associated rating) for an account. + Get a list of all the TV shows you have rated. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' - language: (optional) ISO 639-1 code. + language: (optional) ISO 639-1 value. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -182,9 +183,9 @@ def rated_tv_episodes(self, **kwargs): Get a list of all the TV episodes you have rated. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' - language: (optional) ISO 639-1 code. + language: (optional) ISO 639-1 value. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -198,12 +199,12 @@ def rated_tv_episodes(self, **kwargs): def watchlist_movies(self, **kwargs): """ - Get the list of movies on an account watchlist. + Get a list of all the movies you have added to your watchlist. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' - language: (optional) ISO 639-1 code. + language: (optional) ISO 639-1 value. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -217,12 +218,12 @@ def watchlist_movies(self, **kwargs): def watchlist_tv(self, **kwargs): """ - Get the list of TV series on an account watchlist. + Get a list of all the TV shows you have added to your watchlist. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' - language: (optional) ISO 639-1 code. + language: (optional) ISO 639-1 value. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -236,7 +237,7 @@ def watchlist_tv(self, **kwargs): def watchlist(self, **kwargs): """ - Add or remove a movie to an accounts watch list. + Add a movie or TV show to your watchlist. Args: media_type: 'movie' | 'tv' @@ -250,8 +251,8 @@ def watchlist(self, **kwargs): kwargs.update({'session_id': self.session_id}) payload = { - 'media_type': kwargs.pop('media_type', None), - 'media_id': kwargs.pop('media_id', None), + 'media_type': kwargs.pop('media_type', None), + 'media_id': kwargs.pop('media_id', None), 'watchlist': kwargs.pop('watchlist', None), } @@ -259,6 +260,7 @@ def watchlist(self, **kwargs): self._set_attrs_to_values(response) return response + class Authentication(TMDB): """ Authentication functionality. @@ -268,48 +270,53 @@ class Authentication(TMDB): """ BASE_PATH = 'authentication' URLS = { + 'guest_session_new': '/guest_session/new', 'token_new': '/token/new', + 'session_new': '/session/new', 'token_validate_with_login': '/token/validate_with_login', - 'session_new': '/session/new', - 'guest_session_new': '/guest_session/new', + 'session_delete': '/session', } - def token_new(self, **kwargs): + def guest_session_new(self, **kwargs): """ - Generate a valid request token for user based authentication. + This method will let you create a new guest session. Guest sessions + are a type of session that will let a user rate movies and TV shows + but not require them to have a TMDb user account. More + information about user authentication can be found here + (https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id). - A request token is required to ask the user for permission to - access their account. + Please note, you should only generate a single guest session per + user (or device) as you will be able to attach the ratings to a + TMDb user account in the future. There is also IP limits in place + so you should always make sure it's the end user doing the guest + session actions. - After obtaining the request_token, either: - (1) Direct your user to: - https://www.themoviedb.org/authenticate/REQUEST_TOKEN - or: - (2) Call token_validate_with_login() below. + If a guest session is not used for the first time within 24 hours, + it will be automatically deleted. + + Args: Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('token_new') + path = self._get_path('guest_session_new') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def token_validate_with_login(self, **kwargs): + def token_new(self, **kwargs): """ - Authenticate a user with a TMDb username and password. The user - must have a verified email address and be registered on TMDb. + Create a temporary request token that can be used to validate a TMDb + user login. More details about how this works can be found here + (https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id). Args: - request_token: The token you generated for the user to approve. - username: The user's username on TMDb. - password: The user's password on TMDb. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('token_validate_with_login') + path = self._get_path('token_new') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -317,9 +324,10 @@ def token_validate_with_login(self, **kwargs): def session_new(self, **kwargs): """ - Generate a session id for user based authentication. - - A session id is required in order to use any of the write methods. + You can use this method to create a fully valid session ID once a user + has validated the request token. More information about how this works + can be found here + (https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id). Args: request_token: The token you generated for the user to approve. @@ -335,19 +343,56 @@ def session_new(self, **kwargs): self._set_attrs_to_values(response) return response - def guest_session_new(self, **kwargs): + def token_validate_with_login(self, **kwargs): """ - Generate a guest session id. + This method allows an application to validate a request token by entering + a username and password. + + Not all applications have access to a web view so this can be used as a + substitute. + + Please note, the preferred method of validating a request token is to + have a user authenticate the request via the TMDb website. You can read + about that method here + (https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id). + + If you decide to use this method please use HTTPS. + + Args: + username: The user's username on TMDb. + password: The user's password on TMDb. + request_token: The token you generated for the user to approve. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('guest_session_new') + path = self._get_path('token_validate_with_login') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response + def session_delete(self, **kwargs): + """ + If you would like to delete (or "logout") from a session, call this + method with a valid session ID. + + Args: + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_path('session_delete') + + payload = { + 'session_id': kwargs.pop('session_id', None), + } + + response = self._DELETE(path, kwargs, payload) + self._set_attrs_to_values(response) + return response + + class GuestSessions(TMDB): """ Guest Sessions functionality. @@ -356,7 +401,9 @@ class GuestSessions(TMDB): """ BASE_PATH = 'guest_session' URLS = { - 'rated_movies': '/{guest_session_id}/rated_movies', + 'rated_movies': '/{guest_session_id}/rated/movies', + 'rated_tv': '/{guest_session_id}/rated/tv', + 'rated_tv_episodes': '/{guest_session_id}/rated/tv/episodes', } def __init__(self, guest_session_id=0): @@ -365,12 +412,11 @@ def __init__(self, guest_session_id=0): def rated_movies(self, **kwargs): """ - Get a list of rated moview for a specific guest session id. + Get the rated movies for a guest session. Args: - page: (optional) Minimum 1, maximum 1000. - sort_by: (optional) 'created_at.asc' | 'created_at.desc' language: (optional) ISO 639-1 code. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc Returns: A dict respresentation of the JSON returned from the API. @@ -380,7 +426,41 @@ def rated_movies(self, **kwargs): response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - + + def rated_tv(self, **kwargs): + """ + Get the rated TV shows for a guest session. + + Args: + language: (optional) ISO 639-1 code. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_guest_session_id_path('rated_tv') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + + def rated_tv_episodes(self, **kwargs): + """ + Get the rated TV episodes for a guest session. + + Args: + language: (optional) ISO 639-1 code. + sort_by: (optional) Allowed Values: created_at.asc, created_at.desc + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_guest_session_id_path('rated_tv_episodes') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + class Lists(TMDB): """ @@ -391,11 +471,12 @@ class Lists(TMDB): BASE_PATH = 'list' URLS = { 'info': '/{id}', - 'item_status': '/{id}/item_status', - 'create_list': '', + 'item_status': '/{id}/item_status', + 'list_create': '', 'add_item': '/{id}/add_item', 'remove_item': '/{id}/remove_item', - 'clear': '/{id}/clear', + 'list_clear': '/{id}/clear', + 'list_delete': '/{id}', } def __init__(self, id=0, session_id=0): @@ -405,7 +486,10 @@ def __init__(self, id=0, session_id=0): def info(self, **kwargs): """ - Get a list by id. + Get the details of a list. + + Args: + language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. @@ -418,10 +502,11 @@ def info(self, **kwargs): def item_status(self, **kwargs): """ - Check to see if a movie id is already added to a list. + You can use this method to check if a movie has already been added to + the list. Args: - movie_id: The id of the movie. + movie_id: The id of the movie. Minimum 1. Returns: A dict respresentation of the JSON returned from the API. @@ -432,11 +517,9 @@ def item_status(self, **kwargs): self._set_attrs_to_values(response) return response - def create_list(self, **kwargs): + def list_create(self, **kwargs): """ - Create a new list. - - A valid session id is required. + Create a list. Args: name: Name of the list. @@ -446,28 +529,26 @@ def create_list(self, **kwargs): Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('create_list') + path = self._get_path('list_create') kwargs.update({'session_id': self.session_id}) payload = { - 'name': kwargs.pop('name', None), + 'name': kwargs.pop('name', None), 'description': kwargs.pop('description', None), + 'language': kwargs.pop('language', None), } - if 'language' in kwargs: - payload['language'] = kwargs['language'] response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) + self.id = self.list_id return response def add_item(self, **kwargs): """ - Add new movies to a list that the user created. - - A valid session id is required. + Add a movie to a list. Args: - media_id: A movie id. + media_id: A movie id. Minimum 1. Returns: A dict respresentation of the JSON returned from the API. @@ -476,21 +557,19 @@ def add_item(self, **kwargs): kwargs.update({'session_id': self.session_id}) payload = { - 'media_id': kwargs.pop('media_id', None), + 'media_id': kwargs.pop('media_id', None), } response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) return response - + def remove_item(self, **kwargs): """ - Delete movies from a list that the user created. - - A valid session id is required. + Remove a movie from a list. Args: - media_id: A movie id. + media_id: A movie id. Minimum 1. Returns: A dict respresentation of the JSON returned from the API. @@ -499,19 +578,16 @@ def remove_item(self, **kwargs): kwargs.update({'session_id': self.session_id}) payload = { - 'media_id': kwargs.pop('media_id', None), + 'media_id': kwargs.pop('media_id', None), } response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) return response - def clear_list(self, **kwargs): + def list_clear(self, **kwargs): """ - Clears all of the items within a list. This is an irreversible action - and should be treated with caution. - - A valid session id is required. + Clear all of the items from a list. Args: confirm: True (do it) | False (don't do it) @@ -519,7 +595,7 @@ def clear_list(self, **kwargs): Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('clear') + path = self._get_id_path('list_clear') kwargs.update({'session_id': self.session_id}) payload = {} @@ -527,3 +603,20 @@ def clear_list(self, **kwargs): response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) return response + + def list_delete(self, **kwargs): + """ + Delete a list. + + Args: + None + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('list_delete') + kwargs.update({'session_id': self.session_id}) + + response = self._DELETE(path, kwargs) + self._set_attrs_to_values(response) + return response diff --git a/ext/tmdbsimple/base.py b/ext/tmdbsimple/base.py index 168c4259d8..61640d0ed4 100644 --- a/ext/tmdbsimple/base.py +++ b/ext/tmdbsimple/base.py @@ -12,7 +12,6 @@ """ import json -import requests class APIKeyError(Exception): @@ -27,9 +26,10 @@ class TMDB(object): URLS = {} def __init__(self): - from . import API_VERSION + from . import API_VERSION, REQUESTS_SESSION self.base_uri = 'https://api.themoviedb.org' self.base_uri += '/{version}'.format(version=API_VERSION) + self.session = REQUESTS_SESSION def _get_path(self, key): return self.BASE_PATH + self.URLS[key] @@ -40,17 +40,21 @@ def _get_id_path(self, key): def _get_guest_session_id_path(self, key): return self._get_path(key).format( guest_session_id=self.guest_session_id) - + def _get_credit_id_path(self, key): return self._get_path(key).format(credit_id=self.credit_id) + def _get_media_type_time_window_path(self, key): + return self._get_path(key).format( + media_type=self.media_type, time_window=self.time_window) + def _get_tv_id_season_number_path(self, key): - return self._get_path(key).format(tv_id=self.tv_id, - season_number=self.season_number) + return self._get_path(key).format( + tv_id=self.tv_id, season_number=self.season_number) def _get_tv_id_season_number_episode_number_path(self, key): - return self._get_path(key).format(tv_id=self.tv_id, - season_number=self.season_number, + return self._get_path(key).format( + tv_id=self.tv_id, season_number=self.season_number, episode_number=self.episode_number) def _get_complete_url(self, path): @@ -76,8 +80,8 @@ def _request(self, method, path, params=None, payload=None): url = self._get_complete_url(path) params = self._get_params(params) - response = requests.request( - method, url, params=params, + response = self.session.request( + method, url, params=params, data=json.dumps(payload) if payload else payload, headers=self.headers) @@ -108,4 +112,3 @@ def _set_attrs_to_values(self, response={}): for key in response.keys(): if not hasattr(self, key) or not callable(getattr(self, key)): setattr(self, key, response[key]) - diff --git a/ext/tmdbsimple/changes.py b/ext/tmdbsimple/changes.py index bbcf5736f3..674ef83b26 100644 --- a/ext/tmdbsimple/changes.py +++ b/ext/tmdbsimple/changes.py @@ -13,6 +13,7 @@ from .base import TMDB + class Changes(TMDB): """ Changes functionality. @@ -22,18 +23,23 @@ class Changes(TMDB): BASE_PATH = '' URLS = { 'movie': 'movie/changes', - 'person': 'person/changes', 'tv': 'tv/changes', + 'person': 'person/changes', } def movie(self, **kwargs): """ - Get a list of movie ids that have been edited. + Get a list of all of the movie ids that have been changed + in the past 24 hours. + + You can query it for up to 14 days worth of changed IDs at + a time with the start_date and end_date query parameters. + 100 items are returned per page. Args: - page: (optional) Minimum 1, maximum 1000. start_date: (optional) Expected format is 'YYYY-MM-DD'. end_date: (optional) Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -44,37 +50,47 @@ def movie(self, **kwargs): self._set_attrs_to_values(response) return response - def person(self, **kwargs): + def tv(self, **kwargs): """ - Get a list of people ids that have been edited. + Get a list of all of the TV show ids that have been changed + in the past 24 hours. + + You can query it for up to 14 days worth of changed IDs at + a time with the start_date and end_date query parameters. + 100 items are returned per page. Args: - page: (optional) Minimum 1, maximum 1000. start_date: (optional) Expected format is 'YYYY-MM-DD'. end_date: (optional) Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('person') + path = self._get_path('tv') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def tv(self, **kwargs): + def person(self, **kwargs): """ - Get a list of TV show ids that have been edited. + Get a list of all of the person ids that have been changed + in the past 24 hours. + + You can query it for up to 14 days worth of changed IDs at + a time with the start_date and end_date query parameters. + 100 items are returned per page. Args: - page: (optional) Minimum 1, maximum 1000. start_date: (optional) Expected format is 'YYYY-MM-DD'. end_date: (optional) Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('tv') + path = self._get_path('person') response = self._GET(path, kwargs) self._set_attrs_to_values(response) diff --git a/ext/tmdbsimple/configuration.py b/ext/tmdbsimple/configuration.py index f58f4d0755..681bd52b29 100644 --- a/ext/tmdbsimple/configuration.py +++ b/ext/tmdbsimple/configuration.py @@ -4,8 +4,8 @@ tmdbsimple.configuration ~~~~~~~~~~~~~~~~~~~~~~~~ -This module implements the Configuration, Certifications, and Timezones -functionality of tmdbsimple. +This module implements the Configuration and Certifications functionality of +tmdbsimple. Created by Celia Oakley on 2013-10-31. @@ -34,7 +34,27 @@ class Configuration(TMDB): def info(self, **kwargs): """ - Get the system wide configuration info. + Get the system wide configuration information. Some elements of the API + require some knowledge of this configuration data. The purpose of this + is to try and keep the actual API responses as light as possible. It is + recommended you cache this data within your application and check for + updates every few days. + + This method currently holds the data relevant to building image URLs as + well as the change key map. + + To build an image URL, you will need 3 pieces of data. The base_url, + size and file_path. Simply combine them all and you will have a fully + qualified URL. Here’s an example URL: + + https://image.tmdb.org/t/p/w500/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg + + The configuration method also contains the list of change keys which + can be useful if you are building an app that consumes data from the + change feed. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -49,6 +69,9 @@ def countries(self, **kwargs): """ Get the list of countries (ISO 3166-1 tags) used throughout TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -62,6 +85,9 @@ def jobs(self, **kwargs): """ Get a list of the jobs and departments we use on TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -75,6 +101,9 @@ def languages(self, **kwargs): """ Get the list of languages (ISO 639-1 tags) used throughout TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -88,6 +117,9 @@ def primary_translations(self, **kwargs): """ Get a list of the officially supported translations on TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -101,6 +133,9 @@ def timezones(self, **kwargs): """ Get the list of timezones used throughout TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -123,24 +158,13 @@ class Certifications(TMDB): 'tv_list': '/tv/list', } - # here for backward compatability, when only /movie/list existed - def list(self, **kwargs): - """ - Get the list of supported certifications for movies. - - Returns: - A dict respresentation of the JSON returned from the API. - """ - path = self._get_path('movie_list') - - response = self._GET(path, kwargs) - self._set_attrs_to_values(response) - return response - def movie_list(self, **kwargs): """ Get an up to date list of the officially supported movie certifications on TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -154,6 +178,9 @@ def tv_list(self, **kwargs): """ Get an up to date list of the officially supported TV show certifications on TMDb. + Args: + None + Returns: A dict respresentation of the JSON returned from the API. """ @@ -163,29 +190,19 @@ def tv_list(self, **kwargs): self._set_attrs_to_values(response) return response - -class Timezones(TMDB): - """ - Timezones functionality. - - See: https://developers.themoviedb.org/3/timezones - """ - BASE_PATH = 'timezones' - URLS = { - 'list': '/list', - } - + # backward compatability, when only /movie/list existed def list(self, **kwargs): """ - Get the list of supported timezones for the API methods that support - them. + Get the list of supported certifications for movies. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('list') + path = self._get_path('movie_list') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - diff --git a/ext/tmdbsimple/discover.py b/ext/tmdbsimple/discover.py index 7e8a41ba5f..352aa91e93 100644 --- a/ext/tmdbsimple/discover.py +++ b/ext/tmdbsimple/discover.py @@ -13,6 +13,7 @@ from .base import TMDB + class Discover(TMDB): """ Discover functionality. @@ -27,64 +28,126 @@ class Discover(TMDB): def movie(self, **kwargs): """ - Discover movies by different types of data like average rating, - number of votes, genres and certifications. + Discover movies by different types of data like average rating, number + of votes, genres and certifications. You can get a valid list of + certifications from the certifications list method. + + Discover also supports a nice list of sort options. See below for all + of the available options. + + Please note, when using certification / certification.lte you must also + specify certification_country. These two parameters work together in + order to filter the results. You can only filter results with the + countries we have added to our certifications list. + + If you specify the region parameter, the regional release date will be + used instead of the primary release date. The date returned will be the + first date based on your query (ie. if a with_release_type is + specified). It's important to note the order of the release types that + are used. Specifying "2|3" would return the limited theatrical release + date as opposed to "3|2" which would return the theatrical date. + + Also note that a number of filters support being comma (,) or pipe (|) + separated. Comma's are treated like an AND and query while pipe's are + an OR. + + Some examples of what can be done with discover can be found at + https://www.themoviedb.org/documentation/api/discover. Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. - sort_by: (optional) Available options are 'vote_average.desc', - 'vote_average.asc', 'release_date.desc', 'release_date.asc' - 'popularity.desc', 'popularity.asc'. - include_adult: (optional) Toggle the inclusion of adult titles. - Expected value is a boolean, True or False. - year: (optional) Filter the results release dates to matches that - include this value. Expected value is a year. - primary_release_year: (optional) Filter the results so that - only the primary release date year has - this value. Expected value is a year. - vote_count.gte or vote_count_gte: (optional) Only include movies - that are equal to, or have a vote count higher - than this value. Expected value is an integer. - vote_average.gte or vote_average_gte: (optional) Only include - movies that are equal to, or have a higher - average rating than this value. Expected value - is a float. - with_genres: (optional) Only include movies with the specified - genres. Expected value is an integer (the id of - a genre). Multiple values can be specified. - Comma separated indicates an 'AND' query, while - a pipe (|) separated value indicates an 'OR'. - release_date.gte or release_date_gte: (optional) The minimum - release to include. Expected format is - 'YYYY-MM-DD'. - releaste_date.lte or release_date_lte: (optional) The maximum - release to include. Expected format is - 'YYYY-MM-DD'. - certification_country: (optional) Only include movies with - certifications for a specific country. When - this value is specified, 'certification.lte' - is required. An ISO 3166-1 is expected. - certification.lte or certification_lte: (optional) Only include - movies with this certification and lower. - Expected value is a valid certification for - the specified 'certification_country'. - with_companies: (optional) Filter movies to include a specific - company. Expected value is an integer (the id - of a company). They can be comma separated - to indicate an 'AND' query. - + region: (optional) Specify a ISO 3166-1 code. + sort_by: (optional) Allowed values: popularity.asc, + popularity.desc, release_date.asc, release_date.desc, + revenue.asc, revenue.desc, primary_release_date.asc, + primary_release_date.desc, original_title.asc, + original_title.desc, vote_average.asc, vote_average.desc, + vote_count.asc, vote_count.desc + Default: popularity.desc + certification_country: (optional) Used in conjunction with the + certification filter, use this to specify a country with a + valid certification. + certification: Filter results with a valid certification from the + 'certification_country' field. + certification.gte: Filter and only include movies that have a + certification that is greater than or equal to the specified + value. + certification.lte: Filter and only include movies that have a + certification that is less than or equal to the specified + value. + include_adult: (optional) A filter and include or exclude adult + movies. + include_video: (optional) A filter to include or exclude videos. + page: (optional) Minimum 1, maximum 1000, default 1. + primary_release_year: (optional) A filter to limit the results to a + specific primary release year. + primary_release_date.gte: (optional) Filter and only include movies + that have a primary release date that is greater or equal to + the specified value. + primary_release_date.lte: (optional) Filter and only include movies + that have a primary release date that is less than or equal to + the specified value. + release_date.gte: (optional) Filter and only include movies that + have a primary release date that is greater or equal to the + specified value. + releaste_date.lte: (optional) Filter and only include movies that + have a primary release date that is less than or equal to the + specified value. + with_release_type: (optional) Specify a comma (AND) or pipe (OR) + separated value to filter release types by. These release types + map to the same values found on the movie release date method. + Minimum 1, maximum 6. + year: (optional) A filter to limit the results to a specific year + (looking at all release dates). + vote_count.gte: (optional) Filter and only include movies that have + a vote count that is greater or equal to the specified value. + Minimum 0. + vote_count.lte: (optional) Filter and only include movies that have + a vote count that is less than or equal to the specified value. + Minimum 1. + vote_average.gte: (optional) Filter and only include movies that + have a rating that is greater or equal to the specified value. + Minimum 0. + vote_average.lte: (optional) Filter and only include movies that + have a rating that is less than or equal to the specified value. + Minimum 0. + with_cast: (optional) A comma separated list of person ID's. Only + include movies that have one of the ID's added as an actor. + with_crew: (optional) A comma separated list of person ID's. Only + include movies that have one of the ID's added as a crew member. + with_people: (optional) A comma separated list of person ID's. Only + include movies that have one of the ID's added as a either a + actor or a crew member. + with_companies: (optional) A comma separated list of production + company ID's. Only include movies that have one of the ID's + added as a production company. + with_genres: (optional) Comma separated value of genre ids that you + want to include in the results. + without_genres: (optional) Comma separated value of genre ids that + you want to exclude from the results. + with_keywords: (optional) A comma separated list of keyword ID's. + Only includes movies that have one of the ID's added as a + keyword. + without_keywords: (optional) Exclude items with certain keywords. + You can comma and pipe seperate these values to create an 'AND' or 'OR' logic. + with_runtime.gte: (optional) Filter and only include movies that + have a runtime that is greater or equal to a value. + with_runtime.lte: (optional) Filter and only include movies that + have a runtime that is less than or equal to a value. + with_original_language: (optional) Specify an ISO 639-1 string to + filter results by their original language value. + Returns: A dict respresentation of the JSON returned from the API. """ - # Periods are not allowed in keyword arguments but several API + # Periods are not allowed in keyword arguments but several API # arguments contain periods. See both usages in tests/test_discover.py. - for param in kwargs: + for param in dict(kwargs): if '_lte' in param: kwargs[param.replace('_lte', '.lte')] = kwargs.pop(param) if '_gte' in param: kwargs[param.replace('_gte', '.gte')] = kwargs.pop(param) - + path = self._get_path('movie') response = self._GET(path, kwargs) @@ -93,53 +156,97 @@ def movie(self, **kwargs): def tv(self, **kwargs): """ - Discover TV shows by different types of data like average rating, + Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. + Discover also supports a nice list of sort options. See below for all + of the available options. + + Also note that a number of filters support being comma (,) or pipe (|) + separated. Comma's are treated like an AND and query while pipe's are + an OR. + + Some examples of what can be done with discover can be found at + https://www.themoviedb.org/documentation/api/discover. + Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. - sort_by: (optional) Available options are 'vote_average.desc', - 'vote_average.asc', 'first_air_date.desc', + sort_by: (optional) Available options are 'vote_average.desc', + 'vote_average.asc', 'first_air_date.desc', 'first_air_date.asc', 'popularity.desc', 'popularity.asc' - first_air_year: (optional) Filter the results release dates to - matches that include this value. Expected value - is a year. - vote_count.gte or vote_count_gte: (optional) Only include TV shows - that are equal to, - or have vote count higher than this value. Expected - value is an integer. - vote_average.gte or vote_average_gte: (optional) Only include TV - shows that are equal - to, or have a higher average rating than this - value. Expected value is a float. - with_genres: (optional) Only include TV shows with the specified - genres. Expected value is an integer (the id of a - genre). Multiple valued can be specified. Comma - separated indicates an 'AND' query, while a - pipe (|) separated value indicates an 'OR'. - with_networks: (optional) Filter TV shows to include a specific - network. Expected value is an integer (the id of a - network). They can be comma separated to indicate an - 'AND' query. - first_air_date.gte or first_air_date_gte: (optional) The minimum - release to include. - Expected format is 'YYYY-MM-DD'. - first_air_date.lte or first_air_date_lte: (optional) The maximum - release to include. - Expected format is 'YYYY-MM-DD'. - + sort_by: (optional) Allowed values: vote_average.desc, + vote_average.asc, first_air_date.desc, first_air_date.asc, + popularity.desc, popularity.asc + Default: popularity.desc + air_date.gte: (optional) Filter and only include TV shows that have + a air date (by looking at all episodes) that is greater or + equal to the specified value. + air_date.lte: (optional) Filter and only include TV shows that have + a air date (by looking at all episodes) that is less than or + equal to the specified value. + first_air_date.gte: (optional) Filter and only include TV shows + that have a original air date that is greater or equal to the + specified value. Can be used in conjunction with the + "include_null_first_air_dates" filter if you want to include + items with no air date. + first_air_date.lte: (optional) Filter and only include TV shows + that have a original air date that is less than or equal to the + specified value. Can be used in conjunction with the + "include_null_first_air_dates" filter if you want to include + items with no air date. + first_air_date_year: (optional) Filter and only include TV shows + that have a original air date year that equal to the specified + value. Can be used in conjunction with the + "include_null_first_air_dates" filter if you want to include + items with no air date. + page: (optional) Specify the page of results to query. Default 1. + timezone: (optional) Used in conjunction with the air_date.gte/lte + filter to calculate the proper UTC offset. Default + America/New_York. + vote_average.gte: (optional) Filter and only include movies that + have a rating that is greater or equal to the specified value. + Minimum 0. + vote_count.gte: (optional) Filter and only include movies that have + a rating that is less than or equal to the specified value. + Minimum 0. + with_genres: (optional) Comma separated value of genre ids that you + want to include in the results. + with_networks: (optional) Comma separated value of network ids that + you want to include in the results. + without_genres: (optional) Comma separated value of genre ids that + you want to exclude from the results. + with_runtime.gte: (optional) Filter and only include TV shows with + an episode runtime that is greater than or equal to a value. + with_runtime.lte: (optional) Filter and only include TV shows with + an episode runtime that is less than or equal to a value. + include_null_first_air_dates: (optional) Use this filter to include + TV shows that don't have an air date while using any of the + "first_air_date" filters. + with_original_language: (optional) Specify an ISO 639-1 string to + filter results by their original language value. + without_keywords: (optional) Exclude items with certain keywords. + You can comma and pipe seperate these values to create an 'AND' + or 'OR' logic. + screened_theatrically: (optional) Filter results to include items + that have been screened theatrically. + with_companies: (optional) A comma separated list of production + company ID's. Only include movies that have one of the ID's + added as a production company. + with_keywords: (optional) A comma separated list of keyword ID's. + Only includes TV shows that have one of the ID's added as a + keyword. + Returns: A dict respresentation of the JSON returned from the API. """ - # Periods are not allowed in keyword arguments but several API + # Periods are not allowed in keyword arguments but several API # arguments contain periods. See both usages in tests/test_discover.py. - for param in kwargs: + for param in dict(kwargs): if '_lte' in param: kwargs[param.replace('_lte', '.lte')] = kwargs.pop(param) if '_gte' in param: kwargs[param.replace('_gte', '.gte')] = kwargs.pop(param) - + path = self._get_path('tv') response = self._GET(path, kwargs) diff --git a/ext/tmdbsimple/find.py b/ext/tmdbsimple/find.py index dd8e799076..a7ea64e07f 100644 --- a/ext/tmdbsimple/find.py +++ b/ext/tmdbsimple/find.py @@ -13,6 +13,7 @@ from .base import TMDB + class Find(TMDB): """ Find functionality. @@ -23,24 +24,29 @@ class Find(TMDB): URLS = { 'info': '/{id}', } + def __init__(self, id=0): super(Find, self).__init__() self.id = id def info(self, **kwargs): """ - Search for objects in the database by an external id. For instance, - an IMDB ID. This will search all objects (movies, TV shows and people) - and return the results in a single response. TV season and TV episode - searches will be supported shortly. + The find method makes it easy to search for objects in our database by + an external id. For example, an IMDB ID. - The supported external sources for each object are as follows: - Movies: imdb_id - People: imdb_id, freebase_mid, freebase_id, tvrage_id - TV Series: imdb_id, freebase_mid, freebase_id, tvdb_id, tvrage_id + This method will search all objects (movies, TV shows and people) and + return the results in a single response. + + The supported external sources for each object are as follows. + Media Databases: IMDb ID, TVDB ID, Freebase MID*, Freebase ID*, + TVRage ID* + Social IDs: Facebook, Insagram, Twitter Args: - external_source: See lists above. + language: (optional) ISO 639-1 code. + external_source: Allowed Values: imdb_id, freebase_mid, + freebase_id, tvdb_id, tvrage_id, facebook_id, twitter_id, + instagram_id Returns: A dict respresentation of the JSON returned from the API. @@ -50,3 +56,50 @@ def info(self, **kwargs): response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response + + +class Trending(TMDB): + """ + Trending functionality. + + See: https://developers.themoviedb.org/3/trending + """ + BASE_PATH = 'trending' + URLS = { + 'info': '/{media_type}/{time_window}', + } + + def __init__(self, media_type='all', time_window='day'): + super(Trending, self).__init__() + self.media_type = media_type + self.time_window = time_window + + def info(self, **kwargs): + """ + Get the daily or weekly trending items. The daily trending list tracks + items over the period of a day while items have a 24 hour half life. + The weekly list tracks items over a 7 day period, with a 7 day half + life. + + Valid Media Types + 'all': Include all movies, TV shows and people in the results as a + global trending list. + 'movie': Show the trending movies in the results. + 'tv': Show the trending TV shows in the results. + 'people': Show the trending people in the results. + + Valid Time Windows + 'day': View the trending list for the day. + 'week': View the trending list for the week. + + Args: + None + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_media_type_time_window_path('info') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response diff --git a/ext/tmdbsimple/genres.py b/ext/tmdbsimple/genres.py index f98f62ffcc..0199c3cbad 100644 --- a/ext/tmdbsimple/genres.py +++ b/ext/tmdbsimple/genres.py @@ -24,7 +24,7 @@ class Genres(TMDB): URLS = { 'movie_list': '/movie/list', 'tv_list': '/tv/list', - 'movies': '/{id}/movies', + 'movies': '/{id}/movies', # backward compatability } def __init__(self, id=0): @@ -33,7 +33,7 @@ def __init__(self, id=0): def movie_list(self, **kwargs): """ - Get the list of Movie genres. + Get the list of official genres for movies. Args: language: (optional) ISO 639-1 code. @@ -49,7 +49,7 @@ def movie_list(self, **kwargs): def tv_list(self, **kwargs): """ - Get the list of TV genres. + Get the list of official genres for TV shows. Args: language: (optional) ISO 639-1 code. @@ -63,6 +63,7 @@ def tv_list(self, **kwargs): self._set_attrs_to_values(response) return response + # backward compatability def movies(self, **kwargs): """ Get the list of movies for a particular genre by id. By default, only @@ -71,8 +72,8 @@ def movies(self, **kwargs): Args: page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639-1 code. - include_all_movies: (optional) Toggle the inclusion of all movies - and not just those with 10 or more ratings. + include_all_movies: (optional) Toggle the inclusion of all movies + and not just those with 10 or more ratings. Expected value is: True or False. include_adult: (optional) Toggle the inclusion of adult titles. Expected value is: True or False. diff --git a/ext/tmdbsimple/movies.py b/ext/tmdbsimple/movies.py index c4e06b3865..40a6a266d3 100644 --- a/ext/tmdbsimple/movies.py +++ b/ext/tmdbsimple/movies.py @@ -14,6 +14,7 @@ from .base import TMDB + class Movies(TMDB): """ Movies functionality. @@ -23,27 +24,28 @@ class Movies(TMDB): BASE_PATH = 'movie' URLS = { 'info': '/{id}', + 'account_states': '/{id}/account_states', 'alternative_titles': '/{id}/alternative_titles', + 'changes': '/{id}/changes', 'credits': '/{id}/credits', 'external_ids': '/{id}/external_ids', 'images': '/{id}/images', 'keywords': '/{id}/keywords', 'release_dates': '/{id}/release_dates', - 'releases': '/{id}/releases', 'videos': '/{id}/videos', 'translations': '/{id}/translations', + 'recommendations': '/{id}/recommendations', 'similar_movies': '/{id}/similar_movies', 'reviews': '/{id}/reviews', 'lists': '/{id}/lists', - 'changes': '/{id}/changes', + 'rating': '/{id}/rating', + 'rating_delete': '/{id}/rating', 'latest': '/latest', - 'upcoming': '/upcoming', 'now_playing': '/now_playing', 'popular': '/popular', 'top_rated': '/top_rated', - 'account_states': '/{id}/account_states', - 'rating': '/{id}/rating', - 'recommendations': '/{id}/recommendations' + 'upcoming': '/upcoming', + 'releases': '/{id}/releases', # backward compatability } def __init__(self, id=0): @@ -52,11 +54,15 @@ def __init__(self, id=0): def info(self, **kwargs): """ - Get the basic movie information for a specific movie id. + Get the primary information about a movie. + + Supports append_to_response. Read more about this at + https://developers.themoviedb.org/3/getting-started/append-to-response. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + append_to_response: (optional) Append requests within the same + namespace to the response. Returns: A dict representation of the JSON returned from the API. @@ -67,13 +73,32 @@ def info(self, **kwargs): self._set_attrs_to_values(response) return response + def account_states(self, **kwargs): + """ + Grab the following account states for a session: + - Movie rating + - If it belongs to your watchlist + - If it belongs to your favourite list + + Args: + session_id: (required) See Authentication. + guest_session_id: (optional) See Authentication. + + Returns: + A dict representation of the JSON returned from the API. + """ + path = self._get_id_path('account_states') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def alternative_titles(self, **kwargs): """ - Get the alternative titles for a specific movie id. + Get all of the alternative titles for a movie. Args: country: (optional) ISO 3166-1 code. - append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. @@ -84,12 +109,35 @@ def alternative_titles(self, **kwargs): self._set_attrs_to_values(response) return response + def changes(self, **kwargs): + """ + Get the changes for a movie. By default only the last 24 hours are returned. + + You can query up to 14 days in a single query by using the start_date + and end_date query parameters. + + Args: + start_date: (optional) Filter the results with a start date. + Expected format is 'YYYY-MM-DD'. + end_date: (optional) Filter the results with a end date. + Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. + + Returns: + A dict representation of the JSON returned from the API. + """ + path = self._get_id_path('changes') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def credits(self, **kwargs): """ - Get the cast and crew information for a specific movie id. + Get the cast and crew for a movie. Args: - append_to_response: (optional) Comma separated, any movie method. + None Returns: A dict representation of the JSON returned from the API. @@ -102,11 +150,14 @@ def credits(self, **kwargs): def external_ids(self, **kwargs): """ - Get the external ids for a specific movie id. + Get the external ids for a movie. We currently support the following + external sources. + + Media Databases - IMDb + Social IDs - Facebok, Instagram, Twitter Args: - language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + None Returns: A dict representation of the JSON returned from the API. @@ -119,11 +170,16 @@ def external_ids(self, **kwargs): def images(self, **kwargs): """ - Get the images (posters and backdrops) for a specific movie id. + Get the images that belong to a movie. + + Querying images with a language parameter will filter the results. If + you want to include a fallback language (especially useful for + backdrops) you can use the include_image_language parameter. This + should be a comma seperated value like so: + include_image_language=en,null. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. include_image_language: (optional) Comma separated, a valid ISO 69-1. @@ -138,7 +194,10 @@ def images(self, **kwargs): def keywords(self): """ - Get the plot keywords for a specific movie id. + Get the keywords that have been added to a movie. + + Args: + None Returns: A dict representation of the JSON returned from the API. @@ -149,29 +208,21 @@ def keywords(self): self._set_attrs_to_values(response) return response - def recommendations(self, **kwargs): - """ - Get a list of recommended movies for a movie. - - Args: - language: (optional) ISO 639-1 code. - page: (optional) Minimum value of 1. Expected value is an integer. - - Returns: - A dict representation of the JSON returned from the API. + def release_dates(self, **kwargs): """ - path = self._get_id_path('recommendations') + Get the release date along with the certification for a movie. - response = self._GET(path, kwargs) - self._set_attrs_to_values(response) - return response + Release dates support different types: - def release_dates(self, **kwargs): - """ - Get the release dates and certification for a specific movie id. + 1. Premiere + 2. Theatrical (limited) + 3. Theatrical + 4. Digital + 5. Physical + 6. TV Args: - append_to_response: (optional) Comma separated, any movie method. + None Returns: A dict representation of the JSON returned from the API. @@ -182,51 +233,50 @@ def release_dates(self, **kwargs): self._set_attrs_to_values(response) return response - def releases(self, **kwargs): + def videos(self, **kwargs): """ - Get the release date and certification information by country for a - specific movie id. + Get the videos that have been added to a movie. Args: - append_to_response: (optional) Comma separated, any movie method. + language: (optional) ISO 639-1 code. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('releases') + path = self._get_id_path('videos') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def videos(self, **kwargs): + def translations(self, **kwargs): """ - Get the videos (trailers, teasers, clips, etc...) for a - specific movie id. + Get a list of translations that have been created for a movie. Args: - append_to_response: (optional) Comma separated, any movie method. + None Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('videos') + path = self._get_id_path('translations') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def translations(self, **kwargs): + def recommendations(self, **kwargs): """ - Get the translations for a specific movie id. + Get a list of recommended movies for a movie. Args: - append_to_response: (optional) Comma separated, any movie method. + language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('translations') + path = self._get_id_path('recommendations') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -234,12 +284,14 @@ def translations(self, **kwargs): def similar_movies(self, **kwargs): """ - Get the similar movies for a specific movie id. + Get a list of similar movies. This is not the same as the + "Recommendation" system you see on the website. + + These items are assembled by looking at keywords and genres. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict representation of the JSON returned from the API. @@ -252,12 +304,11 @@ def similar_movies(self, **kwargs): def reviews(self, **kwargs): """ - Get the reviews for a particular movie id. + Get the user reviews for a movie. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict representation of the JSON returned from the API. @@ -270,12 +321,11 @@ def reviews(self, **kwargs): def lists(self, **kwargs): """ - Get the lists that the movie belongs to. + Get a list of lists that this movie belongs to. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict representation of the JSON returned from the API. @@ -286,54 +336,70 @@ def lists(self, **kwargs): self._set_attrs_to_values(response) return response - def changes(self, **kwargs): + def rating(self, **kwargs): """ - Get the changes for a specific movie id. + Rate a movie. - Changes are grouped by key, and ordered by date in descending order. - By default, only the last 24 hours of changes are returned. The - maximum number of days that can be returned in a single request is 14. - The language is present on fields that are translatable. + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. Args: - start_date: (optional) Expected format is 'YYYY-MM-DD'. - end_date: (optional) Expected format is 'YYYY-MM-DD'. + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. + value: (required) This is the value of the rating you want to + submit. The value is expected to be between 0.5 and 10.0. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('changes') + path = self._get_id_path('rating') - response = self._GET(path, kwargs) + payload = { + 'value': kwargs.pop('value', None), + } + + response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) return response - def latest(self, **kwargs): + def rating_delete(self, **kwargs): """ - Get the latest movie id. + Remove your rating for a movie. + + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. + + Args: + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_path('latest') + path = self._get_id_path('rating_delete') - response = self._GET(path, kwargs) + payload = { + 'value': kwargs.pop('value', None), + } + + response = self._DELETE(path, kwargs, payload) self._set_attrs_to_values(response) return response - def upcoming(self, **kwargs): + def latest(self, **kwargs): """ - Get the list of upcoming movies. This list refreshes every day. - The maximum number of items this list will include is 100. + Get the most newly created movie. This is a live response and will + continuously change. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_path('upcoming') + path = self._get_path('latest') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -341,12 +407,19 @@ def upcoming(self, **kwargs): def now_playing(self, **kwargs): """ - Get the list of movies playing in theatres. This list refreshes - every day. The maximum number of items this list will include is 100. + Get a list of movies in theatres. This is a release type query that + looks for all movies that have a release type of 2 or 3 within the + specified date range. + + You can optionally specify a region prameter which will narrow the + search to only look for theatrical release dates within the specified + country. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict representation of the JSON returned from the API. @@ -359,12 +432,14 @@ def now_playing(self, **kwargs): def popular(self, **kwargs): """ - Get the list of popular movies on The Movie Database. This list - refreshes every day. + Get a list of the current popular movies on TMDb. This list updates + daily. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict representation of the JSON returned from the API. @@ -377,13 +452,13 @@ def popular(self, **kwargs): def top_rated(self, **kwargs): """ - Get the list of top rated movies. By default, this list will only - include movies that have 10 or more votes. This list refreshes every - day. + Get the top rated movies on TMDb. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict representation of the JSON returned from the API. @@ -394,44 +469,46 @@ def top_rated(self, **kwargs): self._set_attrs_to_values(response) return response - def account_states(self, **kwargs): + def upcoming(self, **kwargs): """ - This method lets users get the status of whether or not the movie has - been rated or added to their favourite or watch lists. A valid session - id is required. + Get a list of upcoming movies in theatres. This is a release type query + that looks for all movies that have a release type of 2 or 3 within the + specified date range. + + You can optionally specify a region prameter which will narrow the + search to only look for theatrical release dates within the specified + country. Args: - session_id: see Authentication. + language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('account_states') + path = self._get_path('upcoming') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def rating(self, **kwargs): + # backward compatability + def releases(self, **kwargs): """ - This method lets users rate a movie. A valid session id or guest - session id is required. + Get the release date and certification information by country for a + specific movie id. Args: - session_id: see Authentication. - guest_session_id: see Authentication. - value: Rating value. + None Returns: A dict representation of the JSON returned from the API. """ - path = self._get_id_path('rating') - - payload = { - 'value': kwargs.pop('value', None), - } + path = self._get_id_path('releases') - response = self._POST(path, kwargs, payload) + response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response @@ -455,16 +532,10 @@ def __init__(self, id): def info(self, **kwargs): """ - Get the basic collection information for a specific collection id. - You can get the ID needed for this method by making a /movie/{id} - request and paying attention to the belongs_to_collection hash. - - Movie parts are not sorted in any particular order. If you would like - to sort them yourself you can use the provided release_date. + Get collection details by id. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. @@ -481,9 +552,6 @@ def images(self, **kwargs): Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. - include_image_language: (optional) Comma separated, a valid - ISO 69-1. Returns: A dict representation of the JSON returned from the API. @@ -500,7 +568,6 @@ def translations(self, **kwargs): Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. @@ -511,6 +578,7 @@ def translations(self, **kwargs): self._set_attrs_to_values(response) return response + class Companies(TMDB): """ Companies functionality. @@ -522,7 +590,7 @@ class Companies(TMDB): 'info': '/{id}', 'alternative_names': '/{id}/alternative_names', 'images': '/{id}/images', - 'movies': '/{id}/movies', + 'movies': '/{id}/movies', # backward compatability } def __init__(self, id=0): @@ -531,11 +599,9 @@ def __init__(self, id=0): def info(self, **kwargs): """ - This method is used to retrieve all of the basic information about a - company. + Get a companies details by id. Args: - append_to_response: (optional) Comma separated, any movie method. Returns: A dict representation of the JSON returned from the API. @@ -563,7 +629,17 @@ def alternative_names(self, **kwargs): def images(self, **kwargs): """ - Get a companies logos by id. + Get a company's logos by id. + + There are two image formats that are supported for companies, PNG's and + SVG's. You can see which type the original file is by looking at the + file_type field. We prefer SVG's as they are resolution independent and + as such, the width and height are only there to reflect the original + asset that was uploaded. An SVG can be scaled properly beyond those + dimensions if you call them as a PNG. + + For more information about how SVG's and PNG's can be used, take a read + through https://developers.themoviedb.org/3/getting-started/images. Args: @@ -576,15 +652,14 @@ def images(self, **kwargs): self._set_attrs_to_values(response) return response - # here for backward compatability, when /movies existed + # backward compatability def movies(self, **kwargs): """ Get the list of movies associated with a particular company. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any movie method. + page: (optional) Minimum value of 1. Expected value is an integer. Returns: A dict representation of the JSON returned from the API. @@ -614,7 +689,10 @@ def __init__(self, id): def info(self, **kwargs): """ - Get the basic information for a specific keyword id. + Get the details of a keyword. + + Args: + None Returns: A dict representation of the JSON returned from the API. @@ -627,11 +705,15 @@ def info(self, **kwargs): def movies(self, **kwargs): """ - Get the list of movies for a particular keyword by id. + Get the movies that belong to a keyword. + + We highly recommend using movie discover instead of this method as it + is much more flexible. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. + include_adult: Choose whether to inlcude adult (pornography) + content in the results. Returns: A dict representation of the JSON returned from the API. @@ -642,6 +724,7 @@ def movies(self, **kwargs): self._set_attrs_to_values(response) return response + class Reviews(TMDB): """ Reviews functionality. @@ -659,7 +742,10 @@ def __init__(self, id): def info(self, **kwargs): """ - Get the full details of a review by ID. + Get the review details by id. + + Args: + None Returns: A dict representation of the JSON returned from the API. diff --git a/ext/tmdbsimple/people.py b/ext/tmdbsimple/people.py index ce0f35ad83..7e317324ff 100644 --- a/ext/tmdbsimple/people.py +++ b/ext/tmdbsimple/people.py @@ -3,8 +3,7 @@ """ tmdbsimple.people ~~~~~~~~~~~~~~~~~ -This module implements the People, Credits, and Jobs functionality -of tmdbsimple. +This module implements the People and Credits functionality of tmdbsimple. Created by Celia Oakley on 2013-10-31. @@ -14,6 +13,7 @@ from .base import TMDB + class People(TMDB): """ People functionality. @@ -23,14 +23,16 @@ class People(TMDB): BASE_PATH = 'person' URLS = { 'info': '/{id}', + 'changes': '/{id}/changes', 'movie_credits': '/{id}/movie_credits', 'tv_credits': '/{id}/tv_credits', 'combined_credits': '/{id}/combined_credits', 'external_ids': '/{id}/external_ids', 'images': '/{id}/images', - 'changes': '/{id}/changes', - 'popular': '/popular', + 'tagged_images': '/{id}/tagged_images', + 'translations': '/{id}/translations', 'latest': '/latest', + 'popular': '/popular', } def __init__(self, id=0): @@ -39,10 +41,15 @@ def __init__(self, id=0): def info(self, **kwargs): """ - Get the general person information for a specific id. + Get the primary person details by id. + + Supports append_to_response. Read more about this at + https://developers.themoviedb.org/3/getting-started/append-to-response. Args: - append_to_response: (optional) Comma separated, any person method. + language: (optional) ISO 639-1 code. + append_to_response: (optional) Append requests within the same + namespace to the response. Returns: A dict respresentation of the JSON returned from the API. @@ -53,13 +60,35 @@ def info(self, **kwargs): self._set_attrs_to_values(response) return response + def changes(self, **kwargs): + """ + Get the changes for a person. By default only the last 24 hours are returned. + + You can query up to 14 days in a single query by using the start_date + and end_date query parameters. + + Args: + start_date: (optional) Filter the results with a start date. + Expected format is 'YYYY-MM-DD'. + end_date: (optional) Filter the results with a end date. + Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('changes') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def movie_credits(self, **kwargs): """ - Get the movie credits for a specific person id. + Get the movie credits for a person. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from the API. @@ -72,11 +101,13 @@ def movie_credits(self, **kwargs): def tv_credits(self, **kwargs): """ - Get the TV credits for a specific person id. + Get the TV show credits for a person. + + You can query for some extra details about the credit with the credit + method. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from the API. @@ -89,15 +120,10 @@ def tv_credits(self, **kwargs): def combined_credits(self, **kwargs): """ - Get the combined (movie and TV) credits for a specific person id. - - To get the expanded details for each TV record, call the /credit method - with the provided credit_id. This will provide details about which - episode and/or season the credit is for. + Get the movie and TV credits together in a single response. Args: language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any person method. Returns: A dict respresentation of the JSON returned from the API. @@ -110,7 +136,19 @@ def combined_credits(self, **kwargs): def external_ids(self, **kwargs): """ - Get the external ids for a specific person id. + Get the external ids for a person. We currently support the following external sources. + + External Sources + - IMDB ID + - Facebook + - Freebase MID + - Freebase ID + - Instagram + - TVRage ID + - Twitter + + Args: + language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. @@ -123,7 +161,10 @@ def external_ids(self, **kwargs): def images(self, **kwargs): """ - Get the images for a specific person id. + Get the images for a person. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -134,40 +175,34 @@ def images(self, **kwargs): self._set_attrs_to_values(response) return response - def changes(self, **kwargs): + def tagged_images(self, **kwargs): """ - Get the changes for a specific person id. - - Changes are grouped by key, and ordered by date in descending order. - By default, only the last 24 hours of changes are returned. The maximum - number of days that can be returned in a single request is 14. The - language is present on fields that are translatable. + Get the images that this person has been tagged in. Args: - start_date: (optional) Expected format is 'YYYY-MM-DD'. - end_date: (optional) Expected format is 'YYYY-MM-DD'. + language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('changes') + path = self._get_id_path('tagged_images') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def popular(self, **kwargs): + def translations(self, **kwargs): """ - Get the list of popular people on The Movie Database. This list - refreshes every day. + Get a list of translations that have been created for a person. Args: - page: (optional) Minimum 1, maximum 1000. + language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('popular') + path = self._get_id_path('translations') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -175,7 +210,11 @@ def popular(self, **kwargs): def latest(self, **kwargs): """ - Get the latest person id. + Get the most newly created person. This is a live response and will + continuously change. + + Args: + language: (optional) ISO 639-1 code. Returns: A dict respresentation of the JSON returned from the API. @@ -186,67 +225,51 @@ def latest(self, **kwargs): self._set_attrs_to_values(response) return response -class Credits(TMDB): - """ - Credits functionality. - - See: https://developers.themoviedb.org/3/credits - """ - BASE_PATH = 'credit' - URLS = { - 'info': '/{credit_id}', - } - - def __init__(self, credit_id): - super(Credits, self).__init__() - self.credit_id = credit_id - - def info(self, **kwargs): + def popular(self, **kwargs): """ - Get the detailed information about a particular credit record. This is - currently only supported with the new credit model found in TV. These - ids can be found from any TV credit response as well as the tv_credits - and combined_credits methods for people. - - The episodes object returns a list of episodes and are generally going - to be guest stars. The season array will return a list of season - numbers. Season credits are credits that were marked with the - "add to every season" option in the editing interface and are - assumed to be "season regulars". + Get the list of popular people on TMDb. This list updates daily. Args: language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_credit_id_path('info') + path = self._get_path('popular') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response -class Jobs(TMDB): + +class Credits(TMDB): """ - Jobs functionality. + Credits functionality. - See: https://developers.themoviedb.org/3/jobs + See: https://developers.themoviedb.org/3/credits """ - BASE_PATH = 'job' + BASE_PATH = 'credit' URLS = { - 'list': '/list', + 'info': '/{credit_id}', } - def list(self, **kwargs): + def __init__(self, credit_id): + super(Credits, self).__init__() + self.credit_id = credit_id + + def info(self, **kwargs): """ - Get a list of valid jobs. + Get a movie or TV credit details by id. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('list') + path = self._get_credit_id_path('info') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - diff --git a/ext/tmdbsimple/search.py b/ext/tmdbsimple/search.py index 6d10c153e3..4d57d52d6a 100644 --- a/ext/tmdbsimple/search.py +++ b/ext/tmdbsimple/search.py @@ -13,6 +13,7 @@ from .base import TMDB + class Search(TMDB): """ Search functionality @@ -21,40 +22,28 @@ class Search(TMDB): """ BASE_PATH = 'search' URLS = { - 'movie': '/movie', - 'collection': '/collection', - 'tv': '/tv', - 'person': '/person', 'company': '/company', + 'collection': '/collection', 'keyword': '/keyword', - 'multi': '/multi' + 'movie': '/movie', + 'multi': '/multi', + 'person': '/person', + 'tv': '/tv', } - def movie(self, **kwargs): + def company(self, **kwargs): """ - Search for movies by title. + Search for companies. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. - language: (optional) ISO 639-1 code. - include_adult: (optional) Toggle the inclusion of adult titles. - Expected value is True or False. - year: (optional) Filter the results release dates to matches that - include this value. - primary_release_year: (optional) Filter the results so that only - the primary release dates have this value. - search_type: (optional) By default, the search type is 'phrase'. - This is almost guaranteed the option you will want. - It's a great all purpose search type and by far the - most tuned for every day querying. For those wanting - more of an "autocomplete" type search, set this - option to 'ngram'. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('movie') + path = self._get_path('company') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -62,12 +51,13 @@ def movie(self, **kwargs): def collection(self, **kwargs): """ - Search for collections by name. + Search for collections. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. - language: (optional) ISO 639-1 code. + language: (optional) (optional) ISO 639-1 code. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -78,106 +68,116 @@ def collection(self, **kwargs): self._set_attrs_to_values(response) return response - def tv(self, **kwargs): + def keyword(self, **kwargs): """ - Search for TV shows by title. + Search for keywords. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. - language: (optional) ISO 639-1 code. - first_air_date_year: (optional) Filter the results to only match - shows that have a air date with with value. - search_type: (optional) By default, the search type is 'phrase'. - This is almost guaranteed the option you will want. - It's a great all purpose search type and by far the - most tuned for every day querying. For those wanting - more of an "autocomplete" type search, set this - option to 'ngram'. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('tv') + path = self._get_path('keyword') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def person(self, **kwargs): + def movie(self, **kwargs): """ - Search for people by name. + Search for movies. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. - include_adult: (optional) Toggle the inclusion of adult titles. - Expected value is True or False. - search_type: (optional) By default, the search type is 'phrase'. - This is almost guaranteed the option you will want. - It's a great all purpose search type and by far the - most tuned for every day querying. For those wanting - more of an "autocomplete" type search, set this - option to 'ngram'. + language: (optional) (optional) ISO 639-1 code. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. + include_adult: (optional) Choose whether to inlcude adult + (pornography) content in the results. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. + year: (optional) A filter to limit the results to a specific year + (looking at all release dates). + primary_release_year: (optional) A filter to limit the results to a + specific primary release year. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('person') + path = self._get_path('movie') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def company(self, **kwargs): + def multi(self, **kwargs): """ - Search for companies by name. + Search multiple models in a single request. Multi search currently + supports searching for movies, tv shows and people in a single request. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. + language: (optional) (optional) ISO 639-1 code. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. + include_adult: (optional) Choose whether to inlcude adult + (pornography) content in the results. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('company') + path = self._get_path('multi') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def keyword(self, **kwargs): + def person(self, **kwargs): """ - Search for keywords by name. + Search for people. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. + language: (optional) (optional) ISO 639-1 code. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. + include_adult: (optional) Choose whether to inlcude adult + (pornography) content in the results. + region: (optional) Specify a ISO 3166-1 code to filter release + dates. Must be uppercase. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('keyword') + path = self._get_path('person') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def multi(self, **kwargs): + def tv(self, **kwargs): """ - Search the movie, tv show and person collections with a single query. + Search for a TV show. Args: - query: CGI escpaed string. - page: (optional) Minimum value of 1. Expected value is an integer. - language: (optional) ISO 639-1 code. - include_adult: (optional) Toggle the inclusion of adult titles. - Expected value is True or False. + language: (optional) (optional) ISO 639-1 code. + query: (required) Pass a text query to search. This value should be + URI encoded. + page: (optional) Minimum 1, maximum 1000, default 1. + include_adult: (optional) Choose whether to inlcude adult + (pornography) content in the results. + first_air_date_year: (optional) Filter the results to only match + shows that have an air date with with value. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('multi') + path = self._get_path('tv') response = self._GET(path, kwargs) self._set_attrs_to_values(response) diff --git a/ext/tmdbsimple/tv.py b/ext/tmdbsimple/tv.py index 85ca8c2b58..2e8410e0fa 100644 --- a/ext/tmdbsimple/tv.py +++ b/ext/tmdbsimple/tv.py @@ -14,6 +14,7 @@ from .base import TMDB + class TV(TMDB): """ TV functionality. @@ -23,22 +24,26 @@ class TV(TMDB): BASE_PATH = 'tv' URLS = { 'info': '/{id}', + 'account_states': '/{id}/account_states', 'alternative_titles': '/{id}/alternative_titles', 'content_ratings': '/{id}/content_ratings', 'credits': '/{id}/credits', + 'episode_groups': '/{id}/episode_groups', 'external_ids': '/{id}/external_ids', 'images': '/{id}/images', - 'rating': '/{id}/rating', - 'similar': '/{id}/similar', + 'keywords': '/{id}/keywords', 'recommendations': '/{id}/recommendations', + 'reviews': '/{id}/reviews', + 'screened_theatrically': '/{id}/screened_theatrically', + 'similar': '/{id}/similar', 'translations': '/{id}/translations', 'videos': '/{id}/videos', - 'keywords': '/{id}/keywords', + 'rating': '/{id}/rating', 'latest': '/latest', - 'on_the_air': '/on_the_air', 'airing_today': '/airing_today', - 'top_rated': '/top_rated', + 'on_the_air': '/on_the_air', 'popular': '/popular', + 'top_rated': '/top_rated', } def __init__(self, id=0): @@ -47,12 +52,15 @@ def __init__(self, id=0): def info(self, **kwargs): """ - Get the primary information about a TV series by id. + Get the primary TV show details by id. + + Supports append_to_response. Read more about this at + https://developers.themoviedb.org/3/getting-started/append-to-response. Args: language: (optional) ISO 639 code. - append_to_response: (optional) Comma separated, any TV series - method. + append_to_response: (optional) Append requests within the same + namespace to the response. Returns: A dict respresentation of the JSON returned from the API. @@ -63,14 +71,34 @@ def info(self, **kwargs): self._set_attrs_to_values(response) return response + def account_states(self, **kwargs): + """ + Grab the following account states for a session: + - TV show rating + - If it belongs to your watchlist + - If it belongs to your favourite list + + Args: + language: (optional) ISO 3166-1 code. + session_id: (required) See Authentication. + guest_session_id: (optional) See Authentication. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('account_states') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response def alternative_titles(self, **kwargs): """ - Get the alternative titles for a specific tv id. + Returns all of the alternative titles for a TV show. Args: language: (optional) ISO 3166-1 code. - append_to_response: (optional) Comma separated, any tv method. + Returns: A dict respresentation of the JSON returned from the API. """ @@ -80,15 +108,13 @@ def alternative_titles(self, **kwargs): self._set_attrs_to_values(response) return response - def content_ratings(self, **kwargs): """ - Get the content ratings for a TV Series. + Get the list of content ratings (certifications) that have been added + to a TV show. Args: - language: (optional) ISO 639 code. - append_to_response: (optional) Comma separated, any collection - method. + language: (optional) ISO 3166-1 code. Returns: A dict respresentation of the JSON returned from the API. @@ -101,13 +127,10 @@ def content_ratings(self, **kwargs): def credits(self, **kwargs): """ - Get the cast & crew information about a TV series. Just like the - website, we pull this information from the last season of the series. + Get the credits (cast and crew) that have been added to a TV show. Args: language: (optional) ISO 639 code. - append_to_response: (optional) Comma separated, any collection - method. Returns: A dict respresentation of the JSON returned from the API. @@ -118,9 +141,33 @@ def credits(self, **kwargs): self._set_attrs_to_values(response) return response + def episode_groups(self, **kwargs): + """ + Get all of the episode groups that have been created for a TV show. + With a group ID you can call the get TV episode group details method. + + Args: + language: (optional) ISO 639 code. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('episode_groups') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def external_ids(self, **kwargs): """ - Get the external ids that we have stored for a TV series. + Get the external ids for a TV show. We currently support the following + external sources. + + Media Databases: IMDb ID, TVDB ID, Freebase MID*, Freebase ID*, TVRage + ID* + Social IDs: Facebook, Instagram, Twitter + + *Defunct or no longer available as a service. Args: language: (optional) ISO 639 code. @@ -136,12 +183,16 @@ def external_ids(self, **kwargs): def images(self, **kwargs): """ - Get the images (posters and backdrops) for a TV series. + Get the images that belong to a TV show. + + Querying images with a language parameter will filter the results. If + you want to include a fallback language (especially useful for + backdrops) you can use the include_image_language parameter. This + should be a comma seperated value like so: + include_image_language=en,null. Args: language: (optional) ISO 639 code. - include_image_language: (optional) Comma separated, a valid - ISO 69-1. Returns: A dict respresentation of the JSON returned from the API. @@ -152,59 +203,86 @@ def images(self, **kwargs): self._set_attrs_to_values(response) return response - def rating(self, **kwargs): + def keywords(self, **kwargs): """ - This method lets users rate a TV show. A valid session id or guest - session id is required. + Get the keywords that have been added to a TV show. Args: - session_id: see Authentication. - guest_session_id: see Authentication. - value: Rating value. + None Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('rating') + path = self._get_id_path('keywords') - payload = { - 'value': kwargs.pop('value', None), - } + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response - response = self._POST(path, kwargs, payload) + def recommendations(self, **kwargs): + """ + Get the list of TV show recommendations for this item. + + Args: + language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('recommendations') + + response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def similar(self, **kwargs): + def reviews(self, **kwargs): """ - Get the similar TV series for a specific TV series id. + Get the reviews for a TV show. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. - append_to_response: (optional) Comma separated, any TV method. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('similar') + path = self._get_id_path('reviews') response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response - def recommendations(self, **kwargs): + def screened_theatrically(self, **kwargs): + """ + Get a list of seasons or episodes that have been screened in a film + festival or theatre. + + Args: + None + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('screened_theatrically') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + + def similar(self, **kwargs): """ - Get the recommendations for TV series for a specific TV series id. + Get a list of similar TV shows. These items are assembled by looking at + keywords and genres. Args: - page: (optional) Minimum value of 1. Expected value is an integer. language: (optional) ISO 639-1 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('recommendations') + path = self._get_id_path('similar') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -212,8 +290,10 @@ def recommendations(self, **kwargs): def translations(self, **kwargs): """ - Get the list of translations that exist for a TV series. These - translations cascade down to the episode level. + Get a list of the translations that exist for a TV show. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -226,8 +306,7 @@ def translations(self, **kwargs): def videos(self, **kwargs): """ - Get the videos that have been added to a TV series (trailers, opening - credits, etc...). + Get the videos that have been added to a TV show. Args: language: (optional) ISO 639 code. @@ -241,50 +320,70 @@ def videos(self, **kwargs): self._set_attrs_to_values(response) return response - def keywords(self, **kwargs): + def rating(self, **kwargs): """ - Get the list of keywords related to a TV series. + Rate a TV show. + + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. + + Args: + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. + value: (required) This is the value of the rating you want to + submit. The value is expected to be between 0.5 and 10.0. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('keywords') + path = self._get_id_path('rating') - response = self._GET(path, kwargs) + payload = { + 'value': kwargs.pop('value', None), + } + + response = self._POST(path, kwargs, payload) self._set_attrs_to_values(response) return response - def latest(self, **kwargs): + def rating_delete(self, **kwargs): """ - Get the most newly created TV show. This is a live response - and will continuously change. + Remove your rating for a TV show. + + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. Args: - language: (optional) ISO 639 code. + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_id_path('latest') + path = self._get_id_path('rating') - response = self._GET(path, kwargs) + payload = { + 'value': kwargs.pop('value', None), + } + + response = self._DELETE(path, kwargs, payload) self._set_attrs_to_values(response) return response - def on_the_air(self, **kwargs): + def latest(self, **kwargs): """ - Get the list of TV shows that are currently on the air. This query - looks for any TV show that has an episode with an air date in the - next 7 days. + Get the most newly created TV show. This is a live response and will + continuously change. Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('on_the_air') + path = self._get_id_path('latest') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -292,13 +391,16 @@ def on_the_air(self, **kwargs): def airing_today(self, **kwargs): """ - Get the list of TV shows that air today. Without a specified timezone, - this query defaults to EST (Eastern Time UTC-05:00). + Get a list of TV shows that are airing today. This query is purely day + based as we do not currently support airing times. + + You can specify a timezone to offset the day calculation. Without a + specified timezone, this query defaults to EST (Eastern Time + UTC-05:00). Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. - timezone: (optional) Valid value from the list of timezones. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -309,20 +411,21 @@ def airing_today(self, **kwargs): self._set_attrs_to_values(response) return response - def top_rated(self, **kwargs): + def on_the_air(self, **kwargs): """ - Get the list of top rated TV shows. By default, this list will only - include TV shows that have 2 or more votes. This list refreshes every - day. + Get a list of shows that are currently on the air. + + This query looks for any TV show that has an episode with an air date + in the next 7 days. Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. """ - path = self._get_path('top_rated') + path = self._get_path('on_the_air') response = self._GET(path, kwargs) self._set_attrs_to_values(response) @@ -330,11 +433,12 @@ def top_rated(self, **kwargs): def popular(self, **kwargs): """ - Get the list of popular TV shows. This list refreshes every day. + Get a list of the current popular TV shows on TMDb. This list updates + daily. Args: - page: (optional) Minimum 1, maximum 1000. language: (optional) ISO 639 code. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -345,6 +449,23 @@ def popular(self, **kwargs): self._set_attrs_to_values(response) return response + def top_rated(self, **kwargs): + """ + Get a list of the top rated TV shows on TMDb. + + Args: + language: (optional) ISO 639 code. + page: (optional) Minimum 1, maximum 1000, default 1. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_path('top_rated') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + class TV_Seasons(TMDB): """ @@ -355,6 +476,7 @@ class TV_Seasons(TMDB): BASE_PATH = 'tv/{tv_id}/season/{season_number}' URLS = { 'info': '', + 'account_states': '/account_states', 'credits': '/credits', 'external_ids': '/external_ids', 'images': '/images', @@ -368,12 +490,15 @@ def __init__(self, tv_id, season_number): def info(self, **kwargs): """ - Get the primary information about a TV season by its season number. + Get the TV season details by id. + + Supports append_to_response. Read more about this at + https://developers.themoviedb.org/3/getting-started/append-to-response. Args: language: (optional) ISO 639 code. - append_to_response: (optional) Comma separated, any TV series - method. + append_to_response: (optional) Append requests within the same + namespace to the response. Returns: A dict respresentation of the JSON returned from the API. @@ -384,9 +509,30 @@ def info(self, **kwargs): self._set_attrs_to_values(response) return response + def account_states(self, **kwargs): + """ + Returns all of the user ratings for the season's episodes. + + Args: + language: (optional) ISO 639 code. + session_id: (required) See Authentication. + guest_session_id: (optional) See Authentication. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_tv_id_season_number_path('account_states') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def credits(self, **kwargs): """ - Get the cast & crew credits for a TV season by season number. + Get the credits for TV season. + + Args: + language: (optional) ISO 639 code. Returns: A dict respresentation of the JSON returned from the API. @@ -399,8 +545,12 @@ def credits(self, **kwargs): def external_ids(self, **kwargs): """ - Get the external ids that we have stored for a TV season by season - number. + Get the external ids for a TV season. We currently support the + following external sources. + + Media Databases: TVDB ID, Freebase MID*, Freebase ID*, TVRage ID* + + *Defunct or no longer available as a service. Args: language: (optional) ISO 639 code. @@ -416,13 +566,16 @@ def external_ids(self, **kwargs): def images(self, **kwargs): """ - Get the images (posters) that we have stored for a TV season by season - number. + Get the images that belong to a TV season. + + Querying images with a language parameter will filter the results. If + you want to include a fallback language (especially useful for + backdrops) you can use the include_image_language parameter. This + should be a comma seperated value like so: + include_image_language=en,null. Args: language: (optional) ISO 639 code. - include_image_language: (optional) Comma separated, a valid - ISO 69-1. Returns: A dict respresentation of the JSON returned from the API. @@ -435,8 +588,7 @@ def images(self, **kwargs): def videos(self, **kwargs): """ - Get the videos that have been added to a TV season (trailers, teasers, - etc...). + Get the videos that have been added to a TV season. Args: language: (optional) ISO 639 code. @@ -460,9 +612,11 @@ class TV_Episodes(TMDB): BASE_PATH = 'tv/{tv_id}/season/{season_number}/episode/{episode_number}' URLS = { 'info': '', + 'account_states': '/account_states', 'credits': '/credits', 'external_ids': '/external_ids', 'images': '/images', + 'translations': '/translations', 'rating': '/rating', 'videos': '/videos', } @@ -475,13 +629,15 @@ def __init__(self, tv_id, season_number, episode_number): def info(self, **kwargs): """ - Get the primary information about a TV episode by combination of a - season and episode number. + Get the TV episode details by id. + + Supports append_to_response. Read more about this at + https://developers.themoviedb.org/3/getting-started/append-to-response. Args: language: (optional) ISO 639 code. - append_to_response: (optional) Comma separated, any TV series - method. + append_to_response: (optional) Append requests within the same + namespace to the response. Returns: A dict respresentation of the JSON returned from the API. @@ -492,9 +648,29 @@ def info(self, **kwargs): self._set_attrs_to_values(response) return response + def account_states(self, **kwargs): + """ + Get your rating for an episode. + + Args: + session_id: (required) See Authentication. + guest_session_id: (optional) See Authentication. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_tv_id_season_number_episode_number_path('account_states') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def credits(self, **kwargs): """ - Get the TV episode credits by combination of season and episode number. + Get the credits (cast, crew and guest stars) for a TV episode. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -507,11 +683,16 @@ def credits(self, **kwargs): def external_ids(self, **kwargs): """ - Get the external ids for a TV episode by combination of a season and - episode number. + Get the external ids for a TV episode. We currently support the + following external sources. + + External Sources: IMDb ID, TVDB ID, Freebase MID*, Freebase ID*, TVRage + ID* + + *Defunct or no longer available as a service. Args: - language: (optional) ISO 639 code. + None Returns: A dict respresentation of the JSON returned from the API. @@ -525,9 +706,16 @@ def external_ids(self, **kwargs): def images(self, **kwargs): """ - Get the images (episode stills) for a TV episode by combination of a - season and episode number. Since episode stills don't have a language, - this call will always return all images. + Get the images that belong to a TV episode. + + Querying images with a language parameter will filter the results. If + you want to include a fallback language (especially useful for + backdrops) you can use the include_image_language parameter. This + should be a comma seperated value like so: + include_image_language=en,null. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -538,15 +726,35 @@ def images(self, **kwargs): self._set_attrs_to_values(response) return response + def translations(self, **kwargs): + """ + Get the translation data for an episode. + + Args: + None + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_tv_id_season_number_episode_number_path('translations') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + def rating(self, **kwargs): """ - This method lets users rate a TV episode. A valid session id or guest - session id is required. + Rate a TV episode. + + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. Args: - session_id: see Authentication. - guest_session_id: see Authentication. - value: Rating value. + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. + value: (required) This is the value of the rating you want to + submit. The value is expected to be between 0.5 and 10.0. Returns: A dict respresentation of the JSON returned from the API. @@ -561,10 +769,34 @@ def rating(self, **kwargs): self._set_attrs_to_values(response) return response + def rating_delete(self, **kwargs): + """ + Remove your rating for a TV episode. + + A valid session or guest session ID is required. You can read more + about how this works at + https://developers.themoviedb.org/3/authentication/how-do-i-generate-a-session-id. + + Args: + session_id: (optional) See Authentication. + guest_session_id: (optional) See Authentication. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_tv_id_season_number_episode_number_path('rating') + + payload = { + 'value': kwargs.pop('value', None), + } + + response = self._DELETE(path, kwargs, payload) + self._set_attrs_to_values(response) + return response + def videos(self, **kwargs): """ - Get the videos that have been added to a TV episode (teasers, clips, - etc...). + Get the videos that have been added to a TV episode. Args: language: (optional) ISO 639 code. @@ -579,6 +811,46 @@ def videos(self, **kwargs): return response +class TV_Episode_Groups(TMDB): + """ + TV Episode Groups functionality. + + See: https://developers.themoviedb.org/3/tv-episode-groups + """ + BASE_PATH = 'tv/episode_group' + URLS = { + 'info': '/{id}', + } + + def __init__(self, id): + super(TV_Episode_Groups, self).__init__() + self.id = id + + def info(self, **kwargs): + """ + Get the details of a TV episode group. Groups support 7 different types + which are enumerated as the following: + 1. Original air date + 2. Absolute + 3. DVD + 4. Digital + 5. Story arc + 6. Production + 7. TV + + Args: + language: (optional) ISO 639 code. + + Returns: + A dict respresentation of the JSON returned from the API. + """ + path = self._get_id_path('info') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + + class TV_Changes(TMDB): """ Changes functionality for TV Series, Season and Episode. @@ -600,16 +872,23 @@ def __init__(self, id=0): def series(self, **kwargs): """ - Get the changes for a specific series id. + Get the changes for a TV show. By default only the last 24 hours are returned. - Changes are grouped by key, and ordered by date in descending order. - By default, only the last 24 hours of changes are returned. The - maximum number of days that can be returned in a single request is 14. + You can query up to 14 days in a single query by using the start_date + and end_date query parameters. + + TV show changes are different than movie changes in that there are some + edits on seasons and episodes that will create a change entry at the + show level. These can be found under the season and episode keys. These + keys will contain a series_id and episode_id. You can use the season + changes and episode changes methods to look these up individually. Args: - start_date: (optional) Expected format is 'YYYY-MM-DD'. - end_date: (optional) Expected format is 'YYYY-MM-DD'. - page: (optional) Minimum 1, maximum 1000. + start_date: (optional) Filter the results with a start date. + Expected format is 'YYYY-MM-DD'. + end_date: (optional) Filter the results with a end date. + Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -622,16 +901,17 @@ def series(self, **kwargs): def season(self, **kwargs): """ - Get the changes for a specific season id. + Get the changes for a TV season. By default only the last 24 hours are returned. - Changes are grouped by key, and ordered by date in descending order. - By default, only the last 24 hours of changes are returned. The - maximum number of days that can be returned in a single request is 14. + You can query up to 14 days in a single query by using the start_date + and end_date query parameters. Args: - start_date: (optional) Expected format is 'YYYY-MM-DD'. - end_date: (optional) Expected format is 'YYYY-MM-DD'. - page: (optional) Minimum 1, maximum 1000. + start_date: (optional) Filter the results with a start date. + Expected format is 'YYYY-MM-DD'. + end_date: (optional) Filter the results with a end date. + Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -644,16 +924,17 @@ def season(self, **kwargs): def episode(self, **kwargs): """ - Get the changes for a specific episode id. + Get the changes for a TV episode. By default only the last 24 hours are returned. - Changes are grouped by key, and ordered by date in descending order. - By default, only the last 24 hours of changes are returned. The - maximum number of days that can be returned in a single request is 14. + You can query up to 14 days in a single query by using the start_date + and end_date query parameters. Args: - start_date: (optional) Expected format is 'YYYY-MM-DD'. - end_date: (optional) Expected format is 'YYYY-MM-DD'. - page: (optional) Minimum 1, maximum 1000. + start_date: (optional) Filter the results with a start date. + Expected format is 'YYYY-MM-DD'. + end_date: (optional) Filter the results with a end date. + Expected format is 'YYYY-MM-DD'. + page: (optional) Minimum 1, maximum 1000, default 1. Returns: A dict respresentation of the JSON returned from the API. @@ -674,6 +955,8 @@ class Networks(TMDB): BASE_PATH = 'network' URLS = { 'info': '/{id}', + 'alternative_names': '/{id}/alternative_names', + 'images': '/{id}/images', } def __init__(self, id): @@ -682,9 +965,10 @@ def __init__(self, id): def info(self, **kwargs): """ - This method is used to retrieve the basic information about a TV - network. You can use this ID to search for TV shows with the discover. - At this time we don't have much but this will be fleshed out over time. + Get the details of a network. + + Args: + None Returns: A dict respresentation of the JSON returned from the API. @@ -694,3 +978,45 @@ def info(self, **kwargs): response = self._GET(path, kwargs) self._set_attrs_to_values(response) return response + + def alternative_names(self, **kwargs): + """ + Get the alternative names of a network. + + Args: + None + + Returns: + A dict representation of the JSON returned from the API. + """ + path = self._get_id_path('alternative_names') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response + + def images(self, **kwargs): + """ + Get a TV network logos by id. + + There are two image formats that are supported for networks, PNG's and + SVG's. You can see which type the original file is by looking at the + file_type field. We prefer SVG's as they are resolution independent and + as such, the width and height are only there to reflect the original + asset that was uploaded. An SVG can be scaled properly beyond those + dimensions if you call them as a PNG. + + For more information about how SVG's and PNG's can be used, take a read + through https://developers.themoviedb.org/3/getting-started/images. + + Args: + None + + Returns: + A dict representation of the JSON returned from the API. + """ + path = self._get_id_path('images') + + response = self._GET(path, kwargs) + self._set_attrs_to_values(response) + return response diff --git a/medusa/__main__.py b/medusa/__main__.py index 215ecc0002..ed51da9203 100755 --- a/medusa/__main__.py +++ b/medusa/__main__.py @@ -578,7 +578,10 @@ def initialize(self, console_logging=True): app.CPU_PRESET = check_setting_str(app.CFG, 'General', 'cpu_preset', 'NORMAL') app.ANON_REDIRECT = check_setting_str(app.CFG, 'General', 'anon_redirect', 'http://dereferer.org/?') app.PROXY_SETTING = check_setting_str(app.CFG, 'General', 'proxy_setting', '') + app.PROXY_PROVIDERS = bool(check_setting_int(app.CFG, 'General', 'proxy_providers', 1)) app.PROXY_INDEXERS = bool(check_setting_int(app.CFG, 'General', 'proxy_indexers', 1)) + app.PROXY_CLIENTS = bool(check_setting_int(app.CFG, 'General', 'proxy_clients', 1)) + app.PROXY_OTHERS = bool(check_setting_int(app.CFG, 'General', 'proxy_others', 1)) # attempt to help prevent users from breaking links by using a bad url if not app.ANON_REDIRECT.endswith('?'): @@ -1585,7 +1588,10 @@ def save_config(): new_config['General']['trash_rotate_logs'] = int(app.TRASH_ROTATE_LOGS) new_config['General']['sort_article'] = int(app.SORT_ARTICLE) new_config['General']['proxy_setting'] = app.PROXY_SETTING + new_config['General']['proxy_providers'] = int(app.PROXY_PROVIDERS) new_config['General']['proxy_indexers'] = int(app.PROXY_INDEXERS) + new_config['General']['proxy_clients'] = int(app.PROXY_CLIENTS) + new_config['General']['proxy_others'] = int(app.PROXY_OTHERS) new_config['General']['use_listview'] = int(app.USE_LISTVIEW) new_config['General']['metadata_kodi'] = app.METADATA_KODI diff --git a/medusa/app.py b/medusa/app.py index 7806d0fb28..260ba90f95 100644 --- a/medusa/app.py +++ b/medusa/app.py @@ -172,7 +172,11 @@ def __init__(self): self.HANDLE_REVERSE_PROXY = False self.PROXY_SETTING = None + self.PROXY_PROVIDERS = True self.PROXY_INDEXERS = True + self.PROXY_CLIENTS = True + self.PROXY_OTHERS = True + self.SSL_VERIFY = True self.SSL_CA_BUNDLE = None diff --git a/medusa/clients/nzb/sab.py b/medusa/clients/nzb/sab.py index 711b76de38..84f2efd9a2 100644 --- a/medusa/clients/nzb/sab.py +++ b/medusa/clients/nzb/sab.py @@ -16,14 +16,14 @@ from medusa import app from medusa.helper.common import sanitize_filename from medusa.logger.adapters.style import BraceAdapter -from medusa.session.core import MedusaSafeSession +from medusa.session.core import ClientSession from requests.compat import urljoin log = BraceAdapter(logging.getLogger(__name__)) log.logger.addHandler(logging.NullHandler()) -session = MedusaSafeSession() +session = ClientSession() def send_nzb(nzb): diff --git a/medusa/clients/torrent/generic.py b/medusa/clients/torrent/generic.py index f1a60fe94f..313abfae54 100644 --- a/medusa/clients/torrent/generic.py +++ b/medusa/clients/torrent/generic.py @@ -17,7 +17,7 @@ from medusa import app, db from medusa.helper.common import http_code_description from medusa.logger.adapters.style import BraceAdapter -from medusa.session.core import MedusaSession +from medusa.session.core import ClientSession import requests @@ -49,7 +49,7 @@ def __init__(self, name, host=None, username=None, password=None): self.response = None self.auth = None self.last_time = time.time() - self.session = MedusaSession() + self.session = ClientSession() self.session.auth = (self.username, self.password) def _request(self, method='get', params=None, data=None, files=None, cookies=None): diff --git a/medusa/indexers/config.py b/medusa/indexers/config.py index d43ebc68c6..864a0c0ea8 100644 --- a/medusa/indexers/config.py +++ b/medusa/indexers/config.py @@ -9,7 +9,7 @@ from medusa.indexers.tmdb.api import Tmdb from medusa.indexers.tvdbv2.api import TVDBv2 from medusa.indexers.tvmaze.api import TVmaze -from medusa.session.core import MedusaSession +from medusa.session.core import IndexerSession from six import iteritems @@ -77,7 +77,7 @@ 'api_params': { 'language': 'en', 'use_zip': True, - 'session': MedusaSession(cache_control={'cache_etags': False}), + 'session': IndexerSession(cache_control={'cache_etags': False}), }, 'xem_origin': 'tvdb', 'icon': 'thetvdb16.png', @@ -95,7 +95,7 @@ 'api_params': { 'language': 'en', 'use_zip': True, - 'session': MedusaSession(cache_control={'cache_etags': False}), + 'session': IndexerSession(cache_control={'cache_etags': False}), }, 'xem_mapped_to': INDEXER_TVDBV2, 'icon': 'tvmaze16.png', @@ -113,7 +113,7 @@ 'api_params': { 'language': 'en', 'use_zip': True, - 'session': MedusaSession(cache_control={'cache_etags': False}), + 'session': IndexerSession(cache_control={'cache_etags': False}), }, 'icon': 'tmdb16.png', 'scene_loc': '{base_url}/scene_exceptions/scene_exceptions_tmdb.json'.format(base_url=app.BASE_PYMEDUSA_URL), diff --git a/medusa/providers/generic_provider.py b/medusa/providers/generic_provider.py index 0b668a9679..84fe59d7bc 100644 --- a/medusa/providers/generic_provider.py +++ b/medusa/providers/generic_provider.py @@ -44,7 +44,7 @@ NameParser, ) from medusa.search import FORCED_SEARCH, PROPER_SEARCH -from medusa.session.core import MedusaSafeSession +from medusa.session.core import ProviderSession from medusa.show.show import Show from pytimeparse import parse @@ -80,7 +80,7 @@ def __init__(self, name): self.public = False self.search_fallback = False self.search_mode = None - self.session = MedusaSafeSession(cloudflare=True) + self.session = ProviderSession(cloudflare=True) self.session.headers.update(self.headers) self.series = None self.supports_absolute_numbering = False diff --git a/medusa/server/api/v2/config.py b/medusa/server/api/v2/config.py index eda55ee579..3aa30477a4 100644 --- a/medusa/server/api/v2/config.py +++ b/medusa/server/api/v2/config.py @@ -133,7 +133,10 @@ class ConfigHandler(BaseRequestHandler): 'calendarUnprotected': BooleanField(app, 'CALENDAR_UNPROTECTED'), 'calendarIcons': BooleanField(app, 'CALENDAR_ICONS'), 'proxySetting': StringField(app, 'PROXY_SETTING'), + 'proxyProviders': BooleanField(app, 'PROXY_PROVIDERS'), 'proxyIndexers': BooleanField(app, 'PROXY_INDEXERS'), + 'proxyClients': BooleanField(app, 'PROXY_CLIENTS'), + 'proxyOthers': BooleanField(app, 'PROXY_OTHERS'), 'skipRemovedFiles': BooleanField(app, 'SKIP_REMOVED_FILES'), 'epDefaultDeletedStatus': IntegerField(app, 'EP_DEFAULT_DELETED_STATUS'), @@ -673,8 +676,13 @@ def data_main(): section_data['encryptionVersion'] = bool(app.ENCRYPTION_VERSION) section_data['calendarUnprotected'] = bool(app.CALENDAR_UNPROTECTED) section_data['calendarIcons'] = bool(app.CALENDAR_ICONS) + section_data['proxySetting'] = app.PROXY_SETTING + section_data['proxyProviders'] = bool(app.PROXY_PROVIDERS) section_data['proxyIndexers'] = bool(app.PROXY_INDEXERS) + section_data['proxyClients'] = bool(app.PROXY_CLIENTS) + section_data['proxyOthers'] = bool(app.PROXY_OTHERS) + section_data['skipRemovedFiles'] = bool(app.SKIP_REMOVED_FILES) section_data['epDefaultDeletedStatus'] = app.EP_DEFAULT_DELETED_STATUS section_data['developer'] = bool(app.DEVELOPER) diff --git a/medusa/session/core.py b/medusa/session/core.py index 7135718f79..6ef2ae6011 100644 --- a/medusa/session/core.py +++ b/medusa/session/core.py @@ -9,15 +9,18 @@ import certifi import medusa.common -from medusa import app +from medusa.app import app +from medusa.logger.adapters.style import BraceAdapter from medusa.session import factory, handlers, hooks import requests from six.moves import collections_abc +from six.moves.urllib.parse import urlparse -log = logging.getLogger(__name__) -log.addHandler(logging.NullHandler()) + +log = BraceAdapter(logging.getLogger(__name__)) +log.logger.addHandler(logging.NullHandler()) class BaseSession(requests.Session): @@ -86,9 +89,6 @@ def __init__(self, proxies=None, **kwargs): if cache_control: factory.add_cache_control(self, cache_control) - # add proxies - self.proxies = proxies or factory.add_proxies() - # Configure global session hooks self.hooks['response'].append(hooks.log_url) @@ -98,8 +98,36 @@ def __init__(self, proxies=None, **kwargs): # Set default headers. self.headers.update(self.default_headers) + def _add_proxies(self): + """As we're dependent on medusa app config. We need to set the proxy before the classes are initialized.""" + + def get_proxy_setting(): + config = { + 'ProviderSession': app.PROXY_PROVIDERS, + 'IndexerSession': app.PROXY_INDEXERS, + 'ClientSession': app.PROXY_CLIENTS + } + if (isinstance(self, (ProviderSession, IndexerSession, ClientSession))): + return config[self.__class__.__name__] + + return app.PROXY_OTHERS + + if app.PROXY_SETTING and get_proxy_setting(): + log.debug('Using proxy: {proxy} for {class}', {'proxy': app.PROXY_SETTING, 'class': self.__class__.__name__}) + proxy = urlparse(app.PROXY_SETTING) + address = app.PROXY_SETTING if proxy.scheme else 'http://' + app.PROXY_SETTING + self.proxies = { + 'http': address, + 'https': address, + } + else: + self.proxies = None + def request(self, method, url, data=None, params=None, headers=None, timeout=30, verify=True, **kwargs): + """Medusa session request method.""" ssl_cert = self._get_ssl_cert(verify) + self._add_proxies() + response = super(MedusaSession, self).request(method, url, data=data, params=params, headers=headers, timeout=timeout, verify=ssl_cert, **kwargs) if self.cloudflare: @@ -145,7 +173,7 @@ class MedusaSafeSession(MedusaSession): """ def __init__(self, *args, **kwargs): - # Initialize request.session + """Initialize request.session.""" super(MedusaSafeSession, self).__init__(**kwargs) def request(self, method, url, data=None, params=None, headers=None, timeout=30, verify=True, **kwargs): @@ -163,8 +191,8 @@ def request(self, method, url, data=None, params=None, headers=None, timeout=30, log.debug(u'Error requesting url {url} Error: {err_msg}', url=url, err_msg=error) return resp or error.response except Exception as error: - if ((isinstance(error, collections_abc.Iterable) and u'ECONNRESET' in error) or - (hasattr(error, u'errno') and error.errno == errno.ECONNRESET)): + if ((isinstance(error, collections_abc.Iterable) and u'ECONNRESET' in error) + or (hasattr(error, u'errno') and error.errno == errno.ECONNRESET)): log.warning( u'Connection reset by peer accessing url {url} Error: {err_msg}'.format(url=url, err_msg=error) ) @@ -174,3 +202,30 @@ def request(self, method, url, data=None, params=None, headers=None, timeout=30, return None return resp + + +class ProviderSession(MedusaSafeSession): + """Requests session for providers.""" + + def __init__(self, **kwargs): + """Init super and hook in the proxy if configured for providers.""" + # Initialize request.session + super(ProviderSession, self).__init__(**kwargs) + + +class IndexerSession(MedusaSafeSession): + """Requests session for indexers.""" + + def __init__(self, **kwargs): + """Init super and hook in the proxy if configured for indexers.""" + # Initialize request.session + super(IndexerSession, self).__init__(**kwargs) + + +class ClientSession(MedusaSafeSession): + """Requests session for clients.""" + + def __init__(self, **kwargs): + """Init super and hook in the proxy if configured for clients.""" + # Initialize request.session + super(ClientSession, self).__init__(**kwargs) diff --git a/medusa/session/factory.py b/medusa/session/factory.py index b369d275d9..6dd5067bab 100644 --- a/medusa/session/factory.py +++ b/medusa/session/factory.py @@ -6,10 +6,6 @@ from cachecontrol import CacheControlAdapter from cachecontrol.cache import DictCache -from medusa import app - -from six.moves.urllib.parse import urlparse - log = logging.getLogger(__name__) log.addHandler(logging.NullHandler()) @@ -25,17 +21,3 @@ def add_cache_control(session, cache_control_config): session.mount('http://', adapter) session.mount('https://', adapter) session.cache_controller = adapter.controller - - -def add_proxies(): - # request session proxies - if app.PROXY_SETTING: - log.debug('Using global proxy: ' + app.PROXY_SETTING) - proxy = urlparse(app.PROXY_SETTING) - address = app.PROXY_SETTING if proxy.scheme else 'http://' + app.PROXY_SETTING - return { - 'http': address, - 'https': address, - } - else: - return None diff --git a/requirements.txt b/requirements.txt index ff6b2e6f52..84bb6e7d41 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ requests==2.25.0 requests-oauthlib==1.3.0 six==1.15.0 subliminal==2.1.0 -tmdbsimple==2.2.11 +tmdbsimple==2.7.0 tornado==5.1.1 tornroutes==0.5.1 ttl-cache==1.6 diff --git a/tests/apiv2/test_config.py b/tests/apiv2/test_config.py index 209c472c14..256215e12f 100644 --- a/tests/apiv2/test_config.py +++ b/tests/apiv2/test_config.py @@ -125,7 +125,10 @@ def config_main(monkeypatch, app_config): section_data['calendarUnprotected'] = bool(app.CALENDAR_UNPROTECTED) section_data['calendarIcons'] = bool(app.CALENDAR_ICONS) section_data['proxySetting'] = app.PROXY_SETTING + section_data['proxyProviders'] = bool(app.PROXY_PROVIDERS) section_data['proxyIndexers'] = bool(app.PROXY_INDEXERS) + section_data['proxyClients'] = bool(app.PROXY_CLIENTS) + section_data['proxyOthers'] = bool(app.PROXY_OTHERS) section_data['skipRemovedFiles'] = bool(app.SKIP_REMOVED_FILES) section_data['epDefaultDeletedStatus'] = app.EP_DEFAULT_DELETED_STATUS section_data['developer'] = bool(app.DEVELOPER) diff --git a/themes-default/slim/src/components/config-general.vue b/themes-default/slim/src/components/config-general.vue index 282065b01c..f9af9b7bee 100644 --- a/themes-default/slim/src/components/config-general.vue +++ b/themes-default/slim/src/components/config-general.vue @@ -362,8 +362,20 @@

blank to disable or proxy to use when connecting to providers

+ +

use proxy host for connecting to providers (torrent & nzb)

+
+ -

use proxy host for connecting to indexers (thetvdb)

+

use proxy host for connecting to indexers (thetvdb, tmdb or tvmaze)

+
+ + +

use proxy host for connecting torrent or usenet clients (nzbGet excluded)

+
+ + +

use proxy host for connecting to other sites.

diff --git a/themes-default/slim/src/store/modules/config/general.js b/themes-default/slim/src/store/modules/config/general.js index 5e0c41e7d8..8a310b314d 100644 --- a/themes-default/slim/src/store/modules/config/general.js +++ b/themes-default/slim/src/store/modules/config/general.js @@ -79,7 +79,10 @@ const state = { calendarUnprotected: null, calendarIcons: null, proxySetting: null, + proxyProviders: null, + proxyClients: null, proxyIndexers: null, + proxyOthers: null, skipRemovedFiles: null, epDefaultDeletedStatus: null, developer: null, diff --git a/themes-default/slim/test/specs/__snapshots__/config-general.spec.js.snap b/themes-default/slim/test/specs/__snapshots__/config-general.spec.js.snap index 100007c025..9c60e6304e 100644 --- a/themes-default/slim/test/specs/__snapshots__/config-general.spec.js.snap +++ b/themes-default/slim/test/specs/__snapshots__/config-general.spec.js.snap @@ -1170,6 +1170,12 @@ exports[`ConfigGeneral.test.js renders 1`] = ` + + + + + + { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../api.js */ \"./src/api.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.mjs\");\n/* harmony import */ var _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./root-dirs.vue */ \"./src/components/root-dirs.vue\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n/* harmony import */ var _utils_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/core.js */ \"./src/utils/core.js\");\n/* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns/format */ \"./node_modules/date-fns/esm/format/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-js-toggle-button */ \"./node_modules/vue-js-toggle-button/dist/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-multiselect */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.js\");\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_multiselect__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vue_multiselect_dist_vue_multiselect_min_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-multiselect/dist/vue-multiselect.min.css */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.css\");\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'config-general',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__.AppLink,\n ConfigTemplate: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTemplate,\n ConfigTextbox: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextbox,\n ConfigTextboxNumber: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextboxNumber,\n ConfigToggleSlider: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigToggleSlider,\n CustomLogs: _helpers__WEBPACK_IMPORTED_MODULE_2__.CustomLogs,\n LanguageSelect: _helpers__WEBPACK_IMPORTED_MODULE_2__.LanguageSelect,\n Multiselect: (vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default()),\n SortedSelectList: _helpers__WEBPACK_IMPORTED_MODULE_2__.SortedSelectList,\n VPopover: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VPopover,\n StateSwitch: _helpers__WEBPACK_IMPORTED_MODULE_2__.StateSwitch,\n ToggleButton: vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__.ToggleButton,\n RootDirs: _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__.default\n },\n directives: {\n tooltip: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VTooltip\n },\n\n data() {\n const defaultPageOptions = [{\n value: 'home',\n text: 'Shows'\n }, {\n value: 'schedule',\n text: 'Schedule'\n }, {\n value: 'history',\n text: 'History'\n }, {\n value: 'news',\n text: 'News'\n }, {\n value: 'IRC',\n text: 'IRC'\n }];\n const privacyLevelOptions = [{\n value: 'high',\n text: 'HIGH'\n }, {\n value: 'normal',\n text: 'NORMAL'\n }, {\n value: 'low',\n text: 'LOW'\n }];\n return {\n defaultPageOptions,\n privacyLevelOptions,\n githubBranchesForced: [],\n resetBranchSelected: null,\n saving: false,\n selectedBranch: '',\n checkoutBranchMessage: ''\n };\n },\n\n beforeMount() {\n // Wait for the next tick, so the component is rendered\n this.$nextTick(() => {\n $('#config-components').tabs();\n });\n },\n\n computed: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapState)({\n general: state => state.config.general,\n configLoaded: state => state.config.consts.statuses.length > 0,\n layout: state => state.config.layout,\n statuses: state => state.config.consts.statuses,\n indexers: state => state.config.indexers,\n system: state => state.config.system,\n gitRemoteBranches: state => state.config.system.gitRemoteBranches // We need the reactivity on this.\n\n }),\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapGetters)(['getStatus']),\n indexerDefault: {\n get() {\n const {\n general\n } = this;\n const {\n indexerDefault\n } = general;\n return indexerDefault || 0;\n },\n\n set(indexer) {\n // TODO: commit instead\n this.general.indexerDefault = indexer;\n }\n\n },\n\n indexerListOptions() {\n const {\n indexers\n } = this;\n const allIndexers = [{\n text: 'All Indexers',\n value: 0\n }];\n const indexerOptions = Object.values(indexers.indexers).map(indexer => ({\n value: indexer.id,\n text: indexer.name\n }));\n return [...allIndexers, ...indexerOptions];\n },\n\n datePresetOptions() {\n const {\n general\n } = this;\n const {\n datePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedDatePresets = datePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedDatePresets];\n },\n\n timePresetOptions() {\n const {\n general\n } = this;\n const {\n timePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedTimePresets = timePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedTimePresets];\n },\n\n availableThemesOptions() {\n const {\n general\n } = this;\n const {\n availableThemes\n } = general;\n\n if (!availableThemes) {\n return [];\n }\n\n return availableThemes.map(theme => ({\n value: theme.name,\n text: `${theme.name} (${theme.version})`\n }));\n },\n\n cpuPresetOptions() {\n const {\n system\n } = this;\n const {\n cpuPresets\n } = system;\n\n if (!cpuPresets) {\n return [];\n }\n\n return Object.keys(cpuPresets).map(key => ({\n value: key,\n text: key\n }));\n },\n\n defaultDeletedEpOptions() {\n const {\n general,\n getStatus\n } = this;\n let status = [];\n\n if (general.skipRemovedFiles) {\n status = ['skipped', 'ignored'].map(key => getStatus({\n key\n }));\n } else {\n // Get status objects, when skip removed files is enabled\n status = ['skipped', 'ignored', 'archived'].map(key => getStatus({\n key\n }));\n }\n\n if (status.every(x => x !== undefined)) {\n return status.map(status => ({\n text: status.name,\n value: status.value\n }));\n }\n\n return [];\n },\n\n githubRemoteBranchesOptions() {\n const {\n general,\n githubBranches,\n githubBranchForceUpdate,\n gitRemoteBranches\n } = this;\n const {\n username,\n password,\n token\n } = general.git;\n\n if (!gitRemoteBranches.length > 0) {\n githubBranchForceUpdate();\n }\n\n let filteredBranches = [];\n\n if ((username && password || token) && general.developer) {\n filteredBranches = githubBranches;\n } else if (username && password || token) {\n filteredBranches = githubBranches.filter(branch => ['master', 'develop'].includes(branch));\n } else {\n filteredBranches = githubBranches.filter(branch => ['master'].includes(branch));\n }\n\n return filteredBranches.map(branch => ({\n text: branch,\n value: branch\n }));\n },\n\n githubBranches() {\n const {\n githubBranchesForced,\n gitRemoteBranches\n } = this;\n return gitRemoteBranches || githubBranchesForced;\n },\n\n githubTokenPopover() {\n const {\n general\n } = this;\n return '

Copy the generated token and paste it in the token input box.

' + `

` + '


';\n }\n\n },\n methods: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapActions)({\n setConfig: 'setConfig',\n setTheme: 'setTheme',\n getApiKey: 'getApiKey',\n setLayoutShow: 'setLayoutShow'\n }),\n\n async githubBranchForceUpdate() {\n const response = await (0,_api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute)('home/branchForceUpdate');\n\n if (response.data._size > 0) {\n this.githubBranchesForced = response.data.resetBranches;\n }\n },\n\n async generateApiKey() {\n const {\n getApiKey,\n save\n } = this;\n\n try {\n await getApiKey();\n this.$snotify.success('Saving and reloading the page, to utilize the new api key', 'Warning', {\n timeout: 5000\n });\n setTimeout(() => {\n // Save the new apiKey. No choice to reload because of /src/api.js\n save();\n }, 500);\n setTimeout(() => {\n // For now we reload the page since the layouts use python still\n location.reload();\n }, 500);\n } catch (error) {\n this.$snotify.error('Error while trying to get a new api key', `Error: ${error}`);\n }\n },\n\n async changeTheme(themeName) {\n const {\n setTheme\n } = this;\n\n try {\n await setTheme({\n themeName\n });\n this.$snotify.success('Saving and reloading the page', 'Saving', {\n timeout: 5000\n });\n setTimeout(() => {\n // Reload the page as we need to reload static content.\n (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.forceBrowserReload)();\n }, 1000);\n } catch (error) {\n this.$snotify.error('Error while trying to change the theme', `Error: ${error}`);\n }\n },\n\n async save() {\n const {\n general,\n layout,\n setConfig\n } = this; // Disable the save button until we're done.\n\n this.saving = true;\n const {\n availableThemes,\n backlogOverview,\n datePresets,\n loggingLevels,\n logs,\n timePresets,\n randomShowSlug,\n recentShows,\n themeName,\n ...filteredConfig\n } = general;\n const {\n local,\n ...filteredLayout\n } = layout;\n const configMain = {\n section: 'main',\n config: { ...filteredConfig,\n ...{\n layout: filteredLayout\n },\n ...{\n logs: {\n debug: general.logs.debug,\n dbDebug: general.logs.dbDebug,\n actualLogDir: general.logs.actualLogDir,\n nr: general.logs.nr,\n size: general.logs.size,\n subliminalLog: general.logs.subliminalLog,\n privacyLevel: general.logs.privacyLevel\n }\n }\n }\n };\n\n try {\n await setConfig(configMain);\n this.$snotify.success('Saved general config', 'Saved', {\n timeout: 5000\n });\n } catch (error) {\n this.$snotify.error('Error while trying to save general config', `Error: ${error}`);\n } finally {\n this.saving = false;\n }\n },\n\n saveShowListOrder(value) {\n const {\n layout,\n setLayoutShow\n } = this;\n const mergedShowLayout = { ...layout.show,\n ...{\n showListOrder: value.map(item => item.value)\n }\n };\n setLayoutShow(mergedShowLayout);\n },\n\n async compareDBUpgrade() {\n const {\n checkoutBranch,\n selectedBranch\n } = this;\n\n try {\n this.checkoutBranchMessage = 'Checking if the checkout requires a database upgrade / downgrade';\n const result = await _api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('home/getDBcompare');\n\n if (result.data.status === 'success') {\n if (result.data.message === 'equal') {\n // Checkout Branch\n checkoutBranch();\n }\n\n if (result.data.message === 'upgrade') {\n this.$modal.show('query-upgrade-database', {\n selectedBranch\n });\n }\n\n if (result.data.message === 'downgrade') {\n this.$snotify.error('Can\\'t switch branch as this will result in a database downgrade.', 'Error');\n }\n } else {\n this.$snotify.error('Error while trying to compare db versions for checkout', `Error: ${result.data.status}`);\n }\n } catch (error) {\n console.log(error);\n }\n },\n\n /**\n * Validate if we need a compareDb, or directly checkout.\n *\n * If whe're running a master or develop branch, we check for database changes.\n * This to prepare the user, by showing a few modals.\n * If the user is running another branch like, a feature branch. We asume the user knows what he's doing.\n *\n */\n validateCheckoutBranch() {\n const {\n compareDBUpgrade,\n selectedBranch\n } = this;\n\n if (!selectedBranch) {\n return;\n }\n\n compareDBUpgrade();\n },\n\n async checkoutBranch() {\n const {\n selectedBranch\n } = this;\n this.checkoutBranchMessage = `Checking out branch ${selectedBranch}`;\n await _api_js__WEBPACK_IMPORTED_MODULE_0__.api.post('system/operation', {\n type: 'CHECKOUT_BRANCH',\n branch: selectedBranch\n }, {\n timeout: 120000\n });\n this.checkoutBranchMessage = `Finished checking out branch ${selectedBranch}`;\n setTimeout(() => {\n this.checkoutBranchMessage = '';\n }, 4000);\n this.$modal.show('query-restart');\n },\n\n cancelCheckout() {\n this.checkoutBranchMessage = '';\n }\n\n }\n});\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-1%5B0%5D.rules%5B0%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../api.js */ \"./src/api.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.mjs\");\n/* harmony import */ var _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./root-dirs.vue */ \"./src/components/root-dirs.vue\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n/* harmony import */ var _utils_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/core.js */ \"./src/utils/core.js\");\n/* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns/format */ \"./node_modules/date-fns/esm/format/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-js-toggle-button */ \"./node_modules/vue-js-toggle-button/dist/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-multiselect */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.js\");\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_multiselect__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vue_multiselect_dist_vue_multiselect_min_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-multiselect/dist/vue-multiselect.min.css */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.css\");\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'config-general',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__.AppLink,\n ConfigTemplate: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTemplate,\n ConfigTextbox: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextbox,\n ConfigTextboxNumber: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextboxNumber,\n ConfigToggleSlider: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigToggleSlider,\n CustomLogs: _helpers__WEBPACK_IMPORTED_MODULE_2__.CustomLogs,\n LanguageSelect: _helpers__WEBPACK_IMPORTED_MODULE_2__.LanguageSelect,\n Multiselect: (vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default()),\n SortedSelectList: _helpers__WEBPACK_IMPORTED_MODULE_2__.SortedSelectList,\n VPopover: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VPopover,\n StateSwitch: _helpers__WEBPACK_IMPORTED_MODULE_2__.StateSwitch,\n ToggleButton: vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__.ToggleButton,\n RootDirs: _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__.default\n },\n directives: {\n tooltip: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VTooltip\n },\n\n data() {\n const defaultPageOptions = [{\n value: 'home',\n text: 'Shows'\n }, {\n value: 'schedule',\n text: 'Schedule'\n }, {\n value: 'history',\n text: 'History'\n }, {\n value: 'news',\n text: 'News'\n }, {\n value: 'IRC',\n text: 'IRC'\n }];\n const privacyLevelOptions = [{\n value: 'high',\n text: 'HIGH'\n }, {\n value: 'normal',\n text: 'NORMAL'\n }, {\n value: 'low',\n text: 'LOW'\n }];\n return {\n defaultPageOptions,\n privacyLevelOptions,\n githubBranchesForced: [],\n resetBranchSelected: null,\n saving: false,\n selectedBranch: '',\n checkoutBranchMessage: ''\n };\n },\n\n beforeMount() {\n // Wait for the next tick, so the component is rendered\n this.$nextTick(() => {\n $('#config-components').tabs();\n });\n },\n\n computed: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapState)({\n general: state => state.config.general,\n configLoaded: state => state.config.consts.statuses.length > 0,\n layout: state => state.config.layout,\n statuses: state => state.config.consts.statuses,\n indexers: state => state.config.indexers,\n system: state => state.config.system,\n gitRemoteBranches: state => state.config.system.gitRemoteBranches // We need the reactivity on this.\n\n }),\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapGetters)(['getStatus']),\n indexerDefault: {\n get() {\n const {\n general\n } = this;\n const {\n indexerDefault\n } = general;\n return indexerDefault || 0;\n },\n\n set(indexer) {\n // TODO: commit instead\n this.general.indexerDefault = indexer;\n }\n\n },\n\n indexerListOptions() {\n const {\n indexers\n } = this;\n const allIndexers = [{\n text: 'All Indexers',\n value: 0\n }];\n const indexerOptions = Object.values(indexers.indexers).map(indexer => ({\n value: indexer.id,\n text: indexer.name\n }));\n return [...allIndexers, ...indexerOptions];\n },\n\n datePresetOptions() {\n const {\n general\n } = this;\n const {\n datePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedDatePresets = datePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedDatePresets];\n },\n\n timePresetOptions() {\n const {\n general\n } = this;\n const {\n timePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedTimePresets = timePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedTimePresets];\n },\n\n availableThemesOptions() {\n const {\n general\n } = this;\n const {\n availableThemes\n } = general;\n\n if (!availableThemes) {\n return [];\n }\n\n return availableThemes.map(theme => ({\n value: theme.name,\n text: `${theme.name} (${theme.version})`\n }));\n },\n\n cpuPresetOptions() {\n const {\n system\n } = this;\n const {\n cpuPresets\n } = system;\n\n if (!cpuPresets) {\n return [];\n }\n\n return Object.keys(cpuPresets).map(key => ({\n value: key,\n text: key\n }));\n },\n\n defaultDeletedEpOptions() {\n const {\n general,\n getStatus\n } = this;\n let status = [];\n\n if (general.skipRemovedFiles) {\n status = ['skipped', 'ignored'].map(key => getStatus({\n key\n }));\n } else {\n // Get status objects, when skip removed files is enabled\n status = ['skipped', 'ignored', 'archived'].map(key => getStatus({\n key\n }));\n }\n\n if (status.every(x => x !== undefined)) {\n return status.map(status => ({\n text: status.name,\n value: status.value\n }));\n }\n\n return [];\n },\n\n githubRemoteBranchesOptions() {\n const {\n general,\n githubBranches,\n githubBranchForceUpdate,\n gitRemoteBranches\n } = this;\n const {\n username,\n password,\n token\n } = general.git;\n\n if (!gitRemoteBranches.length > 0) {\n githubBranchForceUpdate();\n }\n\n let filteredBranches = [];\n\n if ((username && password || token) && general.developer) {\n filteredBranches = githubBranches;\n } else if (username && password || token) {\n filteredBranches = githubBranches.filter(branch => ['master', 'develop'].includes(branch));\n } else {\n filteredBranches = githubBranches.filter(branch => ['master'].includes(branch));\n }\n\n return filteredBranches.map(branch => ({\n text: branch,\n value: branch\n }));\n },\n\n githubBranches() {\n const {\n githubBranchesForced,\n gitRemoteBranches\n } = this;\n return gitRemoteBranches || githubBranchesForced;\n },\n\n githubTokenPopover() {\n const {\n general\n } = this;\n return '

Copy the generated token and paste it in the token input box.

' + `

` + '


';\n }\n\n },\n methods: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapActions)({\n setConfig: 'setConfig',\n setTheme: 'setTheme',\n getApiKey: 'getApiKey',\n setLayoutShow: 'setLayoutShow'\n }),\n\n async githubBranchForceUpdate() {\n const response = await (0,_api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute)('home/branchForceUpdate');\n\n if (response.data._size > 0) {\n this.githubBranchesForced = response.data.resetBranches;\n }\n },\n\n async generateApiKey() {\n const {\n getApiKey,\n save\n } = this;\n\n try {\n await getApiKey();\n this.$snotify.success('Saving and reloading the page, to utilize the new api key', 'Warning', {\n timeout: 5000\n });\n setTimeout(() => {\n // Save the new apiKey. No choice to reload because of /src/api.js\n save();\n }, 500);\n setTimeout(() => {\n // For now we reload the page since the layouts use python still\n location.reload();\n }, 500);\n } catch (error) {\n this.$snotify.error('Error while trying to get a new api key', `Error: ${error}`);\n }\n },\n\n async changeTheme(themeName) {\n const {\n setTheme\n } = this;\n\n try {\n await setTheme({\n themeName\n });\n this.$snotify.success('Saving and reloading the page', 'Saving', {\n timeout: 5000\n });\n setTimeout(() => {\n // Reload the page as we need to reload static content.\n (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.forceBrowserReload)();\n }, 1000);\n } catch (error) {\n this.$snotify.error('Error while trying to change the theme', `Error: ${error}`);\n }\n },\n\n async save() {\n const {\n general,\n layout,\n setConfig\n } = this; // Disable the save button until we're done.\n\n this.saving = true;\n const {\n availableThemes,\n backlogOverview,\n datePresets,\n loggingLevels,\n logs,\n timePresets,\n randomShowSlug,\n recentShows,\n themeName,\n ...filteredConfig\n } = general;\n const {\n local,\n ...filteredLayout\n } = layout;\n const configMain = {\n section: 'main',\n config: { ...filteredConfig,\n ...{\n layout: filteredLayout\n },\n ...{\n logs: {\n debug: general.logs.debug,\n dbDebug: general.logs.dbDebug,\n actualLogDir: general.logs.actualLogDir,\n nr: general.logs.nr,\n size: general.logs.size,\n subliminalLog: general.logs.subliminalLog,\n privacyLevel: general.logs.privacyLevel\n }\n }\n }\n };\n\n try {\n await setConfig(configMain);\n this.$snotify.success('Saved general config', 'Saved', {\n timeout: 5000\n });\n } catch (error) {\n this.$snotify.error('Error while trying to save general config', `Error: ${error}`);\n } finally {\n this.saving = false;\n }\n },\n\n saveShowListOrder(value) {\n const {\n layout,\n setLayoutShow\n } = this;\n const mergedShowLayout = { ...layout.show,\n ...{\n showListOrder: value.map(item => item.value)\n }\n };\n setLayoutShow(mergedShowLayout);\n },\n\n async compareDBUpgrade() {\n const {\n checkoutBranch,\n selectedBranch\n } = this;\n\n try {\n this.checkoutBranchMessage = 'Checking if the checkout requires a database upgrade / downgrade';\n const result = await _api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('home/getDBcompare');\n\n if (result.data.status === 'success') {\n if (result.data.message === 'equal') {\n // Checkout Branch\n checkoutBranch();\n }\n\n if (result.data.message === 'upgrade') {\n this.$modal.show('query-upgrade-database', {\n selectedBranch\n });\n }\n\n if (result.data.message === 'downgrade') {\n this.$snotify.error('Can\\'t switch branch as this will result in a database downgrade.', 'Error');\n }\n } else {\n this.$snotify.error('Error while trying to compare db versions for checkout', `Error: ${result.data.status}`);\n }\n } catch (error) {\n console.log(error);\n }\n },\n\n /**\n * Validate if we need a compareDb, or directly checkout.\n *\n * If whe're running a master or develop branch, we check for database changes.\n * This to prepare the user, by showing a few modals.\n * If the user is running another branch like, a feature branch. We asume the user knows what he's doing.\n *\n */\n validateCheckoutBranch() {\n const {\n compareDBUpgrade,\n selectedBranch\n } = this;\n\n if (!selectedBranch) {\n return;\n }\n\n compareDBUpgrade();\n },\n\n async checkoutBranch() {\n const {\n selectedBranch\n } = this;\n this.checkoutBranchMessage = `Checking out branch ${selectedBranch}`;\n await _api_js__WEBPACK_IMPORTED_MODULE_0__.api.post('system/operation', {\n type: 'CHECKOUT_BRANCH',\n branch: selectedBranch\n }, {\n timeout: 120000\n });\n this.checkoutBranchMessage = `Finished checking out branch ${selectedBranch}`;\n setTimeout(() => {\n this.checkoutBranchMessage = '';\n }, 4000);\n this.$modal.show('query-restart');\n },\n\n cancelCheckout() {\n this.checkoutBranchMessage = '';\n }\n\n }\n});\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-1%5B0%5D.rules%5B0%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -1327,7 +1327,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../api */ \"./src/api.js\");\n/* harmony import */ var _mutation_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mutation-types */ \"./src/store/mutation-types.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/core */ \"./src/utils/core.js\");\n\n\n\nconst state = {\n wikiUrl: null,\n donationsUrl: null,\n namingForceFolders: null,\n sourceUrl: null,\n downloadUrl: null,\n rootDirs: [],\n subtitles: {\n enabled: null\n },\n logs: {\n debug: null,\n dbDebug: null,\n loggingLevels: {},\n numErrors: null,\n numWarnings: null,\n actualLogDir: null,\n nr: null,\n size: null,\n subliminalLog: null,\n privacyLevel: null,\n custom: {}\n },\n cpuPreset: null,\n subtitlesMulti: null,\n anonRedirect: null,\n recentShows: [],\n randomShowSlug: null,\n // @TODO: Recreate this in Vue when the webapp has a reliable list of shows to choose from.\n showDefaults: {\n status: null,\n statusAfter: null,\n quality: null,\n subtitles: null,\n seasonFolders: null,\n anime: null,\n scene: null,\n showLists: null\n },\n launchBrowser: null,\n defaultPage: null,\n trashRemoveShow: null,\n indexerDefaultLanguage: null,\n showUpdateHour: null,\n indexerTimeout: null,\n indexerDefault: null,\n plexFallBack: {\n enable: null,\n notifications: null,\n timeout: null\n },\n versionNotify: null,\n autoUpdate: null,\n updateFrequency: null,\n notifyOnUpdate: null,\n availableThemes: null,\n timePresets: [],\n datePresets: [],\n webInterface: {\n apiKey: null,\n log: null,\n username: null,\n password: null,\n port: null,\n notifyOnLogin: null,\n ipv6: null,\n httpsEnable: null,\n httpsCert: null,\n httpsKey: null,\n handleReverseProxy: null\n },\n sslVerify: null,\n sslCaBundle: null,\n noRestart: null,\n encryptionVersion: null,\n calendarUnprotected: null,\n calendarIcons: null,\n proxySetting: null,\n proxyIndexers: null,\n skipRemovedFiles: null,\n epDefaultDeletedStatus: null,\n developer: null,\n git: {\n username: null,\n password: null,\n token: null,\n authType: null,\n remote: null,\n path: null,\n org: null,\n reset: null,\n resetBranches: null,\n url: null\n },\n // Remove backlogOverview after manage_backlogOverview.mako is gone.\n backlogOverview: {\n status: null,\n period: null\n },\n // Remove themeName when we get fully rid of MEDUSA.config.\n themeName: null\n};\nconst mutations = {\n [_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG](state, {\n section,\n config\n }) {\n if (section === 'main') {\n state = Object.assign(state, config);\n }\n },\n\n addRecentShow(state, {\n show\n }) {\n state.recentShows = state.recentShows.filter(filterShow => !(filterShow.indexerName === show.indexerName && filterShow.showId === show.showId && filterShow.name === show.name));\n state.recentShows.unshift(show); // Add the new show object to the start of the array.\n\n state.recentShows = state.recentShows.slice(0, 5); // Cut the array of at 5 items.\n }\n\n};\nconst getters = {\n effectiveIgnored: (state, _, rootState) => series => {\n const seriesIgnored = series.config.release.ignoredWords.map(x => x.toLowerCase());\n const globalIgnored = rootState.config.search.filters.ignored.map(x => x.toLowerCase());\n\n if (!series.config.release.ignoredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalIgnored.concat(seriesIgnored));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalIgnored, seriesIgnored);\n },\n effectiveRequired: (state, _, rootState) => series => {\n const seriesRequired = series.config.release.requiredWords.map(x => x.toLowerCase());\n const globalRequired = rootState.config.search.filters.required.map(x => x.toLowerCase());\n\n if (!series.config.release.requiredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalRequired.concat(seriesRequired));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalRequired, seriesRequired);\n }\n};\nconst actions = {\n getConfig(context, section) {\n const {\n commit\n } = context;\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.get('/config/' + (section || '')).then(res => {\n if (section) {\n const config = res.data;\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n return config;\n }\n\n const sections = res.data;\n Object.keys(sections).forEach(section => {\n const config = sections[section];\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n return sections;\n });\n },\n\n setConfig(context, {\n section,\n config\n }) {\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch(`config/${section}`, config);\n },\n\n updateConfig(context, {\n section,\n config\n }) {\n const {\n commit\n } = context;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n },\n\n getApiKey(context) {\n const {\n commit\n } = context;\n const section = 'main';\n const config = {\n webInterface: {\n apiKey: ''\n }\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('config/general/generate_api_key').then(response => {\n config.webInterface.apiKey = response.data;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n },\n\n setRecentShow({\n commit,\n state\n }, show) {\n commit('addRecentShow', {\n show\n });\n const config = {\n recentShows: state.recentShows\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', config);\n },\n\n setCustomLogs({\n commit\n }, logs) {\n // Convert back to object.\n const reducedLogs = logs.reduce((obj, item) => ({ ...obj,\n [item.identifier]: item.level\n }), {});\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', {\n logs: {\n custom: logs\n }\n }).then(() => {\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section: 'main',\n config: {\n logs: {\n custom: reducedLogs\n }\n }\n });\n });\n }\n\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n state,\n mutations,\n getters,\n actions\n});\n\n//# sourceURL=webpack://slim/./src/store/modules/config/general.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../api */ \"./src/api.js\");\n/* harmony import */ var _mutation_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mutation-types */ \"./src/store/mutation-types.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/core */ \"./src/utils/core.js\");\n\n\n\nconst state = {\n wikiUrl: null,\n donationsUrl: null,\n namingForceFolders: null,\n sourceUrl: null,\n downloadUrl: null,\n rootDirs: [],\n subtitles: {\n enabled: null\n },\n logs: {\n debug: null,\n dbDebug: null,\n loggingLevels: {},\n numErrors: null,\n numWarnings: null,\n actualLogDir: null,\n nr: null,\n size: null,\n subliminalLog: null,\n privacyLevel: null,\n custom: {}\n },\n cpuPreset: null,\n subtitlesMulti: null,\n anonRedirect: null,\n recentShows: [],\n randomShowSlug: null,\n // @TODO: Recreate this in Vue when the webapp has a reliable list of shows to choose from.\n showDefaults: {\n status: null,\n statusAfter: null,\n quality: null,\n subtitles: null,\n seasonFolders: null,\n anime: null,\n scene: null,\n showLists: null\n },\n launchBrowser: null,\n defaultPage: null,\n trashRemoveShow: null,\n indexerDefaultLanguage: null,\n showUpdateHour: null,\n indexerTimeout: null,\n indexerDefault: null,\n plexFallBack: {\n enable: null,\n notifications: null,\n timeout: null\n },\n versionNotify: null,\n autoUpdate: null,\n updateFrequency: null,\n notifyOnUpdate: null,\n availableThemes: null,\n timePresets: [],\n datePresets: [],\n webInterface: {\n apiKey: null,\n log: null,\n username: null,\n password: null,\n port: null,\n notifyOnLogin: null,\n ipv6: null,\n httpsEnable: null,\n httpsCert: null,\n httpsKey: null,\n handleReverseProxy: null\n },\n sslVerify: null,\n sslCaBundle: null,\n noRestart: null,\n encryptionVersion: null,\n calendarUnprotected: null,\n calendarIcons: null,\n proxySetting: null,\n proxyProviders: null,\n proxyClients: null,\n proxyIndexers: null,\n proxyOthers: null,\n skipRemovedFiles: null,\n epDefaultDeletedStatus: null,\n developer: null,\n git: {\n username: null,\n password: null,\n token: null,\n authType: null,\n remote: null,\n path: null,\n org: null,\n reset: null,\n resetBranches: null,\n url: null\n },\n // Remove backlogOverview after manage_backlogOverview.mako is gone.\n backlogOverview: {\n status: null,\n period: null\n },\n // Remove themeName when we get fully rid of MEDUSA.config.\n themeName: null\n};\nconst mutations = {\n [_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG](state, {\n section,\n config\n }) {\n if (section === 'main') {\n state = Object.assign(state, config);\n }\n },\n\n addRecentShow(state, {\n show\n }) {\n state.recentShows = state.recentShows.filter(filterShow => !(filterShow.indexerName === show.indexerName && filterShow.showId === show.showId && filterShow.name === show.name));\n state.recentShows.unshift(show); // Add the new show object to the start of the array.\n\n state.recentShows = state.recentShows.slice(0, 5); // Cut the array of at 5 items.\n }\n\n};\nconst getters = {\n effectiveIgnored: (state, _, rootState) => series => {\n const seriesIgnored = series.config.release.ignoredWords.map(x => x.toLowerCase());\n const globalIgnored = rootState.config.search.filters.ignored.map(x => x.toLowerCase());\n\n if (!series.config.release.ignoredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalIgnored.concat(seriesIgnored));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalIgnored, seriesIgnored);\n },\n effectiveRequired: (state, _, rootState) => series => {\n const seriesRequired = series.config.release.requiredWords.map(x => x.toLowerCase());\n const globalRequired = rootState.config.search.filters.required.map(x => x.toLowerCase());\n\n if (!series.config.release.requiredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalRequired.concat(seriesRequired));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalRequired, seriesRequired);\n }\n};\nconst actions = {\n getConfig(context, section) {\n const {\n commit\n } = context;\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.get('/config/' + (section || '')).then(res => {\n if (section) {\n const config = res.data;\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n return config;\n }\n\n const sections = res.data;\n Object.keys(sections).forEach(section => {\n const config = sections[section];\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n return sections;\n });\n },\n\n setConfig(context, {\n section,\n config\n }) {\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch(`config/${section}`, config);\n },\n\n updateConfig(context, {\n section,\n config\n }) {\n const {\n commit\n } = context;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n },\n\n getApiKey(context) {\n const {\n commit\n } = context;\n const section = 'main';\n const config = {\n webInterface: {\n apiKey: ''\n }\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('config/general/generate_api_key').then(response => {\n config.webInterface.apiKey = response.data;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n },\n\n setRecentShow({\n commit,\n state\n }, show) {\n commit('addRecentShow', {\n show\n });\n const config = {\n recentShows: state.recentShows\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', config);\n },\n\n setCustomLogs({\n commit\n }, logs) {\n // Convert back to object.\n const reducedLogs = logs.reduce((obj, item) => ({ ...obj,\n [item.identifier]: item.level\n }), {});\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', {\n logs: {\n custom: logs\n }\n }).then(() => {\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section: 'main',\n config: {\n logs: {\n custom: reducedLogs\n }\n }\n });\n });\n }\n\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n state,\n mutations,\n getters,\n actions\n});\n\n//# sourceURL=webpack://slim/./src/store/modules/config/general.js?"); /***/ }), @@ -6277,7 +6277,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"config-genaral\" } },\n [\n _c(\"div\", { attrs: { id: \"config-content\" } }, [\n _c(\n \"form\",\n {\n attrs: { id: \"configForm\", method: \"post\" },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.save()\n }\n }\n },\n [\n _c(\"div\", { attrs: { id: \"config-components\" } }, [\n _c(\"ul\", [\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#misc\" } }, [\n _vm._v(\"Misc\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#interface\" } }, [\n _vm._v(\"Interface\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#advanced-settings\" } }, [\n _vm._v(\"Advanced Settings\")\n ])\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"misc\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Launch browser\",\n id: \"launch_browser\"\n },\n model: {\n value: _vm.general.launchBrowser,\n callback: function($$v) {\n _vm.$set(_vm.general, \"launchBrowser\", $$v)\n },\n expression: \"general.launchBrowser\"\n }\n },\n [\n _c(\"span\", [\n _vm._v(\"open the Medusa home page on startup\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"default_page\",\n label: \"Initial page\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.defaultPage,\n expression: \"general.defaultPage\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"default_page\",\n name: \"default_page\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"defaultPage\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.defaultPageOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"when launching Medusa interface\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"trash_remove_show\",\n label: \"Send to trash for actions\"\n }\n },\n [\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_remove_show\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_remove_show\",\n name: \"trash_remove_show\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRemoveShow,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRemoveShow\",\n $$v\n )\n },\n expression: \"general.trashRemoveShow\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'when using show \"Remove\" and delete files'\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_rotate_logs\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_rotate_logs\",\n name: \"trash_rotate_logs\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRotateLogs,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRotateLogs\",\n $$v\n )\n },\n expression: \"general.trashRotateLogs\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"on scheduled deletes of the oldest log files\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"selected actions use trash (recycle bin) instead of the default permanent delete\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-textbox\", {\n attrs: {\n label: \"Location for Log files\",\n id: \"log_id\"\n },\n on: {\n change: function($event) {\n return _vm.save()\n }\n },\n model: {\n value: _vm.general.logs.actualLogDir,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"actualLogDir\", $$v)\n },\n expression: \"general.logs.actualLogDir\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Number of Log files saved\",\n id: \"log_nr\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.logs.nr,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"nr\", $$v)\n },\n expression: \"general.logs.nr\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"number of log files saved when rotating logs (default: 5) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Size of Log files saved\",\n id: \"log_size\",\n min: 0.5,\n step: 0.1\n },\n model: {\n value: _vm.general.logs.size,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"size\", $$v)\n },\n expression: \"general.logs.size\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"maximum size in MB of the log file (default: 1MB) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Show root directories\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"where the files of shows are located\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"These changes are automatically saved!\")\n ]),\n _vm._v(\" \"),\n _c(\"root-dirs\")\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(1),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Default Indexer Language\"\n }\n },\n [\n _c(\"language-select\", {\n ref: \"indexerLanguage\",\n staticClass:\n \"form-control form-control-inline input-sm\",\n attrs: {\n language: _vm.general.indexerDefaultLanguage,\n available: _vm.indexers.main.validLanguages.join(\n \",\"\n )\n },\n on: {\n \"update-language\": function($event) {\n _vm.general.indexerDefaultLanguage = $event\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"for adding shows and metadata providers\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Choose hour to update shows\",\n id: \"showupdate_hour\",\n min: 0,\n max: 23,\n step: 1\n },\n model: {\n value: _vm.general.showUpdateHour,\n callback: function($$v) {\n _vm.$set(_vm.general, \"showUpdateHour\", $$v)\n },\n expression: \"general.showUpdateHour\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" minutes are randomized each time Medusa is started\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"indexer_timeout\",\n min: 10,\n step: 1\n },\n model: {\n value: _vm.general.indexerTimeout,\n callback: function($$v) {\n _vm.$set(_vm.general, \"indexerTimeout\", $$v)\n },\n expression: \"general.indexerTimeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"seconds of inactivity when finding new shows (default:20)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"indexer_default\",\n label: \"Use initial indexer set to\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.indexerDefault,\n expression: \"indexerDefault\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"indexer_default\",\n name: \"indexer_default\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.indexerDefault = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.indexerListOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback to plex\",\n id: \"fallback_plex_enable\"\n },\n model: {\n value: _vm.general.plexFallBack.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"enable\",\n $$v\n )\n },\n expression: \"general.plexFallBack.enable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Plex provides a tvdb mirror, that can be utilized when Tvdb's api is unavailable.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback notifications\",\n id: \"fallback_plex_notifications\"\n },\n model: {\n value: _vm.general.plexFallBack.notifications,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"notifications\",\n $$v\n )\n },\n expression: \"general.plexFallBack.notifications\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"When this settings has been enabled, you may receive frequent notifications when falling back to the plex mirror.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"Fallback duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.plexFallBack.timeout,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"timeout\",\n $$v\n )\n },\n expression: \"general.plexFallBack.timeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Amount of hours after we try to revert back to the thetvdb.com api url (default:3).\"\n )\n ])\n ]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(2),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Check software updates\",\n id: \"version_notify\"\n },\n model: {\n value: _vm.general.versionNotify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"versionNotify\", $$v)\n },\n expression: \"general.versionNotify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"and display notifications when updates are available.\\n Checks are run on startup and at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Automatically update\",\n id: \"auto_update\"\n },\n model: {\n value: _vm.general.autoUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"autoUpdate\", $$v)\n },\n expression: \"general.autoUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"fetch and install software updates.\\n Updates are run on startup and in the background at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Check the server every*\",\n id: \"update_frequency duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.updateFrequency,\n callback: function($$v) {\n _vm.$set(_vm.general, \"updateFrequency\", $$v)\n },\n expression: \"general.updateFrequency\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"hours for software updates (default:1)\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on software update\",\n id: \"notify_on_update\"\n },\n model: {\n value: _vm.general.notifyOnUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"notifyOnUpdate\", $$v)\n },\n expression: \"general.notifyOnUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"send a message to all enabled notifiers when Medusa has been updated\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: {\n type: \"submit\",\n value: \"Save Changes\",\n disabled: _vm.saving\n }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"interface\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(3),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"theme_name\",\n label: \"Display theme\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.themeName,\n expression: \"layout.themeName\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: { id: \"theme_name\", name: \"theme_name\" },\n on: {\n change: [\n function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(\n o\n ) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"themeName\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n },\n function($event) {\n return _vm.changeTheme(\n _vm.layout.themeName\n )\n }\n ]\n }\n },\n _vm._l(_vm.availableThemesOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use wider layout\",\n id: \"layout_wide\"\n },\n model: {\n value: _vm.layout.wide,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"wide\", $$v)\n },\n expression: \"layout.wide\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"uses all available space in the page\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Show fanart in the background\",\n id: \"fanart_background\"\n },\n model: {\n value: _vm.layout.fanartBackground,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fanartBackground\", $$v)\n },\n expression: \"layout.fanartBackground\"\n }\n },\n [_c(\"p\", [_vm._v(\"on the show summary page\")])]\n ),\n _vm._v(\" \"),\n _vm.layout.fanartBackground\n ? _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Fanart transparency\",\n id: \"fanart_background_opacity duration\",\n step: 0.1,\n min: 0.1,\n max: 1.0\n },\n model: {\n value: _vm.layout.fanartBackgroundOpacity,\n callback: function($$v) {\n _vm.$set(\n _vm.layout,\n \"fanartBackgroundOpacity\",\n $$v\n )\n },\n expression: \"layout.fanartBackgroundOpacity\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Transparency of the fanart in the background\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Sort with 'The' 'A', 'An'\",\n id: \"sort_article\"\n },\n model: {\n value: _vm.layout.sortArticle,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"sortArticle\", $$v)\n },\n expression: \"layout.sortArticle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'include articles (\"The\", \"A\", \"An\") when sorting show lists'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_list_order\",\n label: \"show lists\"\n }\n },\n [\n _c(\"sorted-select-list\", {\n attrs: {\n \"list-items\": _vm.layout.show.showListOrder\n },\n on: { change: _vm.saveShowListOrder }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Create and order different categories for your shows.\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Split home in tabs\",\n id: \"split_home_in_tabs\"\n },\n model: {\n value: _vm.layout.splitHomeInTabs,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"splitHomeInTabs\", $$v)\n },\n expression: \"layout.splitHomeInTabs\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"Use tabs when splitting show lists\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Missed episodes range\",\n id: \"coming_eps_missed_range duration\",\n step: 1,\n min: 7\n },\n model: {\n value: _vm.layout.comingEps.missedRange,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.comingEps,\n \"missedRange\",\n $$v\n )\n },\n expression: \"layout.comingEps.missedRange\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set the range in days of the missed episodes in the Schedule page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Display fuzzy dates\",\n id: \"fuzzy_dating\"\n },\n model: {\n value: _vm.layout.fuzzyDating,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fuzzyDating\", $$v)\n },\n expression: \"layout.fuzzyDating\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'move absolute dates into tooltips and display e.g. \"Last Thu\", \"On Tue\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Trim zero padding\",\n id: \"trim_zero\"\n },\n model: {\n value: _vm.layout.trimZero,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"trimZero\", $$v)\n },\n expression: \"layout.trimZero\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'remove the leading number \"0\" shown on hour of day, and date of month'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_preset\",\n label: \"Date style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.dateStyle,\n expression: \"layout.dateStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"date_preset\",\n name: \"date_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"dateStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.datePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"time_preset\",\n label: \"Time style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timeStyle,\n expression: \"layout.timeStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"time_preset\",\n name: \"time_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"timeStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.timePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" seconds are only shown on the History page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"timezone_display\",\n label: \"Timezone\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_local\",\n id: \"timezone_display_local\",\n value: \"local\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"local\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"local\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"local\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_network\",\n id: \"timezone_display_network\",\n value: \"network\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"network\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"network\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"network\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"display dates and times in either your timezone or the shows network timezone\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Use local timezone to start searching for episodes minutes after show ends (depends on your dailysearch frequency)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Download url\",\n id: \"download_url\"\n },\n model: {\n value: _vm.general.downloadUrl,\n callback: function($$v) {\n _vm.$set(_vm.general, \"downloadUrl\", $$v)\n },\n expression: \"general.downloadUrl\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"URL where the shows can be downloaded.\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-toggle-slider\", {\n attrs: {\n label: \"Use table pagination\",\n id: \"show_pagination\"\n },\n model: {\n value: _vm.layout.show.pagination.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.show.pagination,\n \"enable\",\n $$v\n )\n },\n expression: \"layout.show.pagination.enable\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(4),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"API key\",\n id: \"api_key\",\n readonly: \"readonly\"\n },\n model: {\n value: _vm.general.webInterface.apiKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"apiKey\",\n $$v\n )\n },\n expression: \"general.webInterface.apiKey\"\n }\n },\n [\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"generate_new_apikey\",\n value: \"Generate\"\n },\n on: { click: _vm.generateApiKey }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"used to give 3rd party programs limited access to Medusa\"\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"p\",\n [\n _vm._v(\n \"you can try all the features of the legacy API (v1) \"\n ),\n _c(\n \"app-link\",\n { attrs: { href: \"apibuilder/\" } },\n [_vm._v(\"here\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"HTTP logs\", id: \"web_log\" },\n model: {\n value: _vm.general.webInterface.log,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"log\", $$v)\n },\n expression: \"general.webInterface.log\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from the internal Tornado web server\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP username\",\n id: \"web_username\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.username,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"username\",\n $$v\n )\n },\n expression: \"general.webInterface.username\"\n }\n },\n [_c(\"p\", [_vm._v(\"set blank for no login\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP password\",\n id: \"web_password\",\n type: \"password\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.password,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"password\",\n $$v\n )\n },\n expression: \"general.webInterface.password\"\n }\n },\n [_c(\"p\", [_vm._v(\"blank = no authentication\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"HTTP port\",\n id: \"web_port\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.webInterface.port,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"port\", $$v)\n },\n expression: \"general.webInterface.port\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"web port to browse and access Medusa (default:8081)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on login\",\n id: \"notify_on_login\"\n },\n model: {\n value: _vm.general.webInterface.notifyOnLogin,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"notifyOnLogin\",\n $$v\n )\n },\n expression: \"general.webInterface.notifyOnLogin\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Listen on IPv6\", id: \"web_ipv6\" },\n model: {\n value: _vm.general.webInterface.ipv6,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"ipv6\", $$v)\n },\n expression: \"general.webInterface.ipv6\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable HTTPS\",\n id: \"enable_https\"\n },\n model: {\n value: _vm.general.webInterface.httpsEnable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsEnable\",\n $$v\n )\n },\n expression: \"general.webInterface.httpsEnable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable access to the web interface using a HTTPS address\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.webInterface.httpsEnable\n ? _c(\n \"div\",\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS certificate\",\n id: \"https_cert\"\n },\n model: {\n value: _vm.general.webInterface.httpsCert,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsCert\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsCert\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"file name or path to HTTPS certificate\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS key\",\n id: \"https_key\"\n },\n model: {\n value: _vm.general.webInterface.httpsKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsKey\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsKey\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"file name or path to HTTPS key\")\n ])\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Reverse proxy headers\",\n id: \"handle_reverse_proxy\"\n },\n model: {\n value:\n _vm.general.webInterface.handleReverseProxy,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"handleReverseProxy\",\n $$v\n )\n },\n expression:\n \"general.webInterface.handleReverseProxy\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"accept the following reverse proxy headers (advanced)...\"\n ),\n _c(\"br\"),\n _vm._v(\n \"(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP web root\",\n id: \"web_root\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webRoot,\n callback: function($$v) {\n _vm.$set(_vm.general, \"webRoot\", $$v)\n },\n expression: \"general.webRoot\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set a base URL, for use in reverse proxies.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"blank = disabled\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Must restart to have effect. Keep in mind that any previously configured base URLs won't work, after this change.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"advanced-settings\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(5),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"cpu_presets\",\n label: \"CPU throttling\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.cpuPreset,\n expression: \"general.cpuPreset\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"cpu_presets\",\n name: \"cpu_presets\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"cpuPreset\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.cpuPresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Normal (default). High is lower and Low is higher CPU use\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Anonymous redirect\",\n id: \"anon_redirect\"\n },\n model: {\n value: _vm.general.anonRedirect,\n callback: function($$v) {\n _vm.$set(_vm.general, \"anonRedirect\", $$v)\n },\n expression: \"general.anonRedirect\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'backlink protection via anonymizer service, must end in \"?\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Verify SSL Certs\",\n id: \"ssl_verify\"\n },\n model: {\n value: _vm.general.sslVerify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslVerify\", $$v)\n },\n expression: \"general.sslVerify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Verify SSL Certificates (Disable this for broken SSL installs (Like QNAP))\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"SSL CA Bundle\",\n id: \"ssl_ca_bundle\"\n },\n model: {\n value: _vm.general.sslCaBundle,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslCaBundle\", $$v)\n },\n expression: \"general.sslCaBundle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Path to an SSL CA Bundle. Will replace default bundle(certifi) with the one specified.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This only apply to call made using Medusa's Requests implementation.\\n \"\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"No Restart\", id: \"no_restart\" },\n model: {\n value: _vm.general.noRestart,\n callback: function($$v) {\n _vm.$set(_vm.general, \"noRestart\", $$v)\n },\n expression: \"general.noRestart\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Only shutdown when restarting Medusa.\\n Only select this when you have external software restarting Medusa automatically when it stops (like FireDaemon)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Encrypt passwords\",\n id: \"encryption_version\"\n },\n model: {\n value: _vm.general.encryptionVersion,\n callback: function($$v) {\n _vm.$set(_vm.general, \"encryptionVersion\", $$v)\n },\n expression: \"general.encryptionVersion\"\n }\n },\n [\n _c(\n \"p\",\n [\n _vm._v(\"in the \"),\n _c(\"code\", [_vm._v(\"config.ini\")]),\n _vm._v(\n \" file.\\n \"\n ),\n _c(\"b\", [_vm._v(\"Warning:\")]),\n _vm._v(\" Passwords must only contain \"),\n _c(\n \"app-link\",\n {\n attrs: {\n href:\n \"https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters\"\n }\n },\n [_vm._v(\"ASCII characters\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Unprotected calendar\",\n id: \"calendar_unprotected\"\n },\n model: {\n value: _vm.general.calendarUnprotected,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"calendarUnprotected\",\n $$v\n )\n },\n expression: \"general.calendarUnprotected\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"allow subscribing to the calendar without user and password.\\n Some services like Google Calendar only work this way\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Google Calendar Icons\",\n id: \"calendar_icons\"\n },\n model: {\n value: _vm.general.calendarIcons,\n callback: function($$v) {\n _vm.$set(_vm.general, \"calendarIcons\", $$v)\n },\n expression: \"general.calendarIcons\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"show an icon next to exported calendar events in Google Calendar.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: { label: \"Proxy host\", id: \"proxy_setting\" },\n model: {\n value: _vm.general.proxySetting,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxySetting\", $$v)\n },\n expression: \"general.proxySetting\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"blank to disable or proxy to use when connecting to providers\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for indexers\",\n id: \"proxy_indexers\"\n },\n model: {\n value: _vm.general.proxyIndexers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyIndexers\", $$v)\n },\n expression: \"general.proxyIndexers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to indexers (thetvdb)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Skip Remove Detection\",\n id: \"skip_removed_files\"\n },\n model: {\n value: _vm.general.skipRemovedFiles,\n callback: function($$v) {\n _vm.$set(_vm.general, \"skipRemovedFiles\", $$v)\n },\n expression: \"general.skipRemovedFiles\"\n }\n },\n [\n _c(\"span\", [\n _c(\"p\", [\n _vm._v(\n \"Skip detection of removed files. If disabled the episode will be set to the default deleted status\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This may mean Medusa misses renames as well\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"ep_default_deleted_status\",\n label: \"Default deleted episode status\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.epDefaultDeletedStatus,\n expression: \"general.epDefaultDeletedStatus\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"ep_default_deleted_status\",\n name: \"ep_default_deleted_status\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"epDefaultDeletedStatus\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a default status\")]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.defaultDeletedEpOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n })\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Define the status to be set for media file that has been deleted.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Archived option will keep previous downloaded quality\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Example: Downloaded (1080p WEB-DL) ==> Archived (1080p WEB-DL)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(6),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Enable debug\", id: \"debug\" },\n model: {\n value: _vm.general.logs.debug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"debug\", $$v)\n },\n expression: \"general.logs.debug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable debug logs\")])]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable DB debug\",\n id: \"dbdebug\"\n },\n model: {\n value: _vm.general.logs.dbDebug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"dbDebug\", $$v)\n },\n expression: \"general.logs.dbDebug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable DB debug logs\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Subliminal logs\",\n id: \"subliminal_log\"\n },\n model: {\n value: _vm.general.logs.subliminalLog,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"subliminalLog\", $$v)\n },\n expression: \"general.logs.subliminalLog\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from subliminal library (subtitles)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"privacy_level\",\n label: \"Privacy\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.logs.privacyLevel,\n expression: \"general.logs.privacyLevel\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"privacy_level\",\n name: \"privacy_level\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general.logs,\n \"privacyLevel\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.privacyLevelOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"\\n Set the level of log-filtering.\\n Normal (default).\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"custom_logs\",\n label:\n \"Overwrite log levels for overwritable logs\"\n }\n },\n [_c(\"custom-logs\")],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(7),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"github_remote_branches\",\n label: \"Branch version\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedBranch,\n expression: \"selectedBranch\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"github_remote_branches\",\n name: \"github_remote_branches\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedBranch = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a branch\")]\n ),\n _vm._v(\" \"),\n _vm._l(\n _vm.githubRemoteBranchesOptions,\n function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }\n )\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n disabled: !_vm.githubBranches.length > 0,\n type: \"button\",\n id: \"branchCheckout\",\n value: \"Checkout Branch\"\n },\n on: { click: _vm.validateCheckoutBranch }\n }),\n _vm._v(\" \"),\n !_vm.githubBranches.length > 0\n ? _c(\n \"span\",\n { staticStyle: { color: \"rgb(255, 0, 0)\" } },\n [\n _c(\"p\", [\n _vm._v(\"Error: No branches found.\")\n ])\n ]\n )\n : _c(\"p\", [\n _vm._v(\n \"select branch to use (restart required)\"\n )\n ]),\n _vm._v(\" \"),\n _vm.checkoutBranchMessage\n ? _c(\n \"p\",\n [\n _c(\"state-switch\", {\n attrs: {\n state: \"loading\",\n theme: _vm.layout.themeName\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(_vm._s(_vm.checkoutBranchMessage))\n ])\n ],\n 1\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_presets\",\n label: \"GitHub authentication type\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_basic\",\n id: \"git_auth_type_basic\"\n },\n domProps: {\n value: 0,\n checked: _vm._q(_vm.general.git.authType, 0)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 0\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Username and password\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_token\",\n id: \"git_auth_type_token\"\n },\n domProps: {\n value: 1,\n checked: _vm._q(_vm.general.git.authType, 1)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 1\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Personal access token\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'You must use a personal access token if you\\'re using \"two-factor authentication\" on GitHub.'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType === 0,\n expression: \"general.git.authType === 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub username\",\n id: \"git_username\"\n },\n model: {\n value: _vm.general.git.username,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"username\", $$v)\n },\n expression: \"general.git.username\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub password\",\n id: \"git_password\",\n type: \"password\"\n },\n model: {\n value: _vm.general.git.password,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"password\", $$v)\n },\n expression: \"general.git.password\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType !== 0,\n expression: \"general.git.authType !== 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub personal access token\",\n id: \"git_token\",\n \"input-class\":\n \"display-inline margin-bottom-5\"\n },\n nativeOn: {\n focus: function($event) {\n return $event.target.select()\n }\n },\n model: {\n value: _vm.general.git.token,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"token\", $$v)\n },\n expression: \"general.git.token\"\n }\n },\n [\n _vm.general.git.token === \"\"\n ? [\n _c(\n \"v-popover\",\n {\n attrs: {\n trigger: \"click\",\n offset: \"16\",\n placement: \"right\",\n popoverBaseClass: \"tooltip-base\",\n popoverClass:\n \"tooltip-themed\" +\n (_vm.layout.themeName === \"dark\"\n ? \"-dark\"\n : \"-light\")\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"create_access_token\",\n value: \"Generate Token\"\n }\n }),\n _vm._v(\" \"),\n _c(\"template\", { slot: \"popover\" }, [\n _c(\n \"div\",\n { staticClass: \"tooltip-title\" },\n [_vm._v(\"Github Token\")]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"tooltip-content\"\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Copy the generated token and paste it in the token input box.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general\n .anonRedirect ||\n \"\") +\n \"https://github.com/settings/tokens/new?description=Medusa&scopes=gist,public_repo\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa\",\n attrs: {\n type: \"button\",\n value:\n \"Continue to Github...\"\n }\n })\n ]\n )\n ]),\n _c(\"br\")\n ]\n )\n ])\n ],\n 2\n )\n ]\n : [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general.anonRedirect || \"\") +\n \"https://github.com/settings/tokens\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"manage_tokens\",\n value: \"Manage Tokens\"\n }\n })\n ]\n )\n ],\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ],\n 2\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub remote for branch\",\n id: \"git_remote\"\n },\n model: {\n value: _vm.general.git.remote,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"remote\", $$v)\n },\n expression: \"general.git.remote\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"default:origin. Access repo configured remotes (save then refresh browser)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Git executable path\",\n id: \"git_path\"\n },\n model: {\n value: _vm.general.git.path,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"path\", $$v)\n },\n expression: \"general.git.path\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"only needed if OS is unable to locate git from env\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Git reset\", id: \"git_reset\" },\n model: {\n value: _vm.general.git.reset,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"reset\", $$v)\n },\n expression: \"general.git.reset\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"removes untracked files and performs a hard reset on git branch automatically to help resolve update issues\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"git_reset_branches\",\n label: \"Branches to reset\"\n }\n },\n [\n _c(\"multiselect\", {\n attrs: {\n multiple: true,\n options: _vm.githubBranches\n },\n model: {\n value: _vm.general.git.resetBranches,\n callback: function($$v) {\n _vm.$set(\n _vm.general.git,\n \"resetBranches\",\n $$v\n )\n },\n expression: \"general.git.resetBranches\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n type: \"button\",\n id: \"branch_force_update\",\n value: \"Update Branches\"\n },\n on: { click: _vm.githubBranchForceUpdate }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Empty selection means that any branch could be reset.\"\n )\n ])\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\"h6\", { staticClass: \"pull-right\" }, [\n _c(\"b\", [\n _vm._v(\"All non-absolute folder locations are relative to \"),\n _c(\"span\", { staticClass: \"path\" }, [\n _vm._v(_vm._s(_vm.system.dataDir))\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa pull-left config_submitter button\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"modal\",\n {\n attrs: {\n name: \"query-upgrade-database\",\n height: \"auto\",\n width: \"80%\"\n }\n },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Upgrade database model?\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Changing branch will upgrade your database\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"You won't be able to downgrade afterward.\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Do you want to continue?\")])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-upgrade-database\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.checkoutBranch()\n _vm.$modal.hide(\"query-upgrade-database\")\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"modal\",\n { attrs: { name: \"query-restart\", height: \"auto\", width: \"80%\" } },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Checking out a branch requires a restart\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Would you like to start a restart of medusa now?\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.$router.push({ name: \"restart\" })\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Misc\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Startup options. Indexer options. Log and show file locations.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"Some options may require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Indexer\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for controlling the show indexers.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Updates\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for software updates.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"User Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for visual appearance.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Web Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"It is recommended that you enable a username and password to secure Medusa from being tampered with remotely.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"These options require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Advanced Settings\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Logging\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"GitHub\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for github related features.\")])\n ]\n )\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"config-genaral\" } },\n [\n _c(\"div\", { attrs: { id: \"config-content\" } }, [\n _c(\n \"form\",\n {\n attrs: { id: \"configForm\", method: \"post\" },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.save()\n }\n }\n },\n [\n _c(\"div\", { attrs: { id: \"config-components\" } }, [\n _c(\"ul\", [\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#misc\" } }, [\n _vm._v(\"Misc\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#interface\" } }, [\n _vm._v(\"Interface\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#advanced-settings\" } }, [\n _vm._v(\"Advanced Settings\")\n ])\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"misc\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Launch browser\",\n id: \"launch_browser\"\n },\n model: {\n value: _vm.general.launchBrowser,\n callback: function($$v) {\n _vm.$set(_vm.general, \"launchBrowser\", $$v)\n },\n expression: \"general.launchBrowser\"\n }\n },\n [\n _c(\"span\", [\n _vm._v(\"open the Medusa home page on startup\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"default_page\",\n label: \"Initial page\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.defaultPage,\n expression: \"general.defaultPage\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"default_page\",\n name: \"default_page\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"defaultPage\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.defaultPageOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"when launching Medusa interface\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"trash_remove_show\",\n label: \"Send to trash for actions\"\n }\n },\n [\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_remove_show\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_remove_show\",\n name: \"trash_remove_show\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRemoveShow,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRemoveShow\",\n $$v\n )\n },\n expression: \"general.trashRemoveShow\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'when using show \"Remove\" and delete files'\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_rotate_logs\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_rotate_logs\",\n name: \"trash_rotate_logs\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRotateLogs,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRotateLogs\",\n $$v\n )\n },\n expression: \"general.trashRotateLogs\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"on scheduled deletes of the oldest log files\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"selected actions use trash (recycle bin) instead of the default permanent delete\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-textbox\", {\n attrs: {\n label: \"Location for Log files\",\n id: \"log_id\"\n },\n on: {\n change: function($event) {\n return _vm.save()\n }\n },\n model: {\n value: _vm.general.logs.actualLogDir,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"actualLogDir\", $$v)\n },\n expression: \"general.logs.actualLogDir\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Number of Log files saved\",\n id: \"log_nr\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.logs.nr,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"nr\", $$v)\n },\n expression: \"general.logs.nr\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"number of log files saved when rotating logs (default: 5) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Size of Log files saved\",\n id: \"log_size\",\n min: 0.5,\n step: 0.1\n },\n model: {\n value: _vm.general.logs.size,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"size\", $$v)\n },\n expression: \"general.logs.size\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"maximum size in MB of the log file (default: 1MB) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Show root directories\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"where the files of shows are located\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"These changes are automatically saved!\")\n ]),\n _vm._v(\" \"),\n _c(\"root-dirs\")\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(1),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Default Indexer Language\"\n }\n },\n [\n _c(\"language-select\", {\n ref: \"indexerLanguage\",\n staticClass:\n \"form-control form-control-inline input-sm\",\n attrs: {\n language: _vm.general.indexerDefaultLanguage,\n available: _vm.indexers.main.validLanguages.join(\n \",\"\n )\n },\n on: {\n \"update-language\": function($event) {\n _vm.general.indexerDefaultLanguage = $event\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"for adding shows and metadata providers\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Choose hour to update shows\",\n id: \"showupdate_hour\",\n min: 0,\n max: 23,\n step: 1\n },\n model: {\n value: _vm.general.showUpdateHour,\n callback: function($$v) {\n _vm.$set(_vm.general, \"showUpdateHour\", $$v)\n },\n expression: \"general.showUpdateHour\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" minutes are randomized each time Medusa is started\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"indexer_timeout\",\n min: 10,\n step: 1\n },\n model: {\n value: _vm.general.indexerTimeout,\n callback: function($$v) {\n _vm.$set(_vm.general, \"indexerTimeout\", $$v)\n },\n expression: \"general.indexerTimeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"seconds of inactivity when finding new shows (default:20)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"indexer_default\",\n label: \"Use initial indexer set to\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.indexerDefault,\n expression: \"indexerDefault\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"indexer_default\",\n name: \"indexer_default\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.indexerDefault = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.indexerListOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback to plex\",\n id: \"fallback_plex_enable\"\n },\n model: {\n value: _vm.general.plexFallBack.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"enable\",\n $$v\n )\n },\n expression: \"general.plexFallBack.enable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Plex provides a tvdb mirror, that can be utilized when Tvdb's api is unavailable.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback notifications\",\n id: \"fallback_plex_notifications\"\n },\n model: {\n value: _vm.general.plexFallBack.notifications,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"notifications\",\n $$v\n )\n },\n expression: \"general.plexFallBack.notifications\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"When this settings has been enabled, you may receive frequent notifications when falling back to the plex mirror.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"Fallback duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.plexFallBack.timeout,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"timeout\",\n $$v\n )\n },\n expression: \"general.plexFallBack.timeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Amount of hours after we try to revert back to the thetvdb.com api url (default:3).\"\n )\n ])\n ]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(2),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Check software updates\",\n id: \"version_notify\"\n },\n model: {\n value: _vm.general.versionNotify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"versionNotify\", $$v)\n },\n expression: \"general.versionNotify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"and display notifications when updates are available.\\n Checks are run on startup and at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Automatically update\",\n id: \"auto_update\"\n },\n model: {\n value: _vm.general.autoUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"autoUpdate\", $$v)\n },\n expression: \"general.autoUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"fetch and install software updates.\\n Updates are run on startup and in the background at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Check the server every*\",\n id: \"update_frequency duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.updateFrequency,\n callback: function($$v) {\n _vm.$set(_vm.general, \"updateFrequency\", $$v)\n },\n expression: \"general.updateFrequency\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"hours for software updates (default:1)\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on software update\",\n id: \"notify_on_update\"\n },\n model: {\n value: _vm.general.notifyOnUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"notifyOnUpdate\", $$v)\n },\n expression: \"general.notifyOnUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"send a message to all enabled notifiers when Medusa has been updated\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: {\n type: \"submit\",\n value: \"Save Changes\",\n disabled: _vm.saving\n }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"interface\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(3),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"theme_name\",\n label: \"Display theme\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.themeName,\n expression: \"layout.themeName\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: { id: \"theme_name\", name: \"theme_name\" },\n on: {\n change: [\n function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(\n o\n ) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"themeName\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n },\n function($event) {\n return _vm.changeTheme(\n _vm.layout.themeName\n )\n }\n ]\n }\n },\n _vm._l(_vm.availableThemesOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use wider layout\",\n id: \"layout_wide\"\n },\n model: {\n value: _vm.layout.wide,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"wide\", $$v)\n },\n expression: \"layout.wide\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"uses all available space in the page\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Show fanart in the background\",\n id: \"fanart_background\"\n },\n model: {\n value: _vm.layout.fanartBackground,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fanartBackground\", $$v)\n },\n expression: \"layout.fanartBackground\"\n }\n },\n [_c(\"p\", [_vm._v(\"on the show summary page\")])]\n ),\n _vm._v(\" \"),\n _vm.layout.fanartBackground\n ? _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Fanart transparency\",\n id: \"fanart_background_opacity duration\",\n step: 0.1,\n min: 0.1,\n max: 1.0\n },\n model: {\n value: _vm.layout.fanartBackgroundOpacity,\n callback: function($$v) {\n _vm.$set(\n _vm.layout,\n \"fanartBackgroundOpacity\",\n $$v\n )\n },\n expression: \"layout.fanartBackgroundOpacity\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Transparency of the fanart in the background\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Sort with 'The' 'A', 'An'\",\n id: \"sort_article\"\n },\n model: {\n value: _vm.layout.sortArticle,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"sortArticle\", $$v)\n },\n expression: \"layout.sortArticle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'include articles (\"The\", \"A\", \"An\") when sorting show lists'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_list_order\",\n label: \"show lists\"\n }\n },\n [\n _c(\"sorted-select-list\", {\n attrs: {\n \"list-items\": _vm.layout.show.showListOrder\n },\n on: { change: _vm.saveShowListOrder }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Create and order different categories for your shows.\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Split home in tabs\",\n id: \"split_home_in_tabs\"\n },\n model: {\n value: _vm.layout.splitHomeInTabs,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"splitHomeInTabs\", $$v)\n },\n expression: \"layout.splitHomeInTabs\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"Use tabs when splitting show lists\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Missed episodes range\",\n id: \"coming_eps_missed_range duration\",\n step: 1,\n min: 7\n },\n model: {\n value: _vm.layout.comingEps.missedRange,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.comingEps,\n \"missedRange\",\n $$v\n )\n },\n expression: \"layout.comingEps.missedRange\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set the range in days of the missed episodes in the Schedule page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Display fuzzy dates\",\n id: \"fuzzy_dating\"\n },\n model: {\n value: _vm.layout.fuzzyDating,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fuzzyDating\", $$v)\n },\n expression: \"layout.fuzzyDating\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'move absolute dates into tooltips and display e.g. \"Last Thu\", \"On Tue\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Trim zero padding\",\n id: \"trim_zero\"\n },\n model: {\n value: _vm.layout.trimZero,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"trimZero\", $$v)\n },\n expression: \"layout.trimZero\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'remove the leading number \"0\" shown on hour of day, and date of month'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_preset\",\n label: \"Date style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.dateStyle,\n expression: \"layout.dateStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"date_preset\",\n name: \"date_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"dateStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.datePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"time_preset\",\n label: \"Time style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timeStyle,\n expression: \"layout.timeStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"time_preset\",\n name: \"time_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"timeStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.timePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" seconds are only shown on the History page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"timezone_display\",\n label: \"Timezone\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_local\",\n id: \"timezone_display_local\",\n value: \"local\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"local\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"local\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"local\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_network\",\n id: \"timezone_display_network\",\n value: \"network\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"network\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"network\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"network\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"display dates and times in either your timezone or the shows network timezone\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Use local timezone to start searching for episodes minutes after show ends (depends on your dailysearch frequency)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Download url\",\n id: \"download_url\"\n },\n model: {\n value: _vm.general.downloadUrl,\n callback: function($$v) {\n _vm.$set(_vm.general, \"downloadUrl\", $$v)\n },\n expression: \"general.downloadUrl\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"URL where the shows can be downloaded.\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-toggle-slider\", {\n attrs: {\n label: \"Use table pagination\",\n id: \"show_pagination\"\n },\n model: {\n value: _vm.layout.show.pagination.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.show.pagination,\n \"enable\",\n $$v\n )\n },\n expression: \"layout.show.pagination.enable\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(4),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"API key\",\n id: \"api_key\",\n readonly: \"readonly\"\n },\n model: {\n value: _vm.general.webInterface.apiKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"apiKey\",\n $$v\n )\n },\n expression: \"general.webInterface.apiKey\"\n }\n },\n [\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"generate_new_apikey\",\n value: \"Generate\"\n },\n on: { click: _vm.generateApiKey }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"used to give 3rd party programs limited access to Medusa\"\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"p\",\n [\n _vm._v(\n \"you can try all the features of the legacy API (v1) \"\n ),\n _c(\n \"app-link\",\n { attrs: { href: \"apibuilder/\" } },\n [_vm._v(\"here\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"HTTP logs\", id: \"web_log\" },\n model: {\n value: _vm.general.webInterface.log,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"log\", $$v)\n },\n expression: \"general.webInterface.log\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from the internal Tornado web server\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP username\",\n id: \"web_username\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.username,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"username\",\n $$v\n )\n },\n expression: \"general.webInterface.username\"\n }\n },\n [_c(\"p\", [_vm._v(\"set blank for no login\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP password\",\n id: \"web_password\",\n type: \"password\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.password,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"password\",\n $$v\n )\n },\n expression: \"general.webInterface.password\"\n }\n },\n [_c(\"p\", [_vm._v(\"blank = no authentication\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"HTTP port\",\n id: \"web_port\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.webInterface.port,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"port\", $$v)\n },\n expression: \"general.webInterface.port\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"web port to browse and access Medusa (default:8081)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on login\",\n id: \"notify_on_login\"\n },\n model: {\n value: _vm.general.webInterface.notifyOnLogin,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"notifyOnLogin\",\n $$v\n )\n },\n expression: \"general.webInterface.notifyOnLogin\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Listen on IPv6\", id: \"web_ipv6\" },\n model: {\n value: _vm.general.webInterface.ipv6,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"ipv6\", $$v)\n },\n expression: \"general.webInterface.ipv6\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable HTTPS\",\n id: \"enable_https\"\n },\n model: {\n value: _vm.general.webInterface.httpsEnable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsEnable\",\n $$v\n )\n },\n expression: \"general.webInterface.httpsEnable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable access to the web interface using a HTTPS address\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.webInterface.httpsEnable\n ? _c(\n \"div\",\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS certificate\",\n id: \"https_cert\"\n },\n model: {\n value: _vm.general.webInterface.httpsCert,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsCert\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsCert\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"file name or path to HTTPS certificate\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS key\",\n id: \"https_key\"\n },\n model: {\n value: _vm.general.webInterface.httpsKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsKey\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsKey\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"file name or path to HTTPS key\")\n ])\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Reverse proxy headers\",\n id: \"handle_reverse_proxy\"\n },\n model: {\n value:\n _vm.general.webInterface.handleReverseProxy,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"handleReverseProxy\",\n $$v\n )\n },\n expression:\n \"general.webInterface.handleReverseProxy\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"accept the following reverse proxy headers (advanced)...\"\n ),\n _c(\"br\"),\n _vm._v(\n \"(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP web root\",\n id: \"web_root\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webRoot,\n callback: function($$v) {\n _vm.$set(_vm.general, \"webRoot\", $$v)\n },\n expression: \"general.webRoot\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set a base URL, for use in reverse proxies.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"blank = disabled\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Must restart to have effect. Keep in mind that any previously configured base URLs won't work, after this change.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"advanced-settings\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(5),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"cpu_presets\",\n label: \"CPU throttling\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.cpuPreset,\n expression: \"general.cpuPreset\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"cpu_presets\",\n name: \"cpu_presets\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"cpuPreset\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.cpuPresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Normal (default). High is lower and Low is higher CPU use\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Anonymous redirect\",\n id: \"anon_redirect\"\n },\n model: {\n value: _vm.general.anonRedirect,\n callback: function($$v) {\n _vm.$set(_vm.general, \"anonRedirect\", $$v)\n },\n expression: \"general.anonRedirect\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'backlink protection via anonymizer service, must end in \"?\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Verify SSL Certs\",\n id: \"ssl_verify\"\n },\n model: {\n value: _vm.general.sslVerify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslVerify\", $$v)\n },\n expression: \"general.sslVerify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Verify SSL Certificates (Disable this for broken SSL installs (Like QNAP))\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"SSL CA Bundle\",\n id: \"ssl_ca_bundle\"\n },\n model: {\n value: _vm.general.sslCaBundle,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslCaBundle\", $$v)\n },\n expression: \"general.sslCaBundle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Path to an SSL CA Bundle. Will replace default bundle(certifi) with the one specified.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This only apply to call made using Medusa's Requests implementation.\\n \"\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"No Restart\", id: \"no_restart\" },\n model: {\n value: _vm.general.noRestart,\n callback: function($$v) {\n _vm.$set(_vm.general, \"noRestart\", $$v)\n },\n expression: \"general.noRestart\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Only shutdown when restarting Medusa.\\n Only select this when you have external software restarting Medusa automatically when it stops (like FireDaemon)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Encrypt passwords\",\n id: \"encryption_version\"\n },\n model: {\n value: _vm.general.encryptionVersion,\n callback: function($$v) {\n _vm.$set(_vm.general, \"encryptionVersion\", $$v)\n },\n expression: \"general.encryptionVersion\"\n }\n },\n [\n _c(\n \"p\",\n [\n _vm._v(\"in the \"),\n _c(\"code\", [_vm._v(\"config.ini\")]),\n _vm._v(\n \" file.\\n \"\n ),\n _c(\"b\", [_vm._v(\"Warning:\")]),\n _vm._v(\" Passwords must only contain \"),\n _c(\n \"app-link\",\n {\n attrs: {\n href:\n \"https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters\"\n }\n },\n [_vm._v(\"ASCII characters\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Unprotected calendar\",\n id: \"calendar_unprotected\"\n },\n model: {\n value: _vm.general.calendarUnprotected,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"calendarUnprotected\",\n $$v\n )\n },\n expression: \"general.calendarUnprotected\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"allow subscribing to the calendar without user and password.\\n Some services like Google Calendar only work this way\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Google Calendar Icons\",\n id: \"calendar_icons\"\n },\n model: {\n value: _vm.general.calendarIcons,\n callback: function($$v) {\n _vm.$set(_vm.general, \"calendarIcons\", $$v)\n },\n expression: \"general.calendarIcons\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"show an icon next to exported calendar events in Google Calendar.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: { label: \"Proxy host\", id: \"proxy_setting\" },\n model: {\n value: _vm.general.proxySetting,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxySetting\", $$v)\n },\n expression: \"general.proxySetting\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"blank to disable or proxy to use when connecting to providers\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for providers\",\n id: \"proxy_providers\"\n },\n model: {\n value: _vm.general.proxyProviders,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyProviders\", $$v)\n },\n expression: \"general.proxyProviders\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to providers (torrent & nzb)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for indexers\",\n id: \"proxy_indexers\"\n },\n model: {\n value: _vm.general.proxyIndexers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyIndexers\", $$v)\n },\n expression: \"general.proxyIndexers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to indexers (thetvdb, tmdb or tvmaze)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for clients\",\n id: \"proxy_clients\"\n },\n model: {\n value: _vm.general.proxyClients,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyClients\", $$v)\n },\n expression: \"general.proxyClients\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting torrent or usenet clients (nzbGet excluded)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for other sites\",\n id: \"proxy_others\"\n },\n model: {\n value: _vm.general.proxyOthers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyOthers\", $$v)\n },\n expression: \"general.proxyOthers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to other sites.\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Skip Remove Detection\",\n id: \"skip_removed_files\"\n },\n model: {\n value: _vm.general.skipRemovedFiles,\n callback: function($$v) {\n _vm.$set(_vm.general, \"skipRemovedFiles\", $$v)\n },\n expression: \"general.skipRemovedFiles\"\n }\n },\n [\n _c(\"span\", [\n _c(\"p\", [\n _vm._v(\n \"Skip detection of removed files. If disabled the episode will be set to the default deleted status\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This may mean Medusa misses renames as well\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"ep_default_deleted_status\",\n label: \"Default deleted episode status\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.epDefaultDeletedStatus,\n expression: \"general.epDefaultDeletedStatus\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"ep_default_deleted_status\",\n name: \"ep_default_deleted_status\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"epDefaultDeletedStatus\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a default status\")]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.defaultDeletedEpOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n })\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Define the status to be set for media file that has been deleted.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Archived option will keep previous downloaded quality\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Example: Downloaded (1080p WEB-DL) ==> Archived (1080p WEB-DL)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(6),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Enable debug\", id: \"debug\" },\n model: {\n value: _vm.general.logs.debug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"debug\", $$v)\n },\n expression: \"general.logs.debug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable debug logs\")])]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable DB debug\",\n id: \"dbdebug\"\n },\n model: {\n value: _vm.general.logs.dbDebug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"dbDebug\", $$v)\n },\n expression: \"general.logs.dbDebug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable DB debug logs\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Subliminal logs\",\n id: \"subliminal_log\"\n },\n model: {\n value: _vm.general.logs.subliminalLog,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"subliminalLog\", $$v)\n },\n expression: \"general.logs.subliminalLog\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from subliminal library (subtitles)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"privacy_level\",\n label: \"Privacy\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.logs.privacyLevel,\n expression: \"general.logs.privacyLevel\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"privacy_level\",\n name: \"privacy_level\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general.logs,\n \"privacyLevel\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.privacyLevelOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"\\n Set the level of log-filtering.\\n Normal (default).\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"custom_logs\",\n label:\n \"Overwrite log levels for overwritable logs\"\n }\n },\n [_c(\"custom-logs\")],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(7),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"github_remote_branches\",\n label: \"Branch version\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedBranch,\n expression: \"selectedBranch\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"github_remote_branches\",\n name: \"github_remote_branches\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedBranch = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a branch\")]\n ),\n _vm._v(\" \"),\n _vm._l(\n _vm.githubRemoteBranchesOptions,\n function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }\n )\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n disabled: !_vm.githubBranches.length > 0,\n type: \"button\",\n id: \"branchCheckout\",\n value: \"Checkout Branch\"\n },\n on: { click: _vm.validateCheckoutBranch }\n }),\n _vm._v(\" \"),\n !_vm.githubBranches.length > 0\n ? _c(\n \"span\",\n { staticStyle: { color: \"rgb(255, 0, 0)\" } },\n [\n _c(\"p\", [\n _vm._v(\"Error: No branches found.\")\n ])\n ]\n )\n : _c(\"p\", [\n _vm._v(\n \"select branch to use (restart required)\"\n )\n ]),\n _vm._v(\" \"),\n _vm.checkoutBranchMessage\n ? _c(\n \"p\",\n [\n _c(\"state-switch\", {\n attrs: {\n state: \"loading\",\n theme: _vm.layout.themeName\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(_vm._s(_vm.checkoutBranchMessage))\n ])\n ],\n 1\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_presets\",\n label: \"GitHub authentication type\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_basic\",\n id: \"git_auth_type_basic\"\n },\n domProps: {\n value: 0,\n checked: _vm._q(_vm.general.git.authType, 0)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 0\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Username and password\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_token\",\n id: \"git_auth_type_token\"\n },\n domProps: {\n value: 1,\n checked: _vm._q(_vm.general.git.authType, 1)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 1\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Personal access token\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'You must use a personal access token if you\\'re using \"two-factor authentication\" on GitHub.'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType === 0,\n expression: \"general.git.authType === 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub username\",\n id: \"git_username\"\n },\n model: {\n value: _vm.general.git.username,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"username\", $$v)\n },\n expression: \"general.git.username\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub password\",\n id: \"git_password\",\n type: \"password\"\n },\n model: {\n value: _vm.general.git.password,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"password\", $$v)\n },\n expression: \"general.git.password\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType !== 0,\n expression: \"general.git.authType !== 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub personal access token\",\n id: \"git_token\",\n \"input-class\":\n \"display-inline margin-bottom-5\"\n },\n nativeOn: {\n focus: function($event) {\n return $event.target.select()\n }\n },\n model: {\n value: _vm.general.git.token,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"token\", $$v)\n },\n expression: \"general.git.token\"\n }\n },\n [\n _vm.general.git.token === \"\"\n ? [\n _c(\n \"v-popover\",\n {\n attrs: {\n trigger: \"click\",\n offset: \"16\",\n placement: \"right\",\n popoverBaseClass: \"tooltip-base\",\n popoverClass:\n \"tooltip-themed\" +\n (_vm.layout.themeName === \"dark\"\n ? \"-dark\"\n : \"-light\")\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"create_access_token\",\n value: \"Generate Token\"\n }\n }),\n _vm._v(\" \"),\n _c(\"template\", { slot: \"popover\" }, [\n _c(\n \"div\",\n { staticClass: \"tooltip-title\" },\n [_vm._v(\"Github Token\")]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"tooltip-content\"\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Copy the generated token and paste it in the token input box.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general\n .anonRedirect ||\n \"\") +\n \"https://github.com/settings/tokens/new?description=Medusa&scopes=gist,public_repo\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa\",\n attrs: {\n type: \"button\",\n value:\n \"Continue to Github...\"\n }\n })\n ]\n )\n ]),\n _c(\"br\")\n ]\n )\n ])\n ],\n 2\n )\n ]\n : [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general.anonRedirect || \"\") +\n \"https://github.com/settings/tokens\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"manage_tokens\",\n value: \"Manage Tokens\"\n }\n })\n ]\n )\n ],\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ],\n 2\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub remote for branch\",\n id: \"git_remote\"\n },\n model: {\n value: _vm.general.git.remote,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"remote\", $$v)\n },\n expression: \"general.git.remote\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"default:origin. Access repo configured remotes (save then refresh browser)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Git executable path\",\n id: \"git_path\"\n },\n model: {\n value: _vm.general.git.path,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"path\", $$v)\n },\n expression: \"general.git.path\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"only needed if OS is unable to locate git from env\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Git reset\", id: \"git_reset\" },\n model: {\n value: _vm.general.git.reset,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"reset\", $$v)\n },\n expression: \"general.git.reset\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"removes untracked files and performs a hard reset on git branch automatically to help resolve update issues\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"git_reset_branches\",\n label: \"Branches to reset\"\n }\n },\n [\n _c(\"multiselect\", {\n attrs: {\n multiple: true,\n options: _vm.githubBranches\n },\n model: {\n value: _vm.general.git.resetBranches,\n callback: function($$v) {\n _vm.$set(\n _vm.general.git,\n \"resetBranches\",\n $$v\n )\n },\n expression: \"general.git.resetBranches\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n type: \"button\",\n id: \"branch_force_update\",\n value: \"Update Branches\"\n },\n on: { click: _vm.githubBranchForceUpdate }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Empty selection means that any branch could be reset.\"\n )\n ])\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\"h6\", { staticClass: \"pull-right\" }, [\n _c(\"b\", [\n _vm._v(\"All non-absolute folder locations are relative to \"),\n _c(\"span\", { staticClass: \"path\" }, [\n _vm._v(_vm._s(_vm.system.dataDir))\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa pull-left config_submitter button\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"modal\",\n {\n attrs: {\n name: \"query-upgrade-database\",\n height: \"auto\",\n width: \"80%\"\n }\n },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Upgrade database model?\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Changing branch will upgrade your database\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"You won't be able to downgrade afterward.\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Do you want to continue?\")])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-upgrade-database\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.checkoutBranch()\n _vm.$modal.hide(\"query-upgrade-database\")\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"modal\",\n { attrs: { name: \"query-restart\", height: \"auto\", width: \"80%\" } },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Checking out a branch requires a restart\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Would you like to start a restart of medusa now?\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.$router.push({ name: \"restart\" })\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Misc\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Startup options. Indexer options. Log and show file locations.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"Some options may require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Indexer\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for controlling the show indexers.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Updates\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for software updates.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"User Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for visual appearance.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Web Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"It is recommended that you enable a username and password to secure Medusa from being tampered with remotely.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"These options require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Advanced Settings\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Logging\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"GitHub\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for github related features.\")])\n ]\n )\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), diff --git a/themes/dark/assets/js/vendors~date-fns.js b/themes/dark/assets/js/vendors~date-fns.js index 604a08e278..c1ea2b4a91 100644 --- a/themes/dark/assets/js/vendors~date-fns.js +++ b/themes/dark/assets/js/vendors~date-fns.js @@ -98,21 +98,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js ***! - \***************************************************************/ -/*! namespace exports */ -/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ -/*! other exports [not provided] [no usage info] */ -/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date).getTime() - (0,_startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js?"); - -/***/ }), - /***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js": /*!*******************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js ***! @@ -128,10 +113,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/getUTCWeek/index.js": -/*!************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js ***! - \************************************************************/ +/***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js": +/*!***************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js ***! + \***************************************************************/ /*! namespace exports */ /*! export default [provided] [no usage info] [missing usage info prevents renaming] */ /*! other exports [not provided] [no usage info] */ @@ -139,7 +124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date, options).getTime() - (0,_startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date).getTime() - (0,_startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js?"); /***/ }), @@ -158,6 +143,21 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/date-fns/esm/_lib/getUTCWeek/index.js": +/*!************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js ***! + \************************************************************/ +/*! namespace exports */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date, options).getTime() - (0,_startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js?"); + +/***/ }), + /***/ "./node_modules/date-fns/esm/_lib/protectedTokens/index.js": /*!*****************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/protectedTokens/index.js ***! @@ -190,21 +190,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js ***! - \*******************************************************************/ -/*! namespace exports */ -/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ -/*! other exports [not provided] [no usage info] */ -/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js?"); - -/***/ }), - /***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js": /*!***********************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js ***! @@ -220,10 +205,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js ***! - \****************************************************************/ +/***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js": +/*!*******************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js ***! + \*******************************************************************/ /*! namespace exports */ /*! export default [provided] [no usage info] [missing usage info prevents renaming] */ /*! other exports [not provided] [no usage info] */ @@ -231,7 +216,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js?"); /***/ }), @@ -250,6 +235,21 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js": +/*!****************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js ***! + \****************************************************************/ +/*! namespace exports */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js?"); + +/***/ }), + /***/ "./node_modules/date-fns/esm/_lib/toInteger/index.js": /*!***********************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/toInteger/index.js ***! diff --git a/themes/light/assets/js/medusa-runtime.js b/themes/light/assets/js/medusa-runtime.js index 7367793a76..6708b5e072 100644 --- a/themes/light/assets/js/medusa-runtime.js +++ b/themes/light/assets/js/medusa-runtime.js @@ -139,7 +139,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../api.js */ \"./src/api.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.mjs\");\n/* harmony import */ var _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./root-dirs.vue */ \"./src/components/root-dirs.vue\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n/* harmony import */ var _utils_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/core.js */ \"./src/utils/core.js\");\n/* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns/format */ \"./node_modules/date-fns/esm/format/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-js-toggle-button */ \"./node_modules/vue-js-toggle-button/dist/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-multiselect */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.js\");\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_multiselect__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vue_multiselect_dist_vue_multiselect_min_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-multiselect/dist/vue-multiselect.min.css */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.css\");\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'config-general',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__.AppLink,\n ConfigTemplate: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTemplate,\n ConfigTextbox: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextbox,\n ConfigTextboxNumber: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextboxNumber,\n ConfigToggleSlider: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigToggleSlider,\n CustomLogs: _helpers__WEBPACK_IMPORTED_MODULE_2__.CustomLogs,\n LanguageSelect: _helpers__WEBPACK_IMPORTED_MODULE_2__.LanguageSelect,\n Multiselect: (vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default()),\n SortedSelectList: _helpers__WEBPACK_IMPORTED_MODULE_2__.SortedSelectList,\n VPopover: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VPopover,\n StateSwitch: _helpers__WEBPACK_IMPORTED_MODULE_2__.StateSwitch,\n ToggleButton: vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__.ToggleButton,\n RootDirs: _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__.default\n },\n directives: {\n tooltip: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VTooltip\n },\n\n data() {\n const defaultPageOptions = [{\n value: 'home',\n text: 'Shows'\n }, {\n value: 'schedule',\n text: 'Schedule'\n }, {\n value: 'history',\n text: 'History'\n }, {\n value: 'news',\n text: 'News'\n }, {\n value: 'IRC',\n text: 'IRC'\n }];\n const privacyLevelOptions = [{\n value: 'high',\n text: 'HIGH'\n }, {\n value: 'normal',\n text: 'NORMAL'\n }, {\n value: 'low',\n text: 'LOW'\n }];\n return {\n defaultPageOptions,\n privacyLevelOptions,\n githubBranchesForced: [],\n resetBranchSelected: null,\n saving: false,\n selectedBranch: '',\n checkoutBranchMessage: ''\n };\n },\n\n beforeMount() {\n // Wait for the next tick, so the component is rendered\n this.$nextTick(() => {\n $('#config-components').tabs();\n });\n },\n\n computed: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapState)({\n general: state => state.config.general,\n configLoaded: state => state.config.consts.statuses.length > 0,\n layout: state => state.config.layout,\n statuses: state => state.config.consts.statuses,\n indexers: state => state.config.indexers,\n system: state => state.config.system,\n gitRemoteBranches: state => state.config.system.gitRemoteBranches // We need the reactivity on this.\n\n }),\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapGetters)(['getStatus']),\n indexerDefault: {\n get() {\n const {\n general\n } = this;\n const {\n indexerDefault\n } = general;\n return indexerDefault || 0;\n },\n\n set(indexer) {\n // TODO: commit instead\n this.general.indexerDefault = indexer;\n }\n\n },\n\n indexerListOptions() {\n const {\n indexers\n } = this;\n const allIndexers = [{\n text: 'All Indexers',\n value: 0\n }];\n const indexerOptions = Object.values(indexers.indexers).map(indexer => ({\n value: indexer.id,\n text: indexer.name\n }));\n return [...allIndexers, ...indexerOptions];\n },\n\n datePresetOptions() {\n const {\n general\n } = this;\n const {\n datePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedDatePresets = datePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedDatePresets];\n },\n\n timePresetOptions() {\n const {\n general\n } = this;\n const {\n timePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedTimePresets = timePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedTimePresets];\n },\n\n availableThemesOptions() {\n const {\n general\n } = this;\n const {\n availableThemes\n } = general;\n\n if (!availableThemes) {\n return [];\n }\n\n return availableThemes.map(theme => ({\n value: theme.name,\n text: `${theme.name} (${theme.version})`\n }));\n },\n\n cpuPresetOptions() {\n const {\n system\n } = this;\n const {\n cpuPresets\n } = system;\n\n if (!cpuPresets) {\n return [];\n }\n\n return Object.keys(cpuPresets).map(key => ({\n value: key,\n text: key\n }));\n },\n\n defaultDeletedEpOptions() {\n const {\n general,\n getStatus\n } = this;\n let status = [];\n\n if (general.skipRemovedFiles) {\n status = ['skipped', 'ignored'].map(key => getStatus({\n key\n }));\n } else {\n // Get status objects, when skip removed files is enabled\n status = ['skipped', 'ignored', 'archived'].map(key => getStatus({\n key\n }));\n }\n\n if (status.every(x => x !== undefined)) {\n return status.map(status => ({\n text: status.name,\n value: status.value\n }));\n }\n\n return [];\n },\n\n githubRemoteBranchesOptions() {\n const {\n general,\n githubBranches,\n githubBranchForceUpdate,\n gitRemoteBranches\n } = this;\n const {\n username,\n password,\n token\n } = general.git;\n\n if (!gitRemoteBranches.length > 0) {\n githubBranchForceUpdate();\n }\n\n let filteredBranches = [];\n\n if ((username && password || token) && general.developer) {\n filteredBranches = githubBranches;\n } else if (username && password || token) {\n filteredBranches = githubBranches.filter(branch => ['master', 'develop'].includes(branch));\n } else {\n filteredBranches = githubBranches.filter(branch => ['master'].includes(branch));\n }\n\n return filteredBranches.map(branch => ({\n text: branch,\n value: branch\n }));\n },\n\n githubBranches() {\n const {\n githubBranchesForced,\n gitRemoteBranches\n } = this;\n return gitRemoteBranches || githubBranchesForced;\n },\n\n githubTokenPopover() {\n const {\n general\n } = this;\n return '

Copy the generated token and paste it in the token input box.

' + `

` + '


';\n }\n\n },\n methods: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapActions)({\n setConfig: 'setConfig',\n setTheme: 'setTheme',\n getApiKey: 'getApiKey',\n setLayoutShow: 'setLayoutShow'\n }),\n\n async githubBranchForceUpdate() {\n const response = await (0,_api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute)('home/branchForceUpdate');\n\n if (response.data._size > 0) {\n this.githubBranchesForced = response.data.resetBranches;\n }\n },\n\n async generateApiKey() {\n const {\n getApiKey,\n save\n } = this;\n\n try {\n await getApiKey();\n this.$snotify.success('Saving and reloading the page, to utilize the new api key', 'Warning', {\n timeout: 5000\n });\n setTimeout(() => {\n // Save the new apiKey. No choice to reload because of /src/api.js\n save();\n }, 500);\n setTimeout(() => {\n // For now we reload the page since the layouts use python still\n location.reload();\n }, 500);\n } catch (error) {\n this.$snotify.error('Error while trying to get a new api key', `Error: ${error}`);\n }\n },\n\n async changeTheme(themeName) {\n const {\n setTheme\n } = this;\n\n try {\n await setTheme({\n themeName\n });\n this.$snotify.success('Saving and reloading the page', 'Saving', {\n timeout: 5000\n });\n setTimeout(() => {\n // Reload the page as we need to reload static content.\n (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.forceBrowserReload)();\n }, 1000);\n } catch (error) {\n this.$snotify.error('Error while trying to change the theme', `Error: ${error}`);\n }\n },\n\n async save() {\n const {\n general,\n layout,\n setConfig\n } = this; // Disable the save button until we're done.\n\n this.saving = true;\n const {\n availableThemes,\n backlogOverview,\n datePresets,\n loggingLevels,\n logs,\n timePresets,\n randomShowSlug,\n recentShows,\n themeName,\n ...filteredConfig\n } = general;\n const {\n local,\n ...filteredLayout\n } = layout;\n const configMain = {\n section: 'main',\n config: { ...filteredConfig,\n ...{\n layout: filteredLayout\n },\n ...{\n logs: {\n debug: general.logs.debug,\n dbDebug: general.logs.dbDebug,\n actualLogDir: general.logs.actualLogDir,\n nr: general.logs.nr,\n size: general.logs.size,\n subliminalLog: general.logs.subliminalLog,\n privacyLevel: general.logs.privacyLevel\n }\n }\n }\n };\n\n try {\n await setConfig(configMain);\n this.$snotify.success('Saved general config', 'Saved', {\n timeout: 5000\n });\n } catch (error) {\n this.$snotify.error('Error while trying to save general config', `Error: ${error}`);\n } finally {\n this.saving = false;\n }\n },\n\n saveShowListOrder(value) {\n const {\n layout,\n setLayoutShow\n } = this;\n const mergedShowLayout = { ...layout.show,\n ...{\n showListOrder: value.map(item => item.value)\n }\n };\n setLayoutShow(mergedShowLayout);\n },\n\n async compareDBUpgrade() {\n const {\n checkoutBranch,\n selectedBranch\n } = this;\n\n try {\n this.checkoutBranchMessage = 'Checking if the checkout requires a database upgrade / downgrade';\n const result = await _api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('home/getDBcompare');\n\n if (result.data.status === 'success') {\n if (result.data.message === 'equal') {\n // Checkout Branch\n checkoutBranch();\n }\n\n if (result.data.message === 'upgrade') {\n this.$modal.show('query-upgrade-database', {\n selectedBranch\n });\n }\n\n if (result.data.message === 'downgrade') {\n this.$snotify.error('Can\\'t switch branch as this will result in a database downgrade.', 'Error');\n }\n } else {\n this.$snotify.error('Error while trying to compare db versions for checkout', `Error: ${result.data.status}`);\n }\n } catch (error) {\n console.log(error);\n }\n },\n\n /**\n * Validate if we need a compareDb, or directly checkout.\n *\n * If whe're running a master or develop branch, we check for database changes.\n * This to prepare the user, by showing a few modals.\n * If the user is running another branch like, a feature branch. We asume the user knows what he's doing.\n *\n */\n validateCheckoutBranch() {\n const {\n compareDBUpgrade,\n selectedBranch\n } = this;\n\n if (!selectedBranch) {\n return;\n }\n\n compareDBUpgrade();\n },\n\n async checkoutBranch() {\n const {\n selectedBranch\n } = this;\n this.checkoutBranchMessage = `Checking out branch ${selectedBranch}`;\n await _api_js__WEBPACK_IMPORTED_MODULE_0__.api.post('system/operation', {\n type: 'CHECKOUT_BRANCH',\n branch: selectedBranch\n }, {\n timeout: 120000\n });\n this.checkoutBranchMessage = `Finished checking out branch ${selectedBranch}`;\n setTimeout(() => {\n this.checkoutBranchMessage = '';\n }, 4000);\n this.$modal.show('query-restart');\n },\n\n cancelCheckout() {\n this.checkoutBranchMessage = '';\n }\n\n }\n});\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-1%5B0%5D.rules%5B0%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../api.js */ \"./src/api.js\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.mjs\");\n/* harmony import */ var _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./root-dirs.vue */ \"./src/components/root-dirs.vue\");\n/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers */ \"./src/components/helpers/index.js\");\n/* harmony import */ var _utils_core_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/core.js */ \"./src/utils/core.js\");\n/* harmony import */ var date_fns_format__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! date-fns/format */ \"./node_modules/date-fns/esm/format/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! vue-js-toggle-button */ \"./node_modules/vue-js-toggle-button/dist/index.js\");\n/* harmony import */ var vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-multiselect */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.js\");\n/* harmony import */ var vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(vue_multiselect__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var vue_multiselect_dist_vue_multiselect_min_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-multiselect/dist/vue-multiselect.min.css */ \"./node_modules/vue-multiselect/dist/vue-multiselect.min.css\");\n/* harmony import */ var v_tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! v-tooltip */ \"./node_modules/v-tooltip/dist/v-tooltip.esm.js\");\n/* provided dependency */ var $ = __webpack_require__(/*! jquery */ \"./node_modules/jquery/dist/jquery.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: 'config-general',\n components: {\n AppLink: _helpers__WEBPACK_IMPORTED_MODULE_2__.AppLink,\n ConfigTemplate: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTemplate,\n ConfigTextbox: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextbox,\n ConfigTextboxNumber: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigTextboxNumber,\n ConfigToggleSlider: _helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigToggleSlider,\n CustomLogs: _helpers__WEBPACK_IMPORTED_MODULE_2__.CustomLogs,\n LanguageSelect: _helpers__WEBPACK_IMPORTED_MODULE_2__.LanguageSelect,\n Multiselect: (vue_multiselect__WEBPACK_IMPORTED_MODULE_5___default()),\n SortedSelectList: _helpers__WEBPACK_IMPORTED_MODULE_2__.SortedSelectList,\n VPopover: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VPopover,\n StateSwitch: _helpers__WEBPACK_IMPORTED_MODULE_2__.StateSwitch,\n ToggleButton: vue_js_toggle_button__WEBPACK_IMPORTED_MODULE_4__.ToggleButton,\n RootDirs: _root_dirs_vue__WEBPACK_IMPORTED_MODULE_1__.default\n },\n directives: {\n tooltip: v_tooltip__WEBPACK_IMPORTED_MODULE_7__.VTooltip\n },\n\n data() {\n const defaultPageOptions = [{\n value: 'home',\n text: 'Shows'\n }, {\n value: 'schedule',\n text: 'Schedule'\n }, {\n value: 'history',\n text: 'History'\n }, {\n value: 'news',\n text: 'News'\n }, {\n value: 'IRC',\n text: 'IRC'\n }];\n const privacyLevelOptions = [{\n value: 'high',\n text: 'HIGH'\n }, {\n value: 'normal',\n text: 'NORMAL'\n }, {\n value: 'low',\n text: 'LOW'\n }];\n return {\n defaultPageOptions,\n privacyLevelOptions,\n githubBranchesForced: [],\n resetBranchSelected: null,\n saving: false,\n selectedBranch: '',\n checkoutBranchMessage: ''\n };\n },\n\n beforeMount() {\n // Wait for the next tick, so the component is rendered\n this.$nextTick(() => {\n $('#config-components').tabs();\n });\n },\n\n computed: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapState)({\n general: state => state.config.general,\n configLoaded: state => state.config.consts.statuses.length > 0,\n layout: state => state.config.layout,\n statuses: state => state.config.consts.statuses,\n indexers: state => state.config.indexers,\n system: state => state.config.system,\n gitRemoteBranches: state => state.config.system.gitRemoteBranches // We need the reactivity on this.\n\n }),\n ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapGetters)(['getStatus']),\n indexerDefault: {\n get() {\n const {\n general\n } = this;\n const {\n indexerDefault\n } = general;\n return indexerDefault || 0;\n },\n\n set(indexer) {\n // TODO: commit instead\n this.general.indexerDefault = indexer;\n }\n\n },\n\n indexerListOptions() {\n const {\n indexers\n } = this;\n const allIndexers = [{\n text: 'All Indexers',\n value: 0\n }];\n const indexerOptions = Object.values(indexers.indexers).map(indexer => ({\n value: indexer.id,\n text: indexer.name\n }));\n return [...allIndexers, ...indexerOptions];\n },\n\n datePresetOptions() {\n const {\n general\n } = this;\n const {\n datePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedDatePresets = datePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedDatePresets];\n },\n\n timePresetOptions() {\n const {\n general\n } = this;\n const {\n timePresets\n } = general;\n const systemDefault = [{\n value: '%x',\n text: 'Use System Default'\n }];\n const formattedTimePresets = timePresets.map(preset => ({\n value: preset,\n text: (0,date_fns_format__WEBPACK_IMPORTED_MODULE_9__.default)(new Date(), (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.convertDateFormat)(preset))\n }));\n return [...systemDefault, ...formattedTimePresets];\n },\n\n availableThemesOptions() {\n const {\n general\n } = this;\n const {\n availableThemes\n } = general;\n\n if (!availableThemes) {\n return [];\n }\n\n return availableThemes.map(theme => ({\n value: theme.name,\n text: `${theme.name} (${theme.version})`\n }));\n },\n\n cpuPresetOptions() {\n const {\n system\n } = this;\n const {\n cpuPresets\n } = system;\n\n if (!cpuPresets) {\n return [];\n }\n\n return Object.keys(cpuPresets).map(key => ({\n value: key,\n text: key\n }));\n },\n\n defaultDeletedEpOptions() {\n const {\n general,\n getStatus\n } = this;\n let status = [];\n\n if (general.skipRemovedFiles) {\n status = ['skipped', 'ignored'].map(key => getStatus({\n key\n }));\n } else {\n // Get status objects, when skip removed files is enabled\n status = ['skipped', 'ignored', 'archived'].map(key => getStatus({\n key\n }));\n }\n\n if (status.every(x => x !== undefined)) {\n return status.map(status => ({\n text: status.name,\n value: status.value\n }));\n }\n\n return [];\n },\n\n githubRemoteBranchesOptions() {\n const {\n general,\n githubBranches,\n githubBranchForceUpdate,\n gitRemoteBranches\n } = this;\n const {\n username,\n password,\n token\n } = general.git;\n\n if (!gitRemoteBranches.length > 0) {\n githubBranchForceUpdate();\n }\n\n let filteredBranches = [];\n\n if ((username && password || token) && general.developer) {\n filteredBranches = githubBranches;\n } else if (username && password || token) {\n filteredBranches = githubBranches.filter(branch => ['master', 'develop'].includes(branch));\n } else {\n filteredBranches = githubBranches.filter(branch => ['master'].includes(branch));\n }\n\n return filteredBranches.map(branch => ({\n text: branch,\n value: branch\n }));\n },\n\n githubBranches() {\n const {\n githubBranchesForced,\n gitRemoteBranches\n } = this;\n return gitRemoteBranches || githubBranchesForced;\n },\n\n githubTokenPopover() {\n const {\n general\n } = this;\n return '

Copy the generated token and paste it in the token input box.

' + `

` + '


';\n }\n\n },\n methods: { ...(0,vuex__WEBPACK_IMPORTED_MODULE_8__.mapActions)({\n setConfig: 'setConfig',\n setTheme: 'setTheme',\n getApiKey: 'getApiKey',\n setLayoutShow: 'setLayoutShow'\n }),\n\n async githubBranchForceUpdate() {\n const response = await (0,_api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute)('home/branchForceUpdate');\n\n if (response.data._size > 0) {\n this.githubBranchesForced = response.data.resetBranches;\n }\n },\n\n async generateApiKey() {\n const {\n getApiKey,\n save\n } = this;\n\n try {\n await getApiKey();\n this.$snotify.success('Saving and reloading the page, to utilize the new api key', 'Warning', {\n timeout: 5000\n });\n setTimeout(() => {\n // Save the new apiKey. No choice to reload because of /src/api.js\n save();\n }, 500);\n setTimeout(() => {\n // For now we reload the page since the layouts use python still\n location.reload();\n }, 500);\n } catch (error) {\n this.$snotify.error('Error while trying to get a new api key', `Error: ${error}`);\n }\n },\n\n async changeTheme(themeName) {\n const {\n setTheme\n } = this;\n\n try {\n await setTheme({\n themeName\n });\n this.$snotify.success('Saving and reloading the page', 'Saving', {\n timeout: 5000\n });\n setTimeout(() => {\n // Reload the page as we need to reload static content.\n (0,_utils_core_js__WEBPACK_IMPORTED_MODULE_3__.forceBrowserReload)();\n }, 1000);\n } catch (error) {\n this.$snotify.error('Error while trying to change the theme', `Error: ${error}`);\n }\n },\n\n async save() {\n const {\n general,\n layout,\n setConfig\n } = this; // Disable the save button until we're done.\n\n this.saving = true;\n const {\n availableThemes,\n backlogOverview,\n datePresets,\n loggingLevels,\n logs,\n timePresets,\n randomShowSlug,\n recentShows,\n themeName,\n ...filteredConfig\n } = general;\n const {\n local,\n ...filteredLayout\n } = layout;\n const configMain = {\n section: 'main',\n config: { ...filteredConfig,\n ...{\n layout: filteredLayout\n },\n ...{\n logs: {\n debug: general.logs.debug,\n dbDebug: general.logs.dbDebug,\n actualLogDir: general.logs.actualLogDir,\n nr: general.logs.nr,\n size: general.logs.size,\n subliminalLog: general.logs.subliminalLog,\n privacyLevel: general.logs.privacyLevel\n }\n }\n }\n };\n\n try {\n await setConfig(configMain);\n this.$snotify.success('Saved general config', 'Saved', {\n timeout: 5000\n });\n } catch (error) {\n this.$snotify.error('Error while trying to save general config', `Error: ${error}`);\n } finally {\n this.saving = false;\n }\n },\n\n saveShowListOrder(value) {\n const {\n layout,\n setLayoutShow\n } = this;\n const mergedShowLayout = { ...layout.show,\n ...{\n showListOrder: value.map(item => item.value)\n }\n };\n setLayoutShow(mergedShowLayout);\n },\n\n async compareDBUpgrade() {\n const {\n checkoutBranch,\n selectedBranch\n } = this;\n\n try {\n this.checkoutBranchMessage = 'Checking if the checkout requires a database upgrade / downgrade';\n const result = await _api_js__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('home/getDBcompare');\n\n if (result.data.status === 'success') {\n if (result.data.message === 'equal') {\n // Checkout Branch\n checkoutBranch();\n }\n\n if (result.data.message === 'upgrade') {\n this.$modal.show('query-upgrade-database', {\n selectedBranch\n });\n }\n\n if (result.data.message === 'downgrade') {\n this.$snotify.error('Can\\'t switch branch as this will result in a database downgrade.', 'Error');\n }\n } else {\n this.$snotify.error('Error while trying to compare db versions for checkout', `Error: ${result.data.status}`);\n }\n } catch (error) {\n console.log(error);\n }\n },\n\n /**\n * Validate if we need a compareDb, or directly checkout.\n *\n * If whe're running a master or develop branch, we check for database changes.\n * This to prepare the user, by showing a few modals.\n * If the user is running another branch like, a feature branch. We asume the user knows what he's doing.\n *\n */\n validateCheckoutBranch() {\n const {\n compareDBUpgrade,\n selectedBranch\n } = this;\n\n if (!selectedBranch) {\n return;\n }\n\n compareDBUpgrade();\n },\n\n async checkoutBranch() {\n const {\n selectedBranch\n } = this;\n this.checkoutBranchMessage = `Checking out branch ${selectedBranch}`;\n await _api_js__WEBPACK_IMPORTED_MODULE_0__.api.post('system/operation', {\n type: 'CHECKOUT_BRANCH',\n branch: selectedBranch\n }, {\n timeout: 120000\n });\n this.checkoutBranchMessage = `Finished checking out branch ${selectedBranch}`;\n setTimeout(() => {\n this.checkoutBranchMessage = '';\n }, 4000);\n this.$modal.show('query-restart');\n },\n\n cancelCheckout() {\n this.checkoutBranchMessage = '';\n }\n\n }\n});\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/babel-loader/lib/index.js??clonedRuleSet-1%5B0%5D.rules%5B0%5D!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -1327,7 +1327,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../api */ \"./src/api.js\");\n/* harmony import */ var _mutation_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mutation-types */ \"./src/store/mutation-types.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/core */ \"./src/utils/core.js\");\n\n\n\nconst state = {\n wikiUrl: null,\n donationsUrl: null,\n namingForceFolders: null,\n sourceUrl: null,\n downloadUrl: null,\n rootDirs: [],\n subtitles: {\n enabled: null\n },\n logs: {\n debug: null,\n dbDebug: null,\n loggingLevels: {},\n numErrors: null,\n numWarnings: null,\n actualLogDir: null,\n nr: null,\n size: null,\n subliminalLog: null,\n privacyLevel: null,\n custom: {}\n },\n cpuPreset: null,\n subtitlesMulti: null,\n anonRedirect: null,\n recentShows: [],\n randomShowSlug: null,\n // @TODO: Recreate this in Vue when the webapp has a reliable list of shows to choose from.\n showDefaults: {\n status: null,\n statusAfter: null,\n quality: null,\n subtitles: null,\n seasonFolders: null,\n anime: null,\n scene: null,\n showLists: null\n },\n launchBrowser: null,\n defaultPage: null,\n trashRemoveShow: null,\n indexerDefaultLanguage: null,\n showUpdateHour: null,\n indexerTimeout: null,\n indexerDefault: null,\n plexFallBack: {\n enable: null,\n notifications: null,\n timeout: null\n },\n versionNotify: null,\n autoUpdate: null,\n updateFrequency: null,\n notifyOnUpdate: null,\n availableThemes: null,\n timePresets: [],\n datePresets: [],\n webInterface: {\n apiKey: null,\n log: null,\n username: null,\n password: null,\n port: null,\n notifyOnLogin: null,\n ipv6: null,\n httpsEnable: null,\n httpsCert: null,\n httpsKey: null,\n handleReverseProxy: null\n },\n sslVerify: null,\n sslCaBundle: null,\n noRestart: null,\n encryptionVersion: null,\n calendarUnprotected: null,\n calendarIcons: null,\n proxySetting: null,\n proxyIndexers: null,\n skipRemovedFiles: null,\n epDefaultDeletedStatus: null,\n developer: null,\n git: {\n username: null,\n password: null,\n token: null,\n authType: null,\n remote: null,\n path: null,\n org: null,\n reset: null,\n resetBranches: null,\n url: null\n },\n // Remove backlogOverview after manage_backlogOverview.mako is gone.\n backlogOverview: {\n status: null,\n period: null\n },\n // Remove themeName when we get fully rid of MEDUSA.config.\n themeName: null\n};\nconst mutations = {\n [_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG](state, {\n section,\n config\n }) {\n if (section === 'main') {\n state = Object.assign(state, config);\n }\n },\n\n addRecentShow(state, {\n show\n }) {\n state.recentShows = state.recentShows.filter(filterShow => !(filterShow.indexerName === show.indexerName && filterShow.showId === show.showId && filterShow.name === show.name));\n state.recentShows.unshift(show); // Add the new show object to the start of the array.\n\n state.recentShows = state.recentShows.slice(0, 5); // Cut the array of at 5 items.\n }\n\n};\nconst getters = {\n effectiveIgnored: (state, _, rootState) => series => {\n const seriesIgnored = series.config.release.ignoredWords.map(x => x.toLowerCase());\n const globalIgnored = rootState.config.search.filters.ignored.map(x => x.toLowerCase());\n\n if (!series.config.release.ignoredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalIgnored.concat(seriesIgnored));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalIgnored, seriesIgnored);\n },\n effectiveRequired: (state, _, rootState) => series => {\n const seriesRequired = series.config.release.requiredWords.map(x => x.toLowerCase());\n const globalRequired = rootState.config.search.filters.required.map(x => x.toLowerCase());\n\n if (!series.config.release.requiredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalRequired.concat(seriesRequired));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalRequired, seriesRequired);\n }\n};\nconst actions = {\n getConfig(context, section) {\n const {\n commit\n } = context;\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.get('/config/' + (section || '')).then(res => {\n if (section) {\n const config = res.data;\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n return config;\n }\n\n const sections = res.data;\n Object.keys(sections).forEach(section => {\n const config = sections[section];\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n return sections;\n });\n },\n\n setConfig(context, {\n section,\n config\n }) {\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch(`config/${section}`, config);\n },\n\n updateConfig(context, {\n section,\n config\n }) {\n const {\n commit\n } = context;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n },\n\n getApiKey(context) {\n const {\n commit\n } = context;\n const section = 'main';\n const config = {\n webInterface: {\n apiKey: ''\n }\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('config/general/generate_api_key').then(response => {\n config.webInterface.apiKey = response.data;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n },\n\n setRecentShow({\n commit,\n state\n }, show) {\n commit('addRecentShow', {\n show\n });\n const config = {\n recentShows: state.recentShows\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', config);\n },\n\n setCustomLogs({\n commit\n }, logs) {\n // Convert back to object.\n const reducedLogs = logs.reduce((obj, item) => ({ ...obj,\n [item.identifier]: item.level\n }), {});\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', {\n logs: {\n custom: logs\n }\n }).then(() => {\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section: 'main',\n config: {\n logs: {\n custom: reducedLogs\n }\n }\n });\n });\n }\n\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n state,\n mutations,\n getters,\n actions\n});\n\n//# sourceURL=webpack://slim/./src/store/modules/config/general.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../api */ \"./src/api.js\");\n/* harmony import */ var _mutation_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../mutation-types */ \"./src/store/mutation-types.js\");\n/* harmony import */ var _utils_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/core */ \"./src/utils/core.js\");\n\n\n\nconst state = {\n wikiUrl: null,\n donationsUrl: null,\n namingForceFolders: null,\n sourceUrl: null,\n downloadUrl: null,\n rootDirs: [],\n subtitles: {\n enabled: null\n },\n logs: {\n debug: null,\n dbDebug: null,\n loggingLevels: {},\n numErrors: null,\n numWarnings: null,\n actualLogDir: null,\n nr: null,\n size: null,\n subliminalLog: null,\n privacyLevel: null,\n custom: {}\n },\n cpuPreset: null,\n subtitlesMulti: null,\n anonRedirect: null,\n recentShows: [],\n randomShowSlug: null,\n // @TODO: Recreate this in Vue when the webapp has a reliable list of shows to choose from.\n showDefaults: {\n status: null,\n statusAfter: null,\n quality: null,\n subtitles: null,\n seasonFolders: null,\n anime: null,\n scene: null,\n showLists: null\n },\n launchBrowser: null,\n defaultPage: null,\n trashRemoveShow: null,\n indexerDefaultLanguage: null,\n showUpdateHour: null,\n indexerTimeout: null,\n indexerDefault: null,\n plexFallBack: {\n enable: null,\n notifications: null,\n timeout: null\n },\n versionNotify: null,\n autoUpdate: null,\n updateFrequency: null,\n notifyOnUpdate: null,\n availableThemes: null,\n timePresets: [],\n datePresets: [],\n webInterface: {\n apiKey: null,\n log: null,\n username: null,\n password: null,\n port: null,\n notifyOnLogin: null,\n ipv6: null,\n httpsEnable: null,\n httpsCert: null,\n httpsKey: null,\n handleReverseProxy: null\n },\n sslVerify: null,\n sslCaBundle: null,\n noRestart: null,\n encryptionVersion: null,\n calendarUnprotected: null,\n calendarIcons: null,\n proxySetting: null,\n proxyProviders: null,\n proxyClients: null,\n proxyIndexers: null,\n proxyOthers: null,\n skipRemovedFiles: null,\n epDefaultDeletedStatus: null,\n developer: null,\n git: {\n username: null,\n password: null,\n token: null,\n authType: null,\n remote: null,\n path: null,\n org: null,\n reset: null,\n resetBranches: null,\n url: null\n },\n // Remove backlogOverview after manage_backlogOverview.mako is gone.\n backlogOverview: {\n status: null,\n period: null\n },\n // Remove themeName when we get fully rid of MEDUSA.config.\n themeName: null\n};\nconst mutations = {\n [_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG](state, {\n section,\n config\n }) {\n if (section === 'main') {\n state = Object.assign(state, config);\n }\n },\n\n addRecentShow(state, {\n show\n }) {\n state.recentShows = state.recentShows.filter(filterShow => !(filterShow.indexerName === show.indexerName && filterShow.showId === show.showId && filterShow.name === show.name));\n state.recentShows.unshift(show); // Add the new show object to the start of the array.\n\n state.recentShows = state.recentShows.slice(0, 5); // Cut the array of at 5 items.\n }\n\n};\nconst getters = {\n effectiveIgnored: (state, _, rootState) => series => {\n const seriesIgnored = series.config.release.ignoredWords.map(x => x.toLowerCase());\n const globalIgnored = rootState.config.search.filters.ignored.map(x => x.toLowerCase());\n\n if (!series.config.release.ignoredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalIgnored.concat(seriesIgnored));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalIgnored, seriesIgnored);\n },\n effectiveRequired: (state, _, rootState) => series => {\n const seriesRequired = series.config.release.requiredWords.map(x => x.toLowerCase());\n const globalRequired = rootState.config.search.filters.required.map(x => x.toLowerCase());\n\n if (!series.config.release.requiredWordsExclude) {\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayUnique)(globalRequired.concat(seriesRequired));\n }\n\n return (0,_utils_core__WEBPACK_IMPORTED_MODULE_2__.arrayExclude)(globalRequired, seriesRequired);\n }\n};\nconst actions = {\n getConfig(context, section) {\n const {\n commit\n } = context;\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.get('/config/' + (section || '')).then(res => {\n if (section) {\n const config = res.data;\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n return config;\n }\n\n const sections = res.data;\n Object.keys(sections).forEach(section => {\n const config = sections[section];\n commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n return sections;\n });\n },\n\n setConfig(context, {\n section,\n config\n }) {\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch(`config/${section}`, config);\n },\n\n updateConfig(context, {\n section,\n config\n }) {\n const {\n commit\n } = context;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n },\n\n getApiKey(context) {\n const {\n commit\n } = context;\n const section = 'main';\n const config = {\n webInterface: {\n apiKey: ''\n }\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.apiRoute.get('config/general/generate_api_key').then(response => {\n config.webInterface.apiKey = response.data;\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section,\n config\n });\n });\n },\n\n setRecentShow({\n commit,\n state\n }, show) {\n commit('addRecentShow', {\n show\n });\n const config = {\n recentShows: state.recentShows\n };\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', config);\n },\n\n setCustomLogs({\n commit\n }, logs) {\n // Convert back to object.\n const reducedLogs = logs.reduce((obj, item) => ({ ...obj,\n [item.identifier]: item.level\n }), {});\n return _api__WEBPACK_IMPORTED_MODULE_0__.api.patch('config/main', {\n logs: {\n custom: logs\n }\n }).then(() => {\n return commit(_mutation_types__WEBPACK_IMPORTED_MODULE_1__.ADD_CONFIG, {\n section: 'main',\n config: {\n logs: {\n custom: reducedLogs\n }\n }\n });\n });\n }\n\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n state,\n mutations,\n getters,\n actions\n});\n\n//# sourceURL=webpack://slim/./src/store/modules/config/general.js?"); /***/ }), @@ -6277,7 +6277,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"config-genaral\" } },\n [\n _c(\"div\", { attrs: { id: \"config-content\" } }, [\n _c(\n \"form\",\n {\n attrs: { id: \"configForm\", method: \"post\" },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.save()\n }\n }\n },\n [\n _c(\"div\", { attrs: { id: \"config-components\" } }, [\n _c(\"ul\", [\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#misc\" } }, [\n _vm._v(\"Misc\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#interface\" } }, [\n _vm._v(\"Interface\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#advanced-settings\" } }, [\n _vm._v(\"Advanced Settings\")\n ])\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"misc\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Launch browser\",\n id: \"launch_browser\"\n },\n model: {\n value: _vm.general.launchBrowser,\n callback: function($$v) {\n _vm.$set(_vm.general, \"launchBrowser\", $$v)\n },\n expression: \"general.launchBrowser\"\n }\n },\n [\n _c(\"span\", [\n _vm._v(\"open the Medusa home page on startup\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"default_page\",\n label: \"Initial page\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.defaultPage,\n expression: \"general.defaultPage\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"default_page\",\n name: \"default_page\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"defaultPage\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.defaultPageOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"when launching Medusa interface\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"trash_remove_show\",\n label: \"Send to trash for actions\"\n }\n },\n [\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_remove_show\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_remove_show\",\n name: \"trash_remove_show\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRemoveShow,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRemoveShow\",\n $$v\n )\n },\n expression: \"general.trashRemoveShow\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'when using show \"Remove\" and delete files'\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_rotate_logs\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_rotate_logs\",\n name: \"trash_rotate_logs\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRotateLogs,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRotateLogs\",\n $$v\n )\n },\n expression: \"general.trashRotateLogs\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"on scheduled deletes of the oldest log files\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"selected actions use trash (recycle bin) instead of the default permanent delete\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-textbox\", {\n attrs: {\n label: \"Location for Log files\",\n id: \"log_id\"\n },\n on: {\n change: function($event) {\n return _vm.save()\n }\n },\n model: {\n value: _vm.general.logs.actualLogDir,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"actualLogDir\", $$v)\n },\n expression: \"general.logs.actualLogDir\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Number of Log files saved\",\n id: \"log_nr\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.logs.nr,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"nr\", $$v)\n },\n expression: \"general.logs.nr\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"number of log files saved when rotating logs (default: 5) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Size of Log files saved\",\n id: \"log_size\",\n min: 0.5,\n step: 0.1\n },\n model: {\n value: _vm.general.logs.size,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"size\", $$v)\n },\n expression: \"general.logs.size\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"maximum size in MB of the log file (default: 1MB) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Show root directories\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"where the files of shows are located\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"These changes are automatically saved!\")\n ]),\n _vm._v(\" \"),\n _c(\"root-dirs\")\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(1),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Default Indexer Language\"\n }\n },\n [\n _c(\"language-select\", {\n ref: \"indexerLanguage\",\n staticClass:\n \"form-control form-control-inline input-sm\",\n attrs: {\n language: _vm.general.indexerDefaultLanguage,\n available: _vm.indexers.main.validLanguages.join(\n \",\"\n )\n },\n on: {\n \"update-language\": function($event) {\n _vm.general.indexerDefaultLanguage = $event\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"for adding shows and metadata providers\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Choose hour to update shows\",\n id: \"showupdate_hour\",\n min: 0,\n max: 23,\n step: 1\n },\n model: {\n value: _vm.general.showUpdateHour,\n callback: function($$v) {\n _vm.$set(_vm.general, \"showUpdateHour\", $$v)\n },\n expression: \"general.showUpdateHour\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" minutes are randomized each time Medusa is started\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"indexer_timeout\",\n min: 10,\n step: 1\n },\n model: {\n value: _vm.general.indexerTimeout,\n callback: function($$v) {\n _vm.$set(_vm.general, \"indexerTimeout\", $$v)\n },\n expression: \"general.indexerTimeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"seconds of inactivity when finding new shows (default:20)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"indexer_default\",\n label: \"Use initial indexer set to\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.indexerDefault,\n expression: \"indexerDefault\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"indexer_default\",\n name: \"indexer_default\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.indexerDefault = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.indexerListOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback to plex\",\n id: \"fallback_plex_enable\"\n },\n model: {\n value: _vm.general.plexFallBack.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"enable\",\n $$v\n )\n },\n expression: \"general.plexFallBack.enable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Plex provides a tvdb mirror, that can be utilized when Tvdb's api is unavailable.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback notifications\",\n id: \"fallback_plex_notifications\"\n },\n model: {\n value: _vm.general.plexFallBack.notifications,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"notifications\",\n $$v\n )\n },\n expression: \"general.plexFallBack.notifications\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"When this settings has been enabled, you may receive frequent notifications when falling back to the plex mirror.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"Fallback duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.plexFallBack.timeout,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"timeout\",\n $$v\n )\n },\n expression: \"general.plexFallBack.timeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Amount of hours after we try to revert back to the thetvdb.com api url (default:3).\"\n )\n ])\n ]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(2),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Check software updates\",\n id: \"version_notify\"\n },\n model: {\n value: _vm.general.versionNotify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"versionNotify\", $$v)\n },\n expression: \"general.versionNotify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"and display notifications when updates are available.\\n Checks are run on startup and at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Automatically update\",\n id: \"auto_update\"\n },\n model: {\n value: _vm.general.autoUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"autoUpdate\", $$v)\n },\n expression: \"general.autoUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"fetch and install software updates.\\n Updates are run on startup and in the background at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Check the server every*\",\n id: \"update_frequency duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.updateFrequency,\n callback: function($$v) {\n _vm.$set(_vm.general, \"updateFrequency\", $$v)\n },\n expression: \"general.updateFrequency\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"hours for software updates (default:1)\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on software update\",\n id: \"notify_on_update\"\n },\n model: {\n value: _vm.general.notifyOnUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"notifyOnUpdate\", $$v)\n },\n expression: \"general.notifyOnUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"send a message to all enabled notifiers when Medusa has been updated\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: {\n type: \"submit\",\n value: \"Save Changes\",\n disabled: _vm.saving\n }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"interface\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(3),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"theme_name\",\n label: \"Display theme\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.themeName,\n expression: \"layout.themeName\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: { id: \"theme_name\", name: \"theme_name\" },\n on: {\n change: [\n function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(\n o\n ) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"themeName\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n },\n function($event) {\n return _vm.changeTheme(\n _vm.layout.themeName\n )\n }\n ]\n }\n },\n _vm._l(_vm.availableThemesOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use wider layout\",\n id: \"layout_wide\"\n },\n model: {\n value: _vm.layout.wide,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"wide\", $$v)\n },\n expression: \"layout.wide\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"uses all available space in the page\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Show fanart in the background\",\n id: \"fanart_background\"\n },\n model: {\n value: _vm.layout.fanartBackground,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fanartBackground\", $$v)\n },\n expression: \"layout.fanartBackground\"\n }\n },\n [_c(\"p\", [_vm._v(\"on the show summary page\")])]\n ),\n _vm._v(\" \"),\n _vm.layout.fanartBackground\n ? _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Fanart transparency\",\n id: \"fanart_background_opacity duration\",\n step: 0.1,\n min: 0.1,\n max: 1.0\n },\n model: {\n value: _vm.layout.fanartBackgroundOpacity,\n callback: function($$v) {\n _vm.$set(\n _vm.layout,\n \"fanartBackgroundOpacity\",\n $$v\n )\n },\n expression: \"layout.fanartBackgroundOpacity\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Transparency of the fanart in the background\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Sort with 'The' 'A', 'An'\",\n id: \"sort_article\"\n },\n model: {\n value: _vm.layout.sortArticle,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"sortArticle\", $$v)\n },\n expression: \"layout.sortArticle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'include articles (\"The\", \"A\", \"An\") when sorting show lists'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_list_order\",\n label: \"show lists\"\n }\n },\n [\n _c(\"sorted-select-list\", {\n attrs: {\n \"list-items\": _vm.layout.show.showListOrder\n },\n on: { change: _vm.saveShowListOrder }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Create and order different categories for your shows.\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Split home in tabs\",\n id: \"split_home_in_tabs\"\n },\n model: {\n value: _vm.layout.splitHomeInTabs,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"splitHomeInTabs\", $$v)\n },\n expression: \"layout.splitHomeInTabs\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"Use tabs when splitting show lists\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Missed episodes range\",\n id: \"coming_eps_missed_range duration\",\n step: 1,\n min: 7\n },\n model: {\n value: _vm.layout.comingEps.missedRange,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.comingEps,\n \"missedRange\",\n $$v\n )\n },\n expression: \"layout.comingEps.missedRange\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set the range in days of the missed episodes in the Schedule page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Display fuzzy dates\",\n id: \"fuzzy_dating\"\n },\n model: {\n value: _vm.layout.fuzzyDating,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fuzzyDating\", $$v)\n },\n expression: \"layout.fuzzyDating\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'move absolute dates into tooltips and display e.g. \"Last Thu\", \"On Tue\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Trim zero padding\",\n id: \"trim_zero\"\n },\n model: {\n value: _vm.layout.trimZero,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"trimZero\", $$v)\n },\n expression: \"layout.trimZero\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'remove the leading number \"0\" shown on hour of day, and date of month'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_preset\",\n label: \"Date style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.dateStyle,\n expression: \"layout.dateStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"date_preset\",\n name: \"date_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"dateStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.datePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"time_preset\",\n label: \"Time style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timeStyle,\n expression: \"layout.timeStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"time_preset\",\n name: \"time_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"timeStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.timePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" seconds are only shown on the History page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"timezone_display\",\n label: \"Timezone\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_local\",\n id: \"timezone_display_local\",\n value: \"local\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"local\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"local\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"local\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_network\",\n id: \"timezone_display_network\",\n value: \"network\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"network\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"network\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"network\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"display dates and times in either your timezone or the shows network timezone\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Use local timezone to start searching for episodes minutes after show ends (depends on your dailysearch frequency)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Download url\",\n id: \"download_url\"\n },\n model: {\n value: _vm.general.downloadUrl,\n callback: function($$v) {\n _vm.$set(_vm.general, \"downloadUrl\", $$v)\n },\n expression: \"general.downloadUrl\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"URL where the shows can be downloaded.\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-toggle-slider\", {\n attrs: {\n label: \"Use table pagination\",\n id: \"show_pagination\"\n },\n model: {\n value: _vm.layout.show.pagination.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.show.pagination,\n \"enable\",\n $$v\n )\n },\n expression: \"layout.show.pagination.enable\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(4),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"API key\",\n id: \"api_key\",\n readonly: \"readonly\"\n },\n model: {\n value: _vm.general.webInterface.apiKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"apiKey\",\n $$v\n )\n },\n expression: \"general.webInterface.apiKey\"\n }\n },\n [\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"generate_new_apikey\",\n value: \"Generate\"\n },\n on: { click: _vm.generateApiKey }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"used to give 3rd party programs limited access to Medusa\"\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"p\",\n [\n _vm._v(\n \"you can try all the features of the legacy API (v1) \"\n ),\n _c(\n \"app-link\",\n { attrs: { href: \"apibuilder/\" } },\n [_vm._v(\"here\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"HTTP logs\", id: \"web_log\" },\n model: {\n value: _vm.general.webInterface.log,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"log\", $$v)\n },\n expression: \"general.webInterface.log\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from the internal Tornado web server\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP username\",\n id: \"web_username\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.username,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"username\",\n $$v\n )\n },\n expression: \"general.webInterface.username\"\n }\n },\n [_c(\"p\", [_vm._v(\"set blank for no login\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP password\",\n id: \"web_password\",\n type: \"password\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.password,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"password\",\n $$v\n )\n },\n expression: \"general.webInterface.password\"\n }\n },\n [_c(\"p\", [_vm._v(\"blank = no authentication\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"HTTP port\",\n id: \"web_port\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.webInterface.port,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"port\", $$v)\n },\n expression: \"general.webInterface.port\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"web port to browse and access Medusa (default:8081)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on login\",\n id: \"notify_on_login\"\n },\n model: {\n value: _vm.general.webInterface.notifyOnLogin,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"notifyOnLogin\",\n $$v\n )\n },\n expression: \"general.webInterface.notifyOnLogin\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Listen on IPv6\", id: \"web_ipv6\" },\n model: {\n value: _vm.general.webInterface.ipv6,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"ipv6\", $$v)\n },\n expression: \"general.webInterface.ipv6\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable HTTPS\",\n id: \"enable_https\"\n },\n model: {\n value: _vm.general.webInterface.httpsEnable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsEnable\",\n $$v\n )\n },\n expression: \"general.webInterface.httpsEnable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable access to the web interface using a HTTPS address\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.webInterface.httpsEnable\n ? _c(\n \"div\",\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS certificate\",\n id: \"https_cert\"\n },\n model: {\n value: _vm.general.webInterface.httpsCert,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsCert\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsCert\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"file name or path to HTTPS certificate\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS key\",\n id: \"https_key\"\n },\n model: {\n value: _vm.general.webInterface.httpsKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsKey\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsKey\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"file name or path to HTTPS key\")\n ])\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Reverse proxy headers\",\n id: \"handle_reverse_proxy\"\n },\n model: {\n value:\n _vm.general.webInterface.handleReverseProxy,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"handleReverseProxy\",\n $$v\n )\n },\n expression:\n \"general.webInterface.handleReverseProxy\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"accept the following reverse proxy headers (advanced)...\"\n ),\n _c(\"br\"),\n _vm._v(\n \"(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP web root\",\n id: \"web_root\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webRoot,\n callback: function($$v) {\n _vm.$set(_vm.general, \"webRoot\", $$v)\n },\n expression: \"general.webRoot\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set a base URL, for use in reverse proxies.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"blank = disabled\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Must restart to have effect. Keep in mind that any previously configured base URLs won't work, after this change.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"advanced-settings\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(5),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"cpu_presets\",\n label: \"CPU throttling\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.cpuPreset,\n expression: \"general.cpuPreset\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"cpu_presets\",\n name: \"cpu_presets\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"cpuPreset\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.cpuPresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Normal (default). High is lower and Low is higher CPU use\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Anonymous redirect\",\n id: \"anon_redirect\"\n },\n model: {\n value: _vm.general.anonRedirect,\n callback: function($$v) {\n _vm.$set(_vm.general, \"anonRedirect\", $$v)\n },\n expression: \"general.anonRedirect\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'backlink protection via anonymizer service, must end in \"?\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Verify SSL Certs\",\n id: \"ssl_verify\"\n },\n model: {\n value: _vm.general.sslVerify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslVerify\", $$v)\n },\n expression: \"general.sslVerify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Verify SSL Certificates (Disable this for broken SSL installs (Like QNAP))\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"SSL CA Bundle\",\n id: \"ssl_ca_bundle\"\n },\n model: {\n value: _vm.general.sslCaBundle,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslCaBundle\", $$v)\n },\n expression: \"general.sslCaBundle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Path to an SSL CA Bundle. Will replace default bundle(certifi) with the one specified.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This only apply to call made using Medusa's Requests implementation.\\n \"\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"No Restart\", id: \"no_restart\" },\n model: {\n value: _vm.general.noRestart,\n callback: function($$v) {\n _vm.$set(_vm.general, \"noRestart\", $$v)\n },\n expression: \"general.noRestart\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Only shutdown when restarting Medusa.\\n Only select this when you have external software restarting Medusa automatically when it stops (like FireDaemon)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Encrypt passwords\",\n id: \"encryption_version\"\n },\n model: {\n value: _vm.general.encryptionVersion,\n callback: function($$v) {\n _vm.$set(_vm.general, \"encryptionVersion\", $$v)\n },\n expression: \"general.encryptionVersion\"\n }\n },\n [\n _c(\n \"p\",\n [\n _vm._v(\"in the \"),\n _c(\"code\", [_vm._v(\"config.ini\")]),\n _vm._v(\n \" file.\\n \"\n ),\n _c(\"b\", [_vm._v(\"Warning:\")]),\n _vm._v(\" Passwords must only contain \"),\n _c(\n \"app-link\",\n {\n attrs: {\n href:\n \"https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters\"\n }\n },\n [_vm._v(\"ASCII characters\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Unprotected calendar\",\n id: \"calendar_unprotected\"\n },\n model: {\n value: _vm.general.calendarUnprotected,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"calendarUnprotected\",\n $$v\n )\n },\n expression: \"general.calendarUnprotected\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"allow subscribing to the calendar without user and password.\\n Some services like Google Calendar only work this way\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Google Calendar Icons\",\n id: \"calendar_icons\"\n },\n model: {\n value: _vm.general.calendarIcons,\n callback: function($$v) {\n _vm.$set(_vm.general, \"calendarIcons\", $$v)\n },\n expression: \"general.calendarIcons\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"show an icon next to exported calendar events in Google Calendar.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: { label: \"Proxy host\", id: \"proxy_setting\" },\n model: {\n value: _vm.general.proxySetting,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxySetting\", $$v)\n },\n expression: \"general.proxySetting\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"blank to disable or proxy to use when connecting to providers\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for indexers\",\n id: \"proxy_indexers\"\n },\n model: {\n value: _vm.general.proxyIndexers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyIndexers\", $$v)\n },\n expression: \"general.proxyIndexers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to indexers (thetvdb)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Skip Remove Detection\",\n id: \"skip_removed_files\"\n },\n model: {\n value: _vm.general.skipRemovedFiles,\n callback: function($$v) {\n _vm.$set(_vm.general, \"skipRemovedFiles\", $$v)\n },\n expression: \"general.skipRemovedFiles\"\n }\n },\n [\n _c(\"span\", [\n _c(\"p\", [\n _vm._v(\n \"Skip detection of removed files. If disabled the episode will be set to the default deleted status\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This may mean Medusa misses renames as well\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"ep_default_deleted_status\",\n label: \"Default deleted episode status\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.epDefaultDeletedStatus,\n expression: \"general.epDefaultDeletedStatus\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"ep_default_deleted_status\",\n name: \"ep_default_deleted_status\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"epDefaultDeletedStatus\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a default status\")]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.defaultDeletedEpOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n })\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Define the status to be set for media file that has been deleted.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Archived option will keep previous downloaded quality\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Example: Downloaded (1080p WEB-DL) ==> Archived (1080p WEB-DL)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(6),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Enable debug\", id: \"debug\" },\n model: {\n value: _vm.general.logs.debug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"debug\", $$v)\n },\n expression: \"general.logs.debug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable debug logs\")])]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable DB debug\",\n id: \"dbdebug\"\n },\n model: {\n value: _vm.general.logs.dbDebug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"dbDebug\", $$v)\n },\n expression: \"general.logs.dbDebug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable DB debug logs\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Subliminal logs\",\n id: \"subliminal_log\"\n },\n model: {\n value: _vm.general.logs.subliminalLog,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"subliminalLog\", $$v)\n },\n expression: \"general.logs.subliminalLog\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from subliminal library (subtitles)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"privacy_level\",\n label: \"Privacy\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.logs.privacyLevel,\n expression: \"general.logs.privacyLevel\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"privacy_level\",\n name: \"privacy_level\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general.logs,\n \"privacyLevel\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.privacyLevelOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"\\n Set the level of log-filtering.\\n Normal (default).\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"custom_logs\",\n label:\n \"Overwrite log levels for overwritable logs\"\n }\n },\n [_c(\"custom-logs\")],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(7),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"github_remote_branches\",\n label: \"Branch version\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedBranch,\n expression: \"selectedBranch\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"github_remote_branches\",\n name: \"github_remote_branches\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedBranch = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a branch\")]\n ),\n _vm._v(\" \"),\n _vm._l(\n _vm.githubRemoteBranchesOptions,\n function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }\n )\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n disabled: !_vm.githubBranches.length > 0,\n type: \"button\",\n id: \"branchCheckout\",\n value: \"Checkout Branch\"\n },\n on: { click: _vm.validateCheckoutBranch }\n }),\n _vm._v(\" \"),\n !_vm.githubBranches.length > 0\n ? _c(\n \"span\",\n { staticStyle: { color: \"rgb(255, 0, 0)\" } },\n [\n _c(\"p\", [\n _vm._v(\"Error: No branches found.\")\n ])\n ]\n )\n : _c(\"p\", [\n _vm._v(\n \"select branch to use (restart required)\"\n )\n ]),\n _vm._v(\" \"),\n _vm.checkoutBranchMessage\n ? _c(\n \"p\",\n [\n _c(\"state-switch\", {\n attrs: {\n state: \"loading\",\n theme: _vm.layout.themeName\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(_vm._s(_vm.checkoutBranchMessage))\n ])\n ],\n 1\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_presets\",\n label: \"GitHub authentication type\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_basic\",\n id: \"git_auth_type_basic\"\n },\n domProps: {\n value: 0,\n checked: _vm._q(_vm.general.git.authType, 0)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 0\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Username and password\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_token\",\n id: \"git_auth_type_token\"\n },\n domProps: {\n value: 1,\n checked: _vm._q(_vm.general.git.authType, 1)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 1\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Personal access token\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'You must use a personal access token if you\\'re using \"two-factor authentication\" on GitHub.'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType === 0,\n expression: \"general.git.authType === 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub username\",\n id: \"git_username\"\n },\n model: {\n value: _vm.general.git.username,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"username\", $$v)\n },\n expression: \"general.git.username\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub password\",\n id: \"git_password\",\n type: \"password\"\n },\n model: {\n value: _vm.general.git.password,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"password\", $$v)\n },\n expression: \"general.git.password\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType !== 0,\n expression: \"general.git.authType !== 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub personal access token\",\n id: \"git_token\",\n \"input-class\":\n \"display-inline margin-bottom-5\"\n },\n nativeOn: {\n focus: function($event) {\n return $event.target.select()\n }\n },\n model: {\n value: _vm.general.git.token,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"token\", $$v)\n },\n expression: \"general.git.token\"\n }\n },\n [\n _vm.general.git.token === \"\"\n ? [\n _c(\n \"v-popover\",\n {\n attrs: {\n trigger: \"click\",\n offset: \"16\",\n placement: \"right\",\n popoverBaseClass: \"tooltip-base\",\n popoverClass:\n \"tooltip-themed\" +\n (_vm.layout.themeName === \"dark\"\n ? \"-dark\"\n : \"-light\")\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"create_access_token\",\n value: \"Generate Token\"\n }\n }),\n _vm._v(\" \"),\n _c(\"template\", { slot: \"popover\" }, [\n _c(\n \"div\",\n { staticClass: \"tooltip-title\" },\n [_vm._v(\"Github Token\")]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"tooltip-content\"\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Copy the generated token and paste it in the token input box.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general\n .anonRedirect ||\n \"\") +\n \"https://github.com/settings/tokens/new?description=Medusa&scopes=gist,public_repo\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa\",\n attrs: {\n type: \"button\",\n value:\n \"Continue to Github...\"\n }\n })\n ]\n )\n ]),\n _c(\"br\")\n ]\n )\n ])\n ],\n 2\n )\n ]\n : [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general.anonRedirect || \"\") +\n \"https://github.com/settings/tokens\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"manage_tokens\",\n value: \"Manage Tokens\"\n }\n })\n ]\n )\n ],\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ],\n 2\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub remote for branch\",\n id: \"git_remote\"\n },\n model: {\n value: _vm.general.git.remote,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"remote\", $$v)\n },\n expression: \"general.git.remote\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"default:origin. Access repo configured remotes (save then refresh browser)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Git executable path\",\n id: \"git_path\"\n },\n model: {\n value: _vm.general.git.path,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"path\", $$v)\n },\n expression: \"general.git.path\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"only needed if OS is unable to locate git from env\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Git reset\", id: \"git_reset\" },\n model: {\n value: _vm.general.git.reset,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"reset\", $$v)\n },\n expression: \"general.git.reset\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"removes untracked files and performs a hard reset on git branch automatically to help resolve update issues\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"git_reset_branches\",\n label: \"Branches to reset\"\n }\n },\n [\n _c(\"multiselect\", {\n attrs: {\n multiple: true,\n options: _vm.githubBranches\n },\n model: {\n value: _vm.general.git.resetBranches,\n callback: function($$v) {\n _vm.$set(\n _vm.general.git,\n \"resetBranches\",\n $$v\n )\n },\n expression: \"general.git.resetBranches\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n type: \"button\",\n id: \"branch_force_update\",\n value: \"Update Branches\"\n },\n on: { click: _vm.githubBranchForceUpdate }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Empty selection means that any branch could be reset.\"\n )\n ])\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\"h6\", { staticClass: \"pull-right\" }, [\n _c(\"b\", [\n _vm._v(\"All non-absolute folder locations are relative to \"),\n _c(\"span\", { staticClass: \"path\" }, [\n _vm._v(_vm._s(_vm.system.dataDir))\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa pull-left config_submitter button\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"modal\",\n {\n attrs: {\n name: \"query-upgrade-database\",\n height: \"auto\",\n width: \"80%\"\n }\n },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Upgrade database model?\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Changing branch will upgrade your database\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"You won't be able to downgrade afterward.\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Do you want to continue?\")])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-upgrade-database\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.checkoutBranch()\n _vm.$modal.hide(\"query-upgrade-database\")\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"modal\",\n { attrs: { name: \"query-restart\", height: \"auto\", width: \"80%\" } },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Checking out a branch requires a restart\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Would you like to start a restart of medusa now?\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.$router.push({ name: \"restart\" })\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Misc\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Startup options. Indexer options. Log and show file locations.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"Some options may require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Indexer\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for controlling the show indexers.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Updates\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for software updates.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"User Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for visual appearance.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Web Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"It is recommended that you enable a username and password to secure Medusa from being tampered with remotely.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"These options require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Advanced Settings\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Logging\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"GitHub\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for github related features.\")])\n ]\n )\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { attrs: { id: \"config-genaral\" } },\n [\n _c(\"div\", { attrs: { id: \"config-content\" } }, [\n _c(\n \"form\",\n {\n attrs: { id: \"configForm\", method: \"post\" },\n on: {\n submit: function($event) {\n $event.preventDefault()\n return _vm.save()\n }\n }\n },\n [\n _c(\"div\", { attrs: { id: \"config-components\" } }, [\n _c(\"ul\", [\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#misc\" } }, [\n _vm._v(\"Misc\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#interface\" } }, [\n _vm._v(\"Interface\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"li\",\n [\n _c(\"app-link\", { attrs: { href: \"#advanced-settings\" } }, [\n _vm._v(\"Advanced Settings\")\n ])\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"misc\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Launch browser\",\n id: \"launch_browser\"\n },\n model: {\n value: _vm.general.launchBrowser,\n callback: function($$v) {\n _vm.$set(_vm.general, \"launchBrowser\", $$v)\n },\n expression: \"general.launchBrowser\"\n }\n },\n [\n _c(\"span\", [\n _vm._v(\"open the Medusa home page on startup\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"default_page\",\n label: \"Initial page\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.defaultPage,\n expression: \"general.defaultPage\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"default_page\",\n name: \"default_page\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"defaultPage\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.defaultPageOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"when launching Medusa interface\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"trash_remove_show\",\n label: \"Send to trash for actions\"\n }\n },\n [\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_remove_show\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_remove_show\",\n name: \"trash_remove_show\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRemoveShow,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRemoveShow\",\n $$v\n )\n },\n expression: \"general.trashRemoveShow\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'when using show \"Remove\" and delete files'\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"label\",\n {\n staticClass: \"nextline-block\",\n attrs: { for: \"trash_rotate_logs\" }\n },\n [\n _c(\"toggle-button\", {\n attrs: {\n width: 45,\n height: 22,\n id: \"trash_rotate_logs\",\n name: \"trash_rotate_logs\",\n sync: \"\"\n },\n model: {\n value: _vm.general.trashRotateLogs,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"trashRotateLogs\",\n $$v\n )\n },\n expression: \"general.trashRotateLogs\"\n }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"on scheduled deletes of the oldest log files\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"selected actions use trash (recycle bin) instead of the default permanent delete\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-textbox\", {\n attrs: {\n label: \"Location for Log files\",\n id: \"log_id\"\n },\n on: {\n change: function($event) {\n return _vm.save()\n }\n },\n model: {\n value: _vm.general.logs.actualLogDir,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"actualLogDir\", $$v)\n },\n expression: \"general.logs.actualLogDir\"\n }\n }),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Number of Log files saved\",\n id: \"log_nr\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.logs.nr,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"nr\", $$v)\n },\n expression: \"general.logs.nr\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"number of log files saved when rotating logs (default: 5) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Size of Log files saved\",\n id: \"log_size\",\n min: 0.5,\n step: 0.1\n },\n model: {\n value: _vm.general.logs.size,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"size\", $$v)\n },\n expression: \"general.logs.size\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"maximum size in MB of the log file (default: 1MB) \"\n ),\n _c(\"b\", [_vm._v(\"(REQUIRES RESTART)\")])\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Show root directories\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"where the files of shows are located\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"These changes are automatically saved!\")\n ]),\n _vm._v(\" \"),\n _c(\"root-dirs\")\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(1),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_root_dir\",\n label: \"Default Indexer Language\"\n }\n },\n [\n _c(\"language-select\", {\n ref: \"indexerLanguage\",\n staticClass:\n \"form-control form-control-inline input-sm\",\n attrs: {\n language: _vm.general.indexerDefaultLanguage,\n available: _vm.indexers.main.validLanguages.join(\n \",\"\n )\n },\n on: {\n \"update-language\": function($event) {\n _vm.general.indexerDefaultLanguage = $event\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\"for adding shows and metadata providers\")\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Choose hour to update shows\",\n id: \"showupdate_hour\",\n min: 0,\n max: 23,\n step: 1\n },\n model: {\n value: _vm.general.showUpdateHour,\n callback: function($$v) {\n _vm.$set(_vm.general, \"showUpdateHour\", $$v)\n },\n expression: \"general.showUpdateHour\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"with information such as next air dates, show ended, etc. Use 15 for 3pm, 4 for 4am etc.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" minutes are randomized each time Medusa is started\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"indexer_timeout\",\n min: 10,\n step: 1\n },\n model: {\n value: _vm.general.indexerTimeout,\n callback: function($$v) {\n _vm.$set(_vm.general, \"indexerTimeout\", $$v)\n },\n expression: \"general.indexerTimeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"seconds of inactivity when finding new shows (default:20)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"indexer_default\",\n label: \"Use initial indexer set to\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.indexerDefault,\n expression: \"indexerDefault\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"indexer_default\",\n name: \"indexer_default\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.indexerDefault = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n _vm._l(_vm.indexerListOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback to plex\",\n id: \"fallback_plex_enable\"\n },\n model: {\n value: _vm.general.plexFallBack.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"enable\",\n $$v\n )\n },\n expression: \"general.plexFallBack.enable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Plex provides a tvdb mirror, that can be utilized when Tvdb's api is unavailable.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable fallback notifications\",\n id: \"fallback_plex_notifications\"\n },\n model: {\n value: _vm.general.plexFallBack.notifications,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"notifications\",\n $$v\n )\n },\n expression: \"general.plexFallBack.notifications\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"When this settings has been enabled, you may receive frequent notifications when falling back to the plex mirror.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Timeout show indexer at\",\n id: \"Fallback duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.plexFallBack.timeout,\n callback: function($$v) {\n _vm.$set(\n _vm.general.plexFallBack,\n \"timeout\",\n $$v\n )\n },\n expression: \"general.plexFallBack.timeout\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Amount of hours after we try to revert back to the thetvdb.com api url (default:3).\"\n )\n ])\n ]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(2),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Check software updates\",\n id: \"version_notify\"\n },\n model: {\n value: _vm.general.versionNotify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"versionNotify\", $$v)\n },\n expression: \"general.versionNotify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"and display notifications when updates are available.\\n Checks are run on startup and at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Automatically update\",\n id: \"auto_update\"\n },\n model: {\n value: _vm.general.autoUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"autoUpdate\", $$v)\n },\n expression: \"general.autoUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"fetch and install software updates.\\n Updates are run on startup and in the background at the frequency set below*\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Check the server every*\",\n id: \"update_frequency duration\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.updateFrequency,\n callback: function($$v) {\n _vm.$set(_vm.general, \"updateFrequency\", $$v)\n },\n expression: \"general.updateFrequency\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"hours for software updates (default:1)\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on software update\",\n id: \"notify_on_update\"\n },\n model: {\n value: _vm.general.notifyOnUpdate,\n callback: function($$v) {\n _vm.$set(_vm.general, \"notifyOnUpdate\", $$v)\n },\n expression: \"general.notifyOnUpdate\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"send a message to all enabled notifiers when Medusa has been updated\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: {\n type: \"submit\",\n value: \"Save Changes\",\n disabled: _vm.saving\n }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"interface\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(3),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"theme_name\",\n label: \"Display theme\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.themeName,\n expression: \"layout.themeName\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: { id: \"theme_name\", name: \"theme_name\" },\n on: {\n change: [\n function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(\n o\n ) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"themeName\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n },\n function($event) {\n return _vm.changeTheme(\n _vm.layout.themeName\n )\n }\n ]\n }\n },\n _vm._l(_vm.availableThemesOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [\n _vm._v(\n _vm._s(option.text) +\n \"\\n \"\n )\n ]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use wider layout\",\n id: \"layout_wide\"\n },\n model: {\n value: _vm.layout.wide,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"wide\", $$v)\n },\n expression: \"layout.wide\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"uses all available space in the page\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Show fanart in the background\",\n id: \"fanart_background\"\n },\n model: {\n value: _vm.layout.fanartBackground,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fanartBackground\", $$v)\n },\n expression: \"layout.fanartBackground\"\n }\n },\n [_c(\"p\", [_vm._v(\"on the show summary page\")])]\n ),\n _vm._v(\" \"),\n _vm.layout.fanartBackground\n ? _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Fanart transparency\",\n id: \"fanart_background_opacity duration\",\n step: 0.1,\n min: 0.1,\n max: 1.0\n },\n model: {\n value: _vm.layout.fanartBackgroundOpacity,\n callback: function($$v) {\n _vm.$set(\n _vm.layout,\n \"fanartBackgroundOpacity\",\n $$v\n )\n },\n expression: \"layout.fanartBackgroundOpacity\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Transparency of the fanart in the background\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Sort with 'The' 'A', 'An'\",\n id: \"sort_article\"\n },\n model: {\n value: _vm.layout.sortArticle,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"sortArticle\", $$v)\n },\n expression: \"layout.sortArticle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'include articles (\"The\", \"A\", \"An\") when sorting show lists'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"show_list_order\",\n label: \"show lists\"\n }\n },\n [\n _c(\"sorted-select-list\", {\n attrs: {\n \"list-items\": _vm.layout.show.showListOrder\n },\n on: { change: _vm.saveShowListOrder }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Create and order different categories for your shows.\"\n )\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Split home in tabs\",\n id: \"split_home_in_tabs\"\n },\n model: {\n value: _vm.layout.splitHomeInTabs,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"splitHomeInTabs\", $$v)\n },\n expression: \"layout.splitHomeInTabs\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"Use tabs when splitting show lists\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"Missed episodes range\",\n id: \"coming_eps_missed_range duration\",\n step: 1,\n min: 7\n },\n model: {\n value: _vm.layout.comingEps.missedRange,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.comingEps,\n \"missedRange\",\n $$v\n )\n },\n expression: \"layout.comingEps.missedRange\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set the range in days of the missed episodes in the Schedule page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Display fuzzy dates\",\n id: \"fuzzy_dating\"\n },\n model: {\n value: _vm.layout.fuzzyDating,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"fuzzyDating\", $$v)\n },\n expression: \"layout.fuzzyDating\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'move absolute dates into tooltips and display e.g. \"Last Thu\", \"On Tue\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Trim zero padding\",\n id: \"trim_zero\"\n },\n model: {\n value: _vm.layout.trimZero,\n callback: function($$v) {\n _vm.$set(_vm.layout, \"trimZero\", $$v)\n },\n expression: \"layout.trimZero\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'remove the leading number \"0\" shown on hour of day, and date of month'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_preset\",\n label: \"Date style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.dateStyle,\n expression: \"layout.dateStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"date_preset\",\n name: \"date_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"dateStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.datePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"time_preset\",\n label: \"Time style\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timeStyle,\n expression: \"layout.timeStyle\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"time_preset\",\n name: \"time_preset\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.layout,\n \"timeStyle\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.timePresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" seconds are only shown on the History page\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"timezone_display\",\n label: \"Timezone\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_local\",\n id: \"timezone_display_local\",\n value: \"local\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"local\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"local\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"local\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.layout.timezoneDisplay,\n expression: \"layout.timezoneDisplay\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"timezone_display_network\",\n id: \"timezone_display_network\",\n value: \"network\"\n },\n domProps: {\n checked: _vm._q(\n _vm.layout.timezoneDisplay,\n \"network\"\n )\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.layout,\n \"timezoneDisplay\",\n \"network\"\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"network\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"display dates and times in either your timezone or the shows network timezone\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Use local timezone to start searching for episodes minutes after show ends (depends on your dailysearch frequency)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Download url\",\n id: \"download_url\"\n },\n model: {\n value: _vm.general.downloadUrl,\n callback: function($$v) {\n _vm.$set(_vm.general, \"downloadUrl\", $$v)\n },\n expression: \"general.downloadUrl\"\n }\n },\n [\n _c(\"span\", { staticClass: \"component-desc\" }, [\n _vm._v(\"URL where the shows can be downloaded.\")\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"config-toggle-slider\", {\n attrs: {\n label: \"Use table pagination\",\n id: \"show_pagination\"\n },\n model: {\n value: _vm.layout.show.pagination.enable,\n callback: function($$v) {\n _vm.$set(\n _vm.layout.show.pagination,\n \"enable\",\n $$v\n )\n },\n expression: \"layout.show.pagination.enable\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(4),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"API key\",\n id: \"api_key\",\n readonly: \"readonly\"\n },\n model: {\n value: _vm.general.webInterface.apiKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"apiKey\",\n $$v\n )\n },\n expression: \"general.webInterface.apiKey\"\n }\n },\n [\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"generate_new_apikey\",\n value: \"Generate\"\n },\n on: { click: _vm.generateApiKey }\n }),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"used to give 3rd party programs limited access to Medusa\"\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"p\",\n [\n _vm._v(\n \"you can try all the features of the legacy API (v1) \"\n ),\n _c(\n \"app-link\",\n { attrs: { href: \"apibuilder/\" } },\n [_vm._v(\"here\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"HTTP logs\", id: \"web_log\" },\n model: {\n value: _vm.general.webInterface.log,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"log\", $$v)\n },\n expression: \"general.webInterface.log\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from the internal Tornado web server\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP username\",\n id: \"web_username\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.username,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"username\",\n $$v\n )\n },\n expression: \"general.webInterface.username\"\n }\n },\n [_c(\"p\", [_vm._v(\"set blank for no login\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP password\",\n id: \"web_password\",\n type: \"password\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webInterface.password,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"password\",\n $$v\n )\n },\n expression: \"general.webInterface.password\"\n }\n },\n [_c(\"p\", [_vm._v(\"blank = no authentication\")])]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox-number\",\n {\n attrs: {\n label: \"HTTP port\",\n id: \"web_port\",\n min: 1,\n step: 1\n },\n model: {\n value: _vm.general.webInterface.port,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"port\", $$v)\n },\n expression: \"general.webInterface.port\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"web port to browse and access Medusa (default:8081)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Notify on login\",\n id: \"notify_on_login\"\n },\n model: {\n value: _vm.general.webInterface.notifyOnLogin,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"notifyOnLogin\",\n $$v\n )\n },\n expression: \"general.webInterface.notifyOnLogin\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Listen on IPv6\", id: \"web_ipv6\" },\n model: {\n value: _vm.general.webInterface.ipv6,\n callback: function($$v) {\n _vm.$set(_vm.general.webInterface, \"ipv6\", $$v)\n },\n expression: \"general.webInterface.ipv6\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable to be notified when a new login happens in webserver\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable HTTPS\",\n id: \"enable_https\"\n },\n model: {\n value: _vm.general.webInterface.httpsEnable,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsEnable\",\n $$v\n )\n },\n expression: \"general.webInterface.httpsEnable\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable access to the web interface using a HTTPS address\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.webInterface.httpsEnable\n ? _c(\n \"div\",\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS certificate\",\n id: \"https_cert\"\n },\n model: {\n value: _vm.general.webInterface.httpsCert,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsCert\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsCert\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"file name or path to HTTPS certificate\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTPS key\",\n id: \"https_key\"\n },\n model: {\n value: _vm.general.webInterface.httpsKey,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"httpsKey\",\n $$v\n )\n },\n expression:\n \"general.webInterface.httpsKey\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\"file name or path to HTTPS key\")\n ])\n ]\n )\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Reverse proxy headers\",\n id: \"handle_reverse_proxy\"\n },\n model: {\n value:\n _vm.general.webInterface.handleReverseProxy,\n callback: function($$v) {\n _vm.$set(\n _vm.general.webInterface,\n \"handleReverseProxy\",\n $$v\n )\n },\n expression:\n \"general.webInterface.handleReverseProxy\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"accept the following reverse proxy headers (advanced)...\"\n ),\n _c(\"br\"),\n _vm._v(\n \"(X-Forwarded-For, X-Forwarded-Host, and X-Forwarded-Proto)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"HTTP web root\",\n id: \"web_root\",\n autocomplete: \"no\"\n },\n model: {\n value: _vm.general.webRoot,\n callback: function($$v) {\n _vm.$set(_vm.general, \"webRoot\", $$v)\n },\n expression: \"general.webRoot\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Set a base URL, for use in reverse proxies.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"blank = disabled\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Must restart to have effect. Keep in mind that any previously configured base URLs won't work, after this change.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { attrs: { id: \"advanced-settings\" } }, [\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(5),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"cpu_presets\",\n label: \"CPU throttling\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.cpuPreset,\n expression: \"general.cpuPreset\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"cpu_presets\",\n name: \"cpu_presets\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"cpuPreset\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.cpuPresetOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Normal (default). High is lower and Low is higher CPU use\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Anonymous redirect\",\n id: \"anon_redirect\"\n },\n model: {\n value: _vm.general.anonRedirect,\n callback: function($$v) {\n _vm.$set(_vm.general, \"anonRedirect\", $$v)\n },\n expression: \"general.anonRedirect\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n 'backlink protection via anonymizer service, must end in \"?\"'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Verify SSL Certs\",\n id: \"ssl_verify\"\n },\n model: {\n value: _vm.general.sslVerify,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslVerify\", $$v)\n },\n expression: \"general.sslVerify\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Verify SSL Certificates (Disable this for broken SSL installs (Like QNAP))\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"SSL CA Bundle\",\n id: \"ssl_ca_bundle\"\n },\n model: {\n value: _vm.general.sslCaBundle,\n callback: function($$v) {\n _vm.$set(_vm.general, \"sslCaBundle\", $$v)\n },\n expression: \"general.sslCaBundle\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Path to an SSL CA Bundle. Will replace default bundle(certifi) with the one specified.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This only apply to call made using Medusa's Requests implementation.\\n \"\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"No Restart\", id: \"no_restart\" },\n model: {\n value: _vm.general.noRestart,\n callback: function($$v) {\n _vm.$set(_vm.general, \"noRestart\", $$v)\n },\n expression: \"general.noRestart\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Only shutdown when restarting Medusa.\\n Only select this when you have external software restarting Medusa automatically when it stops (like FireDaemon)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Encrypt passwords\",\n id: \"encryption_version\"\n },\n model: {\n value: _vm.general.encryptionVersion,\n callback: function($$v) {\n _vm.$set(_vm.general, \"encryptionVersion\", $$v)\n },\n expression: \"general.encryptionVersion\"\n }\n },\n [\n _c(\n \"p\",\n [\n _vm._v(\"in the \"),\n _c(\"code\", [_vm._v(\"config.ini\")]),\n _vm._v(\n \" file.\\n \"\n ),\n _c(\"b\", [_vm._v(\"Warning:\")]),\n _vm._v(\" Passwords must only contain \"),\n _c(\n \"app-link\",\n {\n attrs: {\n href:\n \"https://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters\"\n }\n },\n [_vm._v(\"ASCII characters\")]\n )\n ],\n 1\n )\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Unprotected calendar\",\n id: \"calendar_unprotected\"\n },\n model: {\n value: _vm.general.calendarUnprotected,\n callback: function($$v) {\n _vm.$set(\n _vm.general,\n \"calendarUnprotected\",\n $$v\n )\n },\n expression: \"general.calendarUnprotected\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"allow subscribing to the calendar without user and password.\\n Some services like Google Calendar only work this way\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Google Calendar Icons\",\n id: \"calendar_icons\"\n },\n model: {\n value: _vm.general.calendarIcons,\n callback: function($$v) {\n _vm.$set(_vm.general, \"calendarIcons\", $$v)\n },\n expression: \"general.calendarIcons\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"show an icon next to exported calendar events in Google Calendar.\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: { label: \"Proxy host\", id: \"proxy_setting\" },\n model: {\n value: _vm.general.proxySetting,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxySetting\", $$v)\n },\n expression: \"general.proxySetting\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"blank to disable or proxy to use when connecting to providers\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for providers\",\n id: \"proxy_providers\"\n },\n model: {\n value: _vm.general.proxyProviders,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyProviders\", $$v)\n },\n expression: \"general.proxyProviders\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to providers (torrent & nzb)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for indexers\",\n id: \"proxy_indexers\"\n },\n model: {\n value: _vm.general.proxyIndexers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyIndexers\", $$v)\n },\n expression: \"general.proxyIndexers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to indexers (thetvdb, tmdb or tvmaze)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for clients\",\n id: \"proxy_clients\"\n },\n model: {\n value: _vm.general.proxyClients,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyClients\", $$v)\n },\n expression: \"general.proxyClients\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting torrent or usenet clients (nzbGet excluded)\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.proxySetting !== \"\"\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Use proxy for other sites\",\n id: \"proxy_others\"\n },\n model: {\n value: _vm.general.proxyOthers,\n callback: function($$v) {\n _vm.$set(_vm.general, \"proxyOthers\", $$v)\n },\n expression: \"general.proxyOthers\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"use proxy host for connecting to other sites.\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Skip Remove Detection\",\n id: \"skip_removed_files\"\n },\n model: {\n value: _vm.general.skipRemovedFiles,\n callback: function($$v) {\n _vm.$set(_vm.general, \"skipRemovedFiles\", $$v)\n },\n expression: \"general.skipRemovedFiles\"\n }\n },\n [\n _c(\"span\", [\n _c(\"p\", [\n _vm._v(\n \"Skip detection of removed files. If disabled the episode will be set to the default deleted status\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" This may mean Medusa misses renames as well\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"ep_default_deleted_status\",\n label: \"Default deleted episode status\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.epDefaultDeletedStatus,\n expression: \"general.epDefaultDeletedStatus\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"ep_default_deleted_status\",\n name: \"ep_default_deleted_status\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general,\n \"epDefaultDeletedStatus\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a default status\")]\n ),\n _vm._v(\" \"),\n _vm._l(_vm.defaultDeletedEpOptions, function(\n option\n ) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n })\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"Define the status to be set for media file that has been deleted.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Archived option will keep previous downloaded quality\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Example: Downloaded (1080p WEB-DL) ==> Archived (1080p WEB-DL)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(6),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Enable debug\", id: \"debug\" },\n model: {\n value: _vm.general.logs.debug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"debug\", $$v)\n },\n expression: \"general.logs.debug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable debug logs\")])]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Enable DB debug\",\n id: \"dbdebug\"\n },\n model: {\n value: _vm.general.logs.dbDebug,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"dbDebug\", $$v)\n },\n expression: \"general.logs.dbDebug\"\n }\n },\n [_c(\"p\", [_vm._v(\"Enable DB debug logs\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"config-toggle-slider\",\n {\n attrs: {\n label: \"Subliminal logs\",\n id: \"subliminal_log\"\n },\n model: {\n value: _vm.general.logs.subliminalLog,\n callback: function($$v) {\n _vm.$set(_vm.general.logs, \"subliminalLog\", $$v)\n },\n expression: \"general.logs.subliminalLog\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"enable logs from subliminal library (subtitles)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"privacy_level\",\n label: \"Privacy\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.logs.privacyLevel,\n expression: \"general.logs.privacyLevel\"\n }\n ],\n staticClass: \"form-control input-sm\",\n attrs: {\n id: \"privacy_level\",\n name: \"privacy_level\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.$set(\n _vm.general.logs,\n \"privacyLevel\",\n $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n )\n }\n }\n },\n _vm._l(_vm.privacyLevelOptions, function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(\n \"\\n Set the level of log-filtering.\\n Normal (default).\\n \"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"custom_logs\",\n label:\n \"Overwrite log levels for overwritable logs\"\n }\n },\n [_c(\"custom-logs\")],\n 1\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"row component-group\" }, [\n _vm._m(7),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"col-xs-12 col-md-10\" }, [\n _c(\n \"fieldset\",\n { staticClass: \"component-group-list\" },\n [\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"github_remote_branches\",\n label: \"Branch version\"\n }\n },\n [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedBranch,\n expression: \"selectedBranch\"\n }\n ],\n staticClass:\n \"form-control input-sm margin-bottom-5\",\n attrs: {\n id: \"github_remote_branches\",\n name: \"github_remote_branches\"\n },\n on: {\n change: function($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function(o) {\n return o.selected\n })\n .map(function(o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedBranch = $event.target.multiple\n ? $$selectedVal\n : $$selectedVal[0]\n }\n }\n },\n [\n _c(\n \"option\",\n { attrs: { disabled: \"\", value: \"\" } },\n [_vm._v(\"Please select a branch\")]\n ),\n _vm._v(\" \"),\n _vm._l(\n _vm.githubRemoteBranchesOptions,\n function(option) {\n return _c(\n \"option\",\n {\n key: option.value,\n domProps: { value: option.value }\n },\n [_vm._v(_vm._s(option.text))]\n )\n }\n )\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n disabled: !_vm.githubBranches.length > 0,\n type: \"button\",\n id: \"branchCheckout\",\n value: \"Checkout Branch\"\n },\n on: { click: _vm.validateCheckoutBranch }\n }),\n _vm._v(\" \"),\n !_vm.githubBranches.length > 0\n ? _c(\n \"span\",\n { staticStyle: { color: \"rgb(255, 0, 0)\" } },\n [\n _c(\"p\", [\n _vm._v(\"Error: No branches found.\")\n ])\n ]\n )\n : _c(\"p\", [\n _vm._v(\n \"select branch to use (restart required)\"\n )\n ]),\n _vm._v(\" \"),\n _vm.checkoutBranchMessage\n ? _c(\n \"p\",\n [\n _c(\"state-switch\", {\n attrs: {\n state: \"loading\",\n theme: _vm.layout.themeName\n }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _vm._v(_vm._s(_vm.checkoutBranchMessage))\n ])\n ],\n 1\n )\n : _vm._e()\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"date_presets\",\n label: \"GitHub authentication type\"\n }\n },\n [\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_basic\",\n id: \"git_auth_type_basic\"\n },\n domProps: {\n value: 0,\n checked: _vm._q(_vm.general.git.authType, 0)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 0\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Username and password\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"radio-item\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.general.git.authType,\n expression: \"general.git.authType\"\n }\n ],\n attrs: {\n type: \"radio\",\n name: \"git_auth_type_token\",\n id: \"git_auth_type_token\"\n },\n domProps: {\n value: 1,\n checked: _vm._q(_vm.general.git.authType, 1)\n },\n on: {\n change: function($event) {\n return _vm.$set(\n _vm.general.git,\n \"authType\",\n 1\n )\n }\n }\n }),\n _vm._v(\" \"),\n _c(\"label\", { attrs: { for: \"one\" } }, [\n _vm._v(\"Personal access token\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n 'You must use a personal access token if you\\'re using \"two-factor authentication\" on GitHub.'\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType === 0,\n expression: \"general.git.authType === 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub username\",\n id: \"git_username\"\n },\n model: {\n value: _vm.general.git.username,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"username\", $$v)\n },\n expression: \"general.git.username\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub password\",\n id: \"git_password\",\n type: \"password\"\n },\n model: {\n value: _vm.general.git.password,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"password\", $$v)\n },\n expression: \"general.git.password\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.general.git.authType !== 0,\n expression: \"general.git.authType !== 0\"\n }\n ]\n },\n [\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub personal access token\",\n id: \"git_token\",\n \"input-class\":\n \"display-inline margin-bottom-5\"\n },\n nativeOn: {\n focus: function($event) {\n return $event.target.select()\n }\n },\n model: {\n value: _vm.general.git.token,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"token\", $$v)\n },\n expression: \"general.git.token\"\n }\n },\n [\n _vm.general.git.token === \"\"\n ? [\n _c(\n \"v-popover\",\n {\n attrs: {\n trigger: \"click\",\n offset: \"16\",\n placement: \"right\",\n popoverBaseClass: \"tooltip-base\",\n popoverClass:\n \"tooltip-themed\" +\n (_vm.layout.themeName === \"dark\"\n ? \"-dark\"\n : \"-light\")\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"create_access_token\",\n value: \"Generate Token\"\n }\n }),\n _vm._v(\" \"),\n _c(\"template\", { slot: \"popover\" }, [\n _c(\n \"div\",\n { staticClass: \"tooltip-title\" },\n [_vm._v(\"Github Token\")]\n ),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"tooltip-content\"\n },\n [\n _c(\"p\", [\n _vm._v(\n \"Copy the generated token and paste it in the token input box.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general\n .anonRedirect ||\n \"\") +\n \"https://github.com/settings/tokens/new?description=Medusa&scopes=gist,public_repo\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa\",\n attrs: {\n type: \"button\",\n value:\n \"Continue to Github...\"\n }\n })\n ]\n )\n ]),\n _c(\"br\")\n ]\n )\n ])\n ],\n 2\n )\n ]\n : [\n _c(\n \"a\",\n {\n attrs: {\n href:\n (_vm.general.anonRedirect || \"\") +\n \"https://github.com/settings/tokens\",\n target: \"_blank\"\n }\n },\n [\n _c(\"input\", {\n staticClass:\n \"btn-medusa btn-inline\",\n attrs: {\n type: \"button\",\n id: \"manage_tokens\",\n value: \"Manage Tokens\"\n }\n })\n ]\n )\n ],\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"*** (REQUIRED FOR SUBMITTING ISSUES) ***\"\n )\n ])\n ],\n 2\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"GitHub remote for branch\",\n id: \"git_remote\"\n },\n model: {\n value: _vm.general.git.remote,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"remote\", $$v)\n },\n expression: \"general.git.remote\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"default:origin. Access repo configured remotes (save then refresh browser)\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"config-textbox\",\n {\n attrs: {\n label: \"Git executable path\",\n id: \"git_path\"\n },\n model: {\n value: _vm.general.git.path,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"path\", $$v)\n },\n expression: \"general.git.path\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"only needed if OS is unable to locate git from env\"\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-toggle-slider\",\n {\n attrs: { label: \"Git reset\", id: \"git_reset\" },\n model: {\n value: _vm.general.git.reset,\n callback: function($$v) {\n _vm.$set(_vm.general.git, \"reset\", $$v)\n },\n expression: \"general.git.reset\"\n }\n },\n [\n _c(\"p\", [\n _vm._v(\n \"removes untracked files and performs a hard reset on git branch automatically to help resolve update issues\"\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.general.developer\n ? _c(\n \"config-template\",\n {\n attrs: {\n \"label-for\": \"git_reset_branches\",\n label: \"Branches to reset\"\n }\n },\n [\n _c(\"multiselect\", {\n attrs: {\n multiple: true,\n options: _vm.githubBranches\n },\n model: {\n value: _vm.general.git.resetBranches,\n callback: function($$v) {\n _vm.$set(\n _vm.general.git,\n \"resetBranches\",\n $$v\n )\n },\n expression: \"general.git.resetBranches\"\n }\n }),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa btn-inline\",\n staticStyle: { \"margin-left\": \"6px\" },\n attrs: {\n type: \"button\",\n id: \"branch_force_update\",\n value: \"Update Branches\"\n },\n on: { click: _vm.githubBranchForceUpdate }\n }),\n _vm._v(\" \"),\n _c(\"span\", [\n _c(\"b\", [_vm._v(\"Note:\")]),\n _vm._v(\n \" Empty selection means that any branch could be reset.\"\n )\n ])\n ],\n 1\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa config_submitter\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ],\n 1\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\"h6\", { staticClass: \"pull-right\" }, [\n _c(\"b\", [\n _vm._v(\"All non-absolute folder locations are relative to \"),\n _c(\"span\", { staticClass: \"path\" }, [\n _vm._v(_vm._s(_vm.system.dataDir))\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\"input\", {\n staticClass: \"btn-medusa pull-left config_submitter button\",\n attrs: { type: \"submit\", value: \"Save Changes\" }\n })\n ])\n ]\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"modal\",\n {\n attrs: {\n name: \"query-upgrade-database\",\n height: \"auto\",\n width: \"80%\"\n }\n },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Upgrade database model?\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Changing branch will upgrade your database\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\"You won't be able to downgrade afterward.\")\n ]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Do you want to continue?\")])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-upgrade-database\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.checkoutBranch()\n _vm.$modal.hide(\"query-upgrade-database\")\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"modal\",\n { attrs: { name: \"query-restart\", height: \"auto\", width: \"80%\" } },\n [\n _c(\"transition\", { attrs: { name: \"modal\" } }, [\n _c(\"div\", { staticClass: \"modal-mask\" }, [\n _c(\"div\", { staticClass: \"modal-wrapper\" }, [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _c(\"div\", { staticClass: \"modal-header\" }, [\n _vm._v(\n \"\\n Checking out a branch requires a restart\\n \"\n )\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [\n _c(\"p\", [\n _vm._v(\"Would you like to start a restart of medusa now?\")\n ])\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-footer\" }, [\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-danger\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.checkoutBranchMessage = \"\"\n }\n }\n },\n [_vm._v(\"No\")]\n ),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass: \"btn-medusa btn-success\",\n attrs: { type: \"button\", \"data-dismiss\": \"modal\" },\n on: {\n click: function($event) {\n _vm.$modal.hide(\"query-restart\")\n _vm.$router.push({ name: \"restart\" })\n }\n }\n },\n [_vm._v(\"Yes\")]\n )\n ])\n ])\n ])\n ])\n ])\n ],\n 1\n )\n ],\n 1\n )\n}\nvar staticRenderFns = [\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Misc\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"Startup options. Indexer options. Log and show file locations.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"Some options may require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Indexer\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for controlling the show indexers.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Updates\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for software updates.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"User Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for visual appearance.\")])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"Web Interface\")]),\n _vm._v(\" \"),\n _c(\"p\", [\n _vm._v(\n \"It is recommended that you enable a username and password to secure Medusa from being tampered with remotely.\"\n )\n ]),\n _vm._v(\" \"),\n _c(\"p\", [\n _c(\"b\", [\n _vm._v(\"These options require a manual restart to take effect.\")\n ])\n ])\n ]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Advanced Settings\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [_c(\"h3\", [_vm._v(\"Logging\")])]\n )\n },\n function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n { staticClass: \"component-group-desc col-xs-12 col-md-2\" },\n [\n _c(\"h3\", [_vm._v(\"GitHub\")]),\n _vm._v(\" \"),\n _c(\"p\", [_vm._v(\"Options for github related features.\")])\n ]\n )\n }\n]\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://slim/./src/components/config-general.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), diff --git a/themes/light/assets/js/vendors~date-fns.js b/themes/light/assets/js/vendors~date-fns.js index 604a08e278..c1ea2b4a91 100644 --- a/themes/light/assets/js/vendors~date-fns.js +++ b/themes/light/assets/js/vendors~date-fns.js @@ -98,21 +98,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js": -/*!***************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js ***! - \***************************************************************/ -/*! namespace exports */ -/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ -/*! other exports [not provided] [no usage info] */ -/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date).getTime() - (0,_startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js?"); - -/***/ }), - /***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js": /*!*******************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeekYear/index.js ***! @@ -128,10 +113,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/getUTCWeek/index.js": -/*!************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js ***! - \************************************************************/ +/***/ "./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js": +/*!***************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js ***! + \***************************************************************/ /*! namespace exports */ /*! export default [provided] [no usage info] [missing usage info prevents renaming] */ /*! other exports [not provided] [no usage info] */ @@ -139,7 +124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date, options).getTime() - (0,_startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCISOWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js\");\n/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCISOWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date).getTime() - (0,_startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCISOWeek/index.js?"); /***/ }), @@ -158,6 +143,21 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/date-fns/esm/_lib/getUTCWeek/index.js": +/*!************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/getUTCWeek/index.js ***! + \************************************************************/ +/*! namespace exports */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ getUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../startOfUTCWeek/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js\");\n/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../startOfUTCWeekYear/index.js */ \"./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n\n\nvar MILLISECONDS_IN_WEEK = 604800000; // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction getUTCWeek(dirtyDate, options) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var diff = (0,_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(date, options).getTime() - (0,_startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__.default)(date, options).getTime(); // Round the number of days to the nearest integer\n // because the number of milliseconds in a week is not constant\n // (e.g. it's different in the week of the daylight saving time clock shift)\n\n return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/getUTCWeek/index.js?"); + +/***/ }), + /***/ "./node_modules/date-fns/esm/_lib/protectedTokens/index.js": /*!*****************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/protectedTokens/index.js ***! @@ -190,21 +190,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js": -/*!*******************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js ***! - \*******************************************************************/ -/*! namespace exports */ -/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ -/*! other exports [not provided] [no usage info] */ -/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js?"); - -/***/ }), - /***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js": /*!***********************************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js ***! @@ -220,10 +205,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), -/***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js": -/*!****************************************************************!*\ - !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js ***! - \****************************************************************/ +/***/ "./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js": +/*!*******************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js ***! + \*******************************************************************/ /*! namespace exports */ /*! export default [provided] [no usage info] [missing usage info prevents renaming] */ /*! other exports [not provided] [no usage info] */ @@ -231,7 +216,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCISOWeek\n/* harmony export */ });\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCISOWeek(dirtyDate) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var weekStartsOn = 1;\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js?"); /***/ }), @@ -250,6 +235,21 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js": +/*!****************************************************************!*\ + !*** ./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js ***! + \****************************************************************/ +/*! namespace exports */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => /* binding */ startOfUTCWeek\n/* harmony export */ });\n/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../toInteger/index.js */ \"./node_modules/date-fns/esm/_lib/toInteger/index.js\");\n/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../toDate/index.js */ \"./node_modules/date-fns/esm/toDate/index.js\");\n/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../requiredArgs/index.js */ \"./node_modules/date-fns/esm/_lib/requiredArgs/index.js\");\n\n\n // This function will be a part of public API when UTC function will be implemented.\n// See issue: https://github.com/date-fns/date-fns/issues/376\n\nfunction startOfUTCWeek(dirtyDate, dirtyOptions) {\n (0,_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__.default)(1, arguments);\n var options = dirtyOptions || {};\n var locale = options.locale;\n var localeWeekStartsOn = locale && locale.options && locale.options.weekStartsOn;\n var defaultWeekStartsOn = localeWeekStartsOn == null ? 0 : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(localeWeekStartsOn);\n var weekStartsOn = options.weekStartsOn == null ? defaultWeekStartsOn : (0,_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__.default)(options.weekStartsOn); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN\n\n if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {\n throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');\n }\n\n var date = (0,_toDate_index_js__WEBPACK_IMPORTED_MODULE_2__.default)(dirtyDate);\n var day = date.getUTCDay();\n var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n date.setUTCDate(date.getUTCDate() - diff);\n date.setUTCHours(0, 0, 0, 0);\n return date;\n}\n\n//# sourceURL=webpack://slim/./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js?"); + +/***/ }), + /***/ "./node_modules/date-fns/esm/_lib/toInteger/index.js": /*!***********************************************************!*\ !*** ./node_modules/date-fns/esm/_lib/toInteger/index.js ***!