Added /media location to nginx, so it fetches the downloaded thumbnails.

This commit is contained in:
Tiberiu Chibici 2018-11-02 02:50:49 +02:00
parent 2a8cc8da0e
commit d8f4151242
5 changed files with 193 additions and 58 deletions

View File

@ -2,8 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="245751b6-c863-4572-8723-8499964fe105" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/config/defaults.ini" beforeDir="false" afterPath="$PROJECT_DIR$/config/defaults.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docker/init.sh" beforeDir="false" afterPath="$PROJECT_DIR$/docker/init.sh" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Dockerfile" beforeDir="false" afterPath="$PROJECT_DIR$/Dockerfile" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/YtManagerApp/management/jobs/download_video.py" beforeDir="false" afterPath="$PROJECT_DIR$/app/YtManagerApp/management/jobs/download_video.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/config/config.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docker-compose.yml" beforeDir="false" afterPath="$PROJECT_DIR$/docker-compose.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docker/nginx/nginx.conf" beforeDir="false" afterPath="$PROJECT_DIR$/docker/nginx/nginx.conf" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" />
@ -149,20 +152,20 @@
</usages-collector>
<usages-collector id="statistics.file.extensions.open">
<counts>
<entry key="Dockerfile" value="2" />
<entry key="Dockerfile" value="3" />
<entry key="auth_group" value="1" />
<entry key="conf" value="1" />
<entry key="conf" value="2" />
<entry key="env" value="4" />
<entry key="gitignore" value="1" />
<entry key="html" value="4" />
<entry key="ini" value="19" />
<entry key="log" value="2" />
<entry key="md" value="8" />
<entry key="py" value="66" />
<entry key="py" value="70" />
<entry key="scss" value="2" />
<entry key="sh" value="7" />
<entry key="txt" value="5" />
<entry key="yml" value="4" />
<entry key="yml" value="5" />
<entry key="ytmanagerapp_channel" value="1" />
<entry key="ytmanagerapp_subscription" value="2" />
<entry key="ytmanagerapp_video" value="3" />
@ -172,28 +175,29 @@
<counts>
<entry key="Bash" value="7" />
<entry key="Database Element" value="7" />
<entry key="Dockerfile" value="2" />
<entry key="Dockerfile" value="3" />
<entry key="HTML" value="4" />
<entry key="Ini" value="19" />
<entry key="Log" value="1" />
<entry key="Markdown" value="8" />
<entry key="PLAIN_TEXT" value="12" />
<entry key="Python" value="66" />
<entry key="PLAIN_TEXT" value="13" />
<entry key="Python" value="70" />
<entry key="SCSS" value="2" />
<entry key="YAML" value="4" />
<entry key="YAML" value="5" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.extensions.edit">
<counts>
<entry key="Django Console" value="466" />
<entry key="Dockerfile" value="266" />
<entry key="conf" value="12" />
<entry key="html" value="12" />
<entry key="ini" value="1483" />
<entry key="md" value="4881" />
<entry key="py" value="6482" />
<entry key="py" value="6889" />
<entry key="py@youtube-channel-manager" value="48" />
<entry key="sh" value="53" />
<entry key="yml" value="129" />
<entry key="yml" value="148" />
</counts>
</usages-collector>
<usages-collector id="statistics.file.types.edit">
@ -204,15 +208,67 @@
<entry key="HTML" value="12" />
<entry key="Ini" value="1483" />
<entry key="Markdown" value="4877" />
<entry key="PLAIN_TEXT" value="18" />
<entry key="Python" value="6948" />
<entry key="YAML" value="129" />
<entry key="PLAIN_TEXT" value="30" />
<entry key="Python" value="7355" />
<entry key="YAML" value="148" />
</counts>
</usages-collector>
</session>
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docker-compose.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" selection-start-line="22" selection-end-line="22" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/downloader.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#43#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/download_video.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="309">
<caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
<folding>
<element signature="e#0#37#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/synchronize.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="16" selection-start-line="1" selection-start-column="16" selection-end-line="2" selection-end-column="26" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/delete_video.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docker/init.sh">
<provider selected="true" editor-type-id="text-editor">
@ -222,7 +278,16 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="23" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/config/defaults.ini">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="645">
@ -231,6 +296,15 @@
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/docker/nginx/nginx.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" selection-start-line="21" selection-end-line="21" />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@ -299,8 +373,6 @@
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/YtManagerApp/templates/YtManagerApp/controls/modal.html" />
<option value="$PROJECT_DIR$/YtManagerApp/views/controls/modal.py" />
<option value="$PROJECT_DIR$/YtManagerApp/templates/YtManagerApp/controls/subscription_update_modal.html" />
<option value="$PROJECT_DIR$/YtManagerApp/templates/YtManagerApp/controls/folder_delete_modal.html" />
<option value="$PROJECT_DIR$/YtManagerApp/templates/YtManagerApp/js/subscription_tree.js" />
@ -344,12 +416,14 @@
<option value="$PROJECT_DIR$/app/YtManagerApp/urls.py" />
<option value="$PROJECT_DIR$/docker/config.ini" />
<option value="$PROJECT_DIR$/Dockerfile" />
<option value="$PROJECT_DIR$/docker-compose.yml" />
<option value="$PROJECT_DIR$/config/config.ini" />
<option value="$PROJECT_DIR$/app/YtManagerApp/utils/extended_interpolation_with_env.py" />
<option value="$PROJECT_DIR$/app/YtManager/settings.py" />
<option value="$PROJECT_DIR$/docker/init.sh" />
<option value="$PROJECT_DIR$/config/defaults.ini" />
<option value="$PROJECT_DIR$/docker/nginx/nginx.conf" />
<option value="$PROJECT_DIR$/docker-compose.yml" />
<option value="$PROJECT_DIR$/app/YtManagerApp/management/jobs/download_video.py" />
</list>
</option>
</component>
@ -431,6 +505,33 @@
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="app" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="app" type="462c0819:PsiDirectoryNode" />
<item name="YtManager" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="app" type="462c0819:PsiDirectoryNode" />
<item name="YtManagerApp" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="app" type="462c0819:PsiDirectoryNode" />
<item name="YtManagerApp" type="462c0819:PsiDirectoryNode" />
<item name="management" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="app" type="462c0819:PsiDirectoryNode" />
<item name="YtManagerApp" type="462c0819:PsiDirectoryNode" />
<item name="management" type="462c0819:PsiDirectoryNode" />
<item name="jobs" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
@ -441,6 +542,12 @@
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="docker" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="youtube-channel-manager" type="b2602c69:ProjectViewProjectNode" />
<item name="youtube-channel-manager" type="462c0819:PsiDirectoryNode" />
<item name="docker" type="462c0819:PsiDirectoryNode" />
<item name="nginx" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
@ -674,22 +781,6 @@
<option name="myLimit" value="2678400000" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/YtManagerApp/utils/iterutils.py" />
<entry file="das://77df9da5-0b97-445e-a895-744ef8257a74/schema/main/table/ytmanagerapp_channel" />
<entry file="das://77df9da5-0b97-445e-a895-744ef8257a74/schema/main/table/ytmanagerapp_subscription">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
<entry file="das://77df9da5-0b97-445e-a895-744ef8257a74/schema/main/table/ytmanagerapp_video">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/external/pytaw/README.md" />
<entry file="file://$PROJECT_DIR$/YtManagerApp/management/management.py" />
<entry file="file:///usr/local/lib/python3.6/dist-packages/django/forms/utils.py">
@ -776,6 +867,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="12">
<caret line="81" column="24" lean-forward="true" selection-start-line="81" selection-start-column="24" selection-end-line="81" selection-end-column="24" />
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
@ -794,13 +888,6 @@
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/log.log" />
<entry file="file://$PROJECT_DIR$/docker/nginx/nginx.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="465">
<caret line="31" lean-forward="true" selection-start-line="31" selection-end-line="31" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/sqlite3.env.env" />
<entry file="file://$PROJECT_DIR$/docker/config.ini">
<provider selected="true" editor-type-id="text-editor">
@ -816,13 +903,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="165">
<caret line="11" column="22" lean-forward="true" selection-start-line="11" selection-start-column="22" selection-end-line="11" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file:///usr/lib/python3.6/configparser.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="242">
@ -857,13 +937,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docker-compose.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="270">
<caret line="18" column="12" lean-forward="true" selection-start-line="18" selection-start-column="12" selection-end-line="18" selection-end-column="12" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docker/init.sh">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
@ -871,6 +944,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docker/nginx/nginx.conf">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="315">
<caret line="21" selection-start-line="21" selection-end-line="21" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/Dockerfile">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="345">
<caret line="23" selection-start-line="23" selection-end-line="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/defaults.ini">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="645">
@ -878,5 +965,47 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/docker-compose.yml">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="330">
<caret line="22" selection-start-line="22" selection-end-line="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/downloader.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#43#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/delete_video.py">
<provider selected="true" editor-type-id="text-editor">
<state>
<folding>
<element signature="e#0#14#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/synchronize.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="15">
<caret line="1" column="16" selection-start-line="1" selection-start-column="16" selection-end-line="2" selection-end-column="26" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app/YtManagerApp/management/jobs/download_video.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="309">
<caret line="82" lean-forward="true" selection-start-line="82" selection-end-line="82" />
<folding>
<element signature="e#0#37#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</component>
</project>

View File

@ -10,6 +10,7 @@ COPY ./requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
ENV YTSM_DEBUG='False'
ENV YTSM_DATA_PATH='/usr/src/ytsm/data'
VOLUME /usr/src/ytsm/config
VOLUME /usr/src/ytsm/data
@ -19,4 +20,4 @@ COPY ./docker/init.sh ./
EXPOSE 8000
CMD ["/bin/bash", "init.sh"]
CMD ["/bin/bash", "init.sh"]

View File

@ -69,7 +69,7 @@ Debug=${env:YTSM_DEBUG}
;DownloadOrder=playlist
; Path where downloaded videos are stored
;DownloadPath=data/media/videos
DownloadPath=${env:YTSM_DATA_PATH}/videos
; A pattern which describes how downloaded files are organized. Extensions are automatically appended.
; Supported fields: channel, channel_id, playlist, playlist_id, playlist_index, title, id

View File

@ -6,6 +6,7 @@ services:
volumes:
- ./docker/nginx:/etc/nginx/conf.d/
- ./app/YtManagerApp/static:/www/static
- ./data/media:/www/media
ports:
- "80:80"
depends_on:

View File

@ -15,6 +15,10 @@ server {
alias /www/static;
expires 30d;
}
location /media {
alias /www/media;
expires 30d;
}
location / {
try_files $uri @proxy_to_app;