Work on big refactor

This commit is contained in:
2018-10-13 23:01:45 +03:00
parent ae77251883
commit 1d5c7ea24b
447 changed files with 67198 additions and 1226 deletions

View File

@ -28,11 +28,13 @@ DEBUG = True
ALLOWED_HOSTS = []
SESSION_COOKIE_AGE = 3600 * 30 # one month
# Application definition
INSTALLED_APPS = [
'YtManagerApp.apps.YtManagerAppConfig',
'crispy_forms',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
@ -116,7 +118,6 @@ USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.11/howto/static-files/
@ -124,19 +125,6 @@ STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = 'D:\\Dev\\youtube-channel-manager\\temp\\media'
CRISPY_TEMPLATE_PACK = 'bootstrap4'
# 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
LOGIN_REDIRECT_URL = '/'

View File

@ -13,21 +13,11 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.urls import path
from django.conf.urls import include
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
from YtManagerApp import views
from django.urls import path
urlpatterns = [
path('admin/', admin.site.urls),
path('ajax/get_children', views.ajax_get_children, name='ajax_get_children'),
path('ajax/get_folders', views.ajax_get_folders, name='ajax_get_folders'),
path('ajax/edit_folder', views.ajax_edit_folder, name='ajax_edit_folder'),
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)
path('', include('YtManagerApp.urls')),
]