Big refactor
This commit is contained in:
		@@ -15,7 +15,6 @@ import os
 | 
			
		||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
 | 
			
		||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Quick-start development settings - unsuitable for production
 | 
			
		||||
# See https://docs.djangoproject.com/en/1.11/howto/deployment/checklist/
 | 
			
		||||
 | 
			
		||||
@@ -63,6 +62,7 @@ TEMPLATES = [
 | 
			
		||||
            'context_processors': [
 | 
			
		||||
                'django.template.context_processors.debug',
 | 
			
		||||
                'django.template.context_processors.request',
 | 
			
		||||
                'django.template.context_processors.media',
 | 
			
		||||
                'django.contrib.auth.context_processors.auth',
 | 
			
		||||
                'django.contrib.messages.context_processors.messages',
 | 
			
		||||
            ],
 | 
			
		||||
@@ -121,3 +121,22 @@ USE_TZ = True
 | 
			
		||||
# https://docs.djangoproject.com/en/1.11/howto/static-files/
 | 
			
		||||
 | 
			
		||||
STATIC_URL = '/static/'
 | 
			
		||||
MEDIA_URL = '/media/'
 | 
			
		||||
MEDIA_ROOT = 'D:\\Dev\\youtube-channel-manager\\temp\\media'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Application settings
 | 
			
		||||
# These should be moved to an ini file or something
 | 
			
		||||
DOWNLOADER_PATH = "D:\\Dev\\youtube-channel-manager\\temp\\download"
 | 
			
		||||
DOWNLOADER_FILE_PATTERN = "{channel}/{playlist}/S01E{playlist_index} - {title} [{id}].{ext}"
 | 
			
		||||
DOWNLOADER_FORMAT = "bestvideo+bestaudio"
 | 
			
		||||
DOWNLOADER_SUBTITLES = True
 | 
			
		||||
DOWNLOADER_SUBTITLES_LANGS = None
 | 
			
		||||
DOWNLOADER_AUTOGENERATED_SUBTITLES = False
 | 
			
		||||
DOWNLOADER_DEFAULT_DOWNLOAD_ENABLED = True
 | 
			
		||||
DOWNLOADER_DEFAULT_DOWNLOAD_LIMIT = 5        # -1 = no limit (all)
 | 
			
		||||
DOWNLOADER_DEFAULT_ORDER = 'playlist_index' # publish_date, playlist_index
 | 
			
		||||
MANAGER_MARK_DELETED_AS_WATCHED = True
 | 
			
		||||
MANAGER_DEFAULT_DELETE_AFTER_WATCHED = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -15,6 +15,8 @@ Including another URLconf
 | 
			
		||||
"""
 | 
			
		||||
from django.urls import path
 | 
			
		||||
from django.contrib import admin
 | 
			
		||||
from django.conf.urls.static import static
 | 
			
		||||
from django.conf import settings
 | 
			
		||||
 | 
			
		||||
from YtManagerApp import views
 | 
			
		||||
 | 
			
		||||
@@ -26,5 +28,6 @@ urlpatterns = [
 | 
			
		||||
    path('ajax/delete_folder/<int:fid>/', views.ajax_delete_folder, name='ajax_delete_folder'),
 | 
			
		||||
    path('ajax/edit_subscription', views.ajax_edit_subscription, name='ajax_edit_subscription'),
 | 
			
		||||
    path('ajax/delete_subscription/<int:sid>/', views.ajax_delete_subscription, name='ajax_delete_subscription'),
 | 
			
		||||
    path('ajax/list_videos', views.ajax_list_videos, name='ajax_list_videos'),
 | 
			
		||||
    path(r'', views.index, name='home')
 | 
			
		||||
]
 | 
			
		||||
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user