Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft showing changes undergoing testing #682

Draft
wants to merge 566 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
566 commits
Select commit Hold shift + click to select a range
1c54d07
Merge pull request #185 from tcely/patch-5
tcely Jan 29, 2025
871c3fc
Merge pull request #186 from tcely/patch-5
tcely Jan 29, 2025
47a76ec
Merge pull request #187 from tcely/patch-5
tcely Jan 29, 2025
ac0946e
Merge branch 'test-2' into resolve-1
tcely Jan 30, 2025
d51b7e7
Merge pull request #188 from tcely/resolve-1
tcely Jan 30, 2025
947d315
Merge pull request #190 from tcely/patch-5
tcely Jan 30, 2025
18ff214
Merge pull request #192 from tcely/patch-5
tcely Jan 30, 2025
21d5faa
Merge pull request #193 from tcely/patch-6
tcely Jan 30, 2025
babce8f
Merge pull request #194 from tcely/patch-5
tcely Jan 30, 2025
39e412d
Merge pull request #195 from tcely/patch-2
tcely Jan 31, 2025
2df8bf8
Merge pull request #196 from tcely/patch-5
tcely Jan 31, 2025
2b2da21
Build `CommaSepChoiceField` from `CharField`
tcely Jan 31, 2025
5351428
Add `max_length` required by `CharField`
tcely Jan 31, 2025
5741433
Merge branch 'test-2' into resolve-1
tcely Jan 31, 2025
c795af6
Merge pull request #198 from tcely/resolve-1
tcely Jan 31, 2025
b29cd79
Merge pull request #197 from tcely/patch-9
tcely Jan 31, 2025
edb9787
Add migration for `CommaSepChoiceField`
tcely Jan 31, 2025
43dabe3
Update 0016_auto_20230214_2052.py
tcely Jan 31, 2025
909e0e0
Merge pull request #199 from tcely/patch-9
tcely Jan 31, 2025
779c266
Update 0017_alter_source_sponsorblock_categories.py
tcely Jan 31, 2025
7a8b556
Merge pull request #200 from tcely/patch-9
tcely Jan 31, 2025
ee9bb8b
Update 0027_alter_source_sponsorblock_categories.py
tcely Jan 31, 2025
37458e6
Merge pull request #201 from tcely/patch-9
tcely Jan 31, 2025
5e40694
Convert string to selected_choices
tcely Jan 31, 2025
24dce5b
Merge pull request #202 from tcely/patch-9
tcely Jan 31, 2025
f714c30
Prevent my environment variables from causing failures
tcely Jan 31, 2025
b8126d8
Merge pull request #203 from tcely/patch-9
tcely Jan 31, 2025
1117ba6
Fix an unexpected keyword argument 'max_length'
tcely Jan 31, 2025
a7254f2
Merge pull request #204 from tcely/patch-9
tcely Jan 31, 2025
713dedd
Go back to models.Field
tcely Jan 31, 2025
74b1a28
Merge pull request #205 from tcely/patch-9
tcely Jan 31, 2025
12e046d
Serialization changes
tcely Jan 31, 2025
089d870
Merge pull request #206 from tcely/patch-9
tcely Jan 31, 2025
cf3dfdb
fixup: return the value
tcely Jan 31, 2025
1388341
Merge pull request #207 from tcely/patch-9
tcely Jan 31, 2025
4c62382
Merge pull request #208 from tcely/patch-3
tcely Jan 31, 2025
6ab4dc5
More fixes from testing
tcely Jan 31, 2025
a289f7a
Merge pull request #209 from tcely/patch-9
tcely Jan 31, 2025
41b6a0c
More fixes
tcely Jan 31, 2025
a1795a8
Merge pull request #210 from tcely/patch-9
tcely Jan 31, 2025
19de389
Revert 0016_auto_20230214_2052.py
tcely Jan 31, 2025
7affddf
Revert 0017_alter_source_sponsorblock_categories.py
tcely Jan 31, 2025
a60e766
Revert 0027_alter_source_sponsorblock_categories.py
tcely Jan 31, 2025
a1d05d5
Merge pull request #211 from tcely/patch-9
tcely Jan 31, 2025
0ca66b5
Delete tubesync/sync/migrations/0028_alter_source_sponsorblock_catego…
tcely Jan 31, 2025
93dee7c
Merge pull request #212 from tcely/patch-9
tcely Jan 31, 2025
b95cacd
Add files via upload
tcely Feb 1, 2025
15e3303
Cleanup the uploaded file and document hard won knowledge
tcely Feb 1, 2025
3f2d164
Add `separator` for use by `get_prep_value`
tcely Feb 1, 2025
ad80751
`t` is a poor name for the choice
tcely Feb 1, 2025
b3eb705
Merge pull request #213 from tcely/patch-9
tcely Feb 1, 2025
ccf24e0
Matched up names can be passed as a filtered dictionary
tcely Feb 1, 2025
eaea061
Add a comment about the compact `formfield` args method
tcely Feb 1, 2025
20ca17c
Add functions that may help with the validation problem
tcely Feb 1, 2025
bac6355
An extra 'e' has appeared
tcely Feb 1, 2025
b18d19f
Provide default values for `CommaSepChoice`
tcely Feb 1, 2025
5f3c60e
Remove unused import: `Optional`
tcely Feb 1, 2025
526931d
Replace `option.checked` with `option.selected`
tcely Feb 1, 2025
f60b0f7
Stop setting the additional `checked` key
tcely Feb 1, 2025
9bc1a84
Use bitwise or
tcely Feb 1, 2025
b2ec287
Remove the outdated comment
tcely Feb 1, 2025
0e9b473
Clarify the `options` variables
tcely Feb 1, 2025
8494edb
Set `self.form_class` once
tcely Feb 1, 2025
a6b84b4
Preserve access to context
tcely Feb 1, 2025
045a1ca
Merge pull request #214 from tcely/patch-9
tcely Feb 1, 2025
44c0fba
Set choices for the ancestor classes
tcely Feb 1, 2025
c994a16
Cleanup from testing
tcely Feb 1, 2025
e5d2565
Merge pull request #215 from tcely/patch-9
tcely Feb 1, 2025
430b096
Handle `self.choices` better
tcely Feb 1, 2025
280715e
Restore `self.choices` after clearing it
tcely Feb 1, 2025
94723d1
Merge pull request #216 from tcely/patch-9
tcely Feb 1, 2025
4aa7a09
Do not call `CharField.formfield()`
tcely Feb 1, 2025
5ccda92
Use `grandparent` variable to make things clearer
tcely Feb 1, 2025
c5f8f4a
Merge pull request #217 from tcely/patch-9
tcely Feb 1, 2025
0a29a05
Fixes from testing
tcely Feb 1, 2025
3fe08db
Merge pull request #218 from tcely/patch-9
tcely Feb 1, 2025
ad96946
Merge pull request #219 from tcely/main
tcely Feb 1, 2025
5f95dfe
Merge pull request #220 from tcely/main
tcely Feb 1, 2025
f08ef11
Cleanup temporary logging
tcely Feb 2, 2025
7d38f41
Merge pull request #221 from tcely/patch-9
tcely Feb 2, 2025
90b9da0
Update 0027_alter_source_sponsorblock_categories.py
tcely Feb 2, 2025
2c9a80e
Update models.py
tcely Feb 2, 2025
6532b1a
Merge pull request #223 from tcely/patch-9
tcely Feb 2, 2025
f784015
Add tests for `sponsorblock_categories`
tcely Feb 2, 2025
31a62a1
Merge pull request #224 from tcely/patch-9
tcely Feb 2, 2025
cb8d0a0
Use variables for tests
tcely Feb 2, 2025
313fc79
Merge pull request #225 from tcely/patch-9
tcely Feb 2, 2025
8c33ce7
Pre-resolve conflict
tcely Feb 2, 2025
c5f975b
Merge pull request #228 from tcely/patch-9
tcely Feb 2, 2025
1a3f59a
Merge pull request #229 from tcely/issue-362-sponsorblock_categories
tcely Feb 2, 2025
c334e3e
Fix the misspelled `expected_categories`
tcely Feb 2, 2025
49d1816
Merge pull request #230 from tcely/patch-9
tcely Feb 2, 2025
ddea55d
Merge pull request #232 from tcely/main
tcely Feb 2, 2025
068a798
Remove outdated code
tcely Feb 2, 2025
f8bbd48
Remove extra blank line
tcely Feb 2, 2025
42e9e99
Merge pull request #235 from tcely/patch-2
tcely Feb 2, 2025
0ce9c74
Merge pull request #236 from tcely/patch-2
tcely Feb 2, 2025
5c45437
Merge pull request #237 from tcely/patch-2
tcely Feb 2, 2025
a3c8a83
Merge pull request #238 from tcely/patch-3
tcely Feb 3, 2025
8e9c3ff
Merge pull request #239 from tcely/patch-2
tcely Feb 3, 2025
498e636
Merge pull request #240 from meeb/main
tcely Feb 3, 2025
1811564
Merge pull request #241 from tcely/patch-2
tcely Feb 3, 2025
d8b8638
Merge pull request #242 from tcely/patch-2
tcely Feb 3, 2025
7aa95bd
Merge pull request #243 from tcely/patch-4
tcely Feb 3, 2025
ac47ba5
Merge pull request #244 from tcely/patch-2
tcely Feb 3, 2025
ec46b43
Merge pull request #245 from tcely/patch-2
tcely Feb 3, 2025
220505e
Merge pull request #246 from tcely/patch-2
tcely Feb 3, 2025
866a258
Merge pull request #247 from tcely/patch-2
tcely Feb 3, 2025
ddbc5d4
Display the `datetime` without partial seconds
tcely Feb 3, 2025
c72a0a6
Try `remove_existing_tasks`
tcely Feb 3, 2025
b32a6fe
Merge pull request #248 from tcely/patch-2
tcely Feb 3, 2025
5488c00
Merge pull request #249 from tcely/main
tcely Feb 4, 2025
b0786b7
Merge pull request #250 from meeb/main
tcely Feb 5, 2025
2509106
Merge pull request #251 from tcely/patch-3
tcely Feb 6, 2025
f8a6cf2
Split the ADD line
tcely Feb 6, 2025
bdde50c
Set status to a new instance when it wass None
tcely Feb 7, 2025
5ca5325
Switch from `key` to `filename`
tcely Feb 8, 2025
2b6ed40
Merge pull request #252 from meeb/main
tcely Feb 8, 2025
9ccefd4
Merge branch 'test-2' into resolve-3
tcely Feb 8, 2025
6a49daa
Merge pull request #253 from tcely/resolve-3
tcely Feb 8, 2025
0f3e006
Merge pull request #254 from tcely/patch-5
tcely Feb 8, 2025
75699c3
Merge pull request #255 from tcely/patch-6
tcely Feb 8, 2025
b06fc3f
Merge pull request #256 from tcely/patch-9
tcely Feb 8, 2025
954e2b6
Merge branch 'test-2' into resolve-10
tcely Feb 8, 2025
1baefd3
Merge pull request #257 from tcely/resolve-10
tcely Feb 8, 2025
58e6864
Merge pull request #258 from tcely/patch-10
tcely Feb 8, 2025
ab60071
Merge branch 'test-2' into resolve-4
tcely Feb 8, 2025
fafebdd
Merge pull request #259 from tcely/resolve-4
tcely Feb 8, 2025
c202c10
Merge pull request #260 from tcely/patch-9
tcely Feb 8, 2025
2d229fe
Merge pull request #261 from tcely/patch-9
tcely Feb 8, 2025
d7ef3df
Revert "Add & use functions from status classes"
tcely Feb 8, 2025
d5f64d7
Merge pull request #262 from tcely/revert-259-resolve-4
tcely Feb 8, 2025
5e5c6cc
Merge pull request #263 from tcely/patch-10
tcely Feb 8, 2025
1bd45e4
Merge pull request #264 from tcely/patch-3
tcely Feb 8, 2025
4fdb711
Merge branch 'test-2' into resolve-main
tcely Feb 10, 2025
6294a0b
Merge pull request #266 from tcely/resolve-main
tcely Feb 10, 2025
99cf420
Merge pull request #267 from tcely/patch-10
tcely Feb 10, 2025
18cc474
Merge pull request #268 from tcely/patch-12
tcely Feb 10, 2025
48f38f2
Merge pull request #269 from tcely/patch-9
tcely Feb 10, 2025
f0e25cc
Merge pull request #270 from tcely/patch-6
tcely Feb 10, 2025
e5ec5c4
Merge pull request #271 from tcely/patch-4
tcely Feb 10, 2025
b16e016
Merge pull request #272 from tcely/patch-2
tcely Feb 10, 2025
b02287c
Revert "Revert "Add & use functions from status classes""
tcely Feb 10, 2025
ecba2ea
Merge pull request #273 from tcely/revert-262-revert-259-resolve-4
tcely Feb 10, 2025
9bc3b3e
Merge pull request #274 from tcely/patch-5
tcely Feb 10, 2025
49aebed
Merge pull request #275 from tcely/patch-5
tcely Feb 10, 2025
cc282a1
Merge pull request #276 from tcely/patch-5
tcely Feb 10, 2025
cf33619
Merge pull request #277 from tcely/patch-5
tcely Feb 10, 2025
807e431
Merge branch 'test-2' into resolve-14
tcely Feb 10, 2025
c4d30f5
Merge pull request #278 from tcely/resolve-14
tcely Feb 10, 2025
5c6c43f
Merge branch 'test-2' into resolve-14
tcely Feb 10, 2025
ffdbff5
Merge pull request #279 from tcely/resolve-14
tcely Feb 10, 2025
fb1a751
Merge pull request #280 from tcely/patch-12
tcely Feb 10, 2025
4679d17
Merge branch 'test-2' into resolve-main
tcely Feb 11, 2025
e408244
Merge pull request #281 from tcely/resolve-main
tcely Feb 11, 2025
4c71a16
Set up the `nginx` directory under `/config/log`
tcely Feb 11, 2025
226c698
Log to `/config/log/nginx`
tcely Feb 11, 2025
19f958d
Adjust the example restart policy
tcely Feb 11, 2025
358fdb5
Merge pull request #282 from tcely/nginx-log-to-config
tcely Feb 12, 2025
d709529
Merge branch 'test-2' into resolve-3
tcely Feb 12, 2025
b6a6757
Merge pull request #283 from tcely/resolve-3
tcely Feb 12, 2025
43e37f2
Merge pull request #284 from tcely/patch-10
tcely Feb 12, 2025
a3eeef5
Merge pull request #285 from tcely/patch-16
tcely Feb 12, 2025
5d20d17
Merge pull request #287 from tcely/patch-17
tcely Feb 12, 2025
b74c161
Merge pull request #288 from tcely/patch-17
tcely Feb 12, 2025
1a494f5
Merge pull request #289 from tcely/patch-17
tcely Feb 12, 2025
47bb601
Merge pull request #290 from tcely/patch-17
tcely Feb 12, 2025
dcc0bd8
Merge pull request #291 from tcely/patch-17
tcely Feb 12, 2025
e313842
Merge pull request #292 from tcely/patch-17
tcely Feb 12, 2025
8fd9908
Merge pull request #293 from tcely/patch-17
tcely Feb 12, 2025
3fbb836
Merge pull request #294 from tcely/patch-17
tcely Feb 12, 2025
42a19bf
Merge pull request #295 from tcely/patch-17
tcely Feb 12, 2025
235eb20
Merge pull request #296 from tcely/patch-17
tcely Feb 12, 2025
040cf86
Merge pull request #297 from tcely/patch-17
tcely Feb 12, 2025
0835843
Merge pull request #298 from tcely/patch-17
tcely Feb 12, 2025
a757127
Merge pull request #299 from tcely/patch-17
tcely Feb 12, 2025
5056f40
Merge pull request #300 from tcely/patch-17
tcely Feb 12, 2025
978adad
Merge pull request #301 from tcely/patch-17
tcely Feb 13, 2025
a757f01
Merge branch 'meeb:main' into test-2
tcely Feb 13, 2025
d7c83a0
Merge pull request #302 from tcely/patch-17
tcely Feb 13, 2025
bcbda6c
Merge pull request #303 from tcely/patch-17
tcely Feb 13, 2025
2dd515a
Merge pull request #304 from tcely/patch-17
tcely Feb 13, 2025
1f7f01b
Merge pull request #305 from tcely/patch-17
tcely Feb 13, 2025
8fc3c40
Merge pull request #306 from tcely/patch-2
tcely Feb 13, 2025
84f481e
Merge pull request #307 from tcely/patch-2
tcely Feb 13, 2025
a630a42
Merge pull request #308 from tcely/patch-17
tcely Feb 13, 2025
b8ace80
Merge pull request #309 from tcely/patch-4
tcely Feb 13, 2025
37294c4
Merge branch 'meeb:main' into test-2
tcely Feb 15, 2025
ef0aa66
Merge pull request #310 from tcely/patch-5
tcely Feb 15, 2025
c69728f
Merge pull request #311 from tcely/patch-4
tcely Feb 15, 2025
e12cc7f
Merge pull request #312 from tcely/patch-2
tcely Feb 15, 2025
29ab385
Merge pull request #313 from tcely/patch-5
tcely Feb 15, 2025
c9682d0
Merge pull request #314 from tcely/patch-5
tcely Feb 15, 2025
87a216b
Merge branch 'meeb:main' into test-2
tcely Feb 16, 2025
d27c28b
Merge branch 'meeb:main' into test-2
tcely Feb 16, 2025
1483a1e
Merge branch 'test-2' into resolve-2
tcely Feb 16, 2025
df6e118
Merge pull request #315 from tcely/resolve-2
tcely Feb 16, 2025
d09a272
Merge pull request #316 from tcely/patch-2
tcely Feb 16, 2025
8c3a2bd
Merge branch 'meeb:main' into test-2
tcely Feb 16, 2025
801260e
Merge branch 'meeb:main' into test-2
tcely Feb 17, 2025
8d9796d
Merge pull request #320 from tcely/patch-2
tcely Feb 17, 2025
99b8fd8
Merge pull request #321 from tcely/patch-2
tcely Feb 17, 2025
bddc115
Merge branch 'meeb:main' into test-2
tcely Feb 17, 2025
f6d4816
Merge branch 'meeb:main' into test-2
tcely Feb 19, 2025
9833ab5
Merge pull request #324 from tcely/patch-3
tcely Feb 19, 2025
97990e8
Merge pull request #323 from tcely/patch-2
tcely Feb 19, 2025
50a815a
Merge pull request #326 from tcely/patch-5
tcely Feb 19, 2025
5716f78
Merge branch 'meeb:main' into test-2
tcely Feb 19, 2025
120716d
Merge branch 'meeb:main' into test-2
tcely Feb 19, 2025
bfeb35c
Merge pull request #327 from tcely/patch-2
tcely Feb 19, 2025
97cc027
Merge pull request #328 from tcely/patch-2
tcely Feb 19, 2025
6ce9c80
Merge pull request #329 from tcely/patch-2
tcely Feb 19, 2025
84b7eb9
Merge pull request #330 from tcely/patch-2
tcely Feb 20, 2025
7301d76
Merge branch 'meeb:main' into test-2
tcely Feb 20, 2025
f4ecb73
Merge pull request #331 from tcely/patch-2
tcely Feb 21, 2025
949c6bc
Merge pull request #332 from tcely/patch-2
tcely Feb 21, 2025
d354556
Merge pull request #333 from tcely/patch-3
tcely Feb 21, 2025
a1c5b98
Merge pull request #334 from tcely/patch-5
tcely Feb 21, 2025
a49c0c1
Allow AV1 as a choice
tcely Feb 21, 2025
b11b906
Pin `django-background-tasks`
tcely Feb 21, 2025
c9bc7bf
Correct the syntax
tcely Feb 21, 2025
b930578
Merge branch 'meeb:main' into test-2
tcely Feb 21, 2025
17d733a
Merge pull request #337 from tcely/patch-2
tcely Feb 21, 2025
6a80758
Check for the database vendor first
tcely Feb 21, 2025
7e6b567
Merge pull request #340 from tcely/patch-5
tcely Feb 21, 2025
599d596
Add scheduling delays
tcely Feb 22, 2025
b5dcf41
Log not existing source pre save
tcely Feb 22, 2025
526224f
Move `rename_media` task creation to `Media` post save
tcely Feb 22, 2025
e5d124e
Update `rename_all_media_for_source`
tcely Feb 22, 2025
6eb78e3
Merge pull request #356 from tcely/patch-3
tcely Feb 22, 2025
2a3f9a7
Merge pull request #357 from tcely/patch-6
tcely Feb 22, 2025
062c2bb
Merge pull request #358 from tcely/patch-9
tcely Feb 22, 2025
a448e31
Merge pull request #359 from tcely/patch-10
tcely Feb 22, 2025
fd09d79
Merge pull request #360 from tcely/patch-12
tcely Feb 22, 2025
11190ad
We still need to pin django also
tcely Feb 22, 2025
3e1f8c3
Merge pull request #361 from tcely/patch-3
tcely Feb 22, 2025
bf22139
Do not make the user wait when they are interacting
tcely Feb 22, 2025
8722a1d
Match the priority of the other index tasks
tcely Feb 22, 2025
56bd328
Match the priority of the other index tasks
tcely Feb 22, 2025
f4c7d3d
Merge pull request #362 from tcely/patch-6
tcely Feb 22, 2025
a9db563
Be more consistent with `fmt`
tcely Feb 22, 2025
c0c6b95
Merge pull request #363 from tcely/patch-14
tcely Feb 22, 2025
b3a21f2
fixup: quoting
tcely Feb 22, 2025
6396698
Merge pull request #364 from tcely/patch-14
tcely Feb 22, 2025
9d328df
We need to keep the repeating index task
tcely Feb 22, 2025
e25394e
Merge pull request #365 from tcely/patch-6
tcely Feb 22, 2025
c5c340b
Optimize `rename_files`
tcely Feb 22, 2025
96fa59e
Merge pull request #366 from tcely/patch-15
tcely Feb 22, 2025
0d73519
Fix an internal server error
tcely Feb 22, 2025
5c3a007
Merge pull request #367 from tcely/patch-16
tcely Feb 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 43 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- 'test-*'

jobs:
test:
Expand All @@ -34,24 +34,57 @@ jobs:
containerise:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find upstream GitHub owner
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GH_UPSTREAM_OWNER='.parent.owner.login' ;
GH_UPSTREAM_REPO='.parent.name' ;
GH_UPSTREAM_SLUG='.parent.full_name' ;
{
for var in GH_UPSTREAM_OWNER # GH_UPSTREAM_REPO GH_UPSTREAM_SLUG
do
# jq_arg="$( eval printf -- "'%s\n'" "$(printf -- '"${%s}"' "${var}")" )"
jq_arg="$( eval printf -- "'%s\n'" '"${'"${var}"'}"' )"
delim='"'"${var}"'_EOF"' ;
printf -- '%s<<%s\n' "${var}" "${delim}" ;
gh api repos/:owner/:repo --cache 5m --jq "${jq_arg}" ;
printf -- '%s\n' "${delim}" ;
done
unset -v delim jq_arg var
} >> "$GITHUB_ENV"
- name: Upstream registry ref
id: upstream
run: |
user_lowercase="$(printf -- '%s\n' "${GH_UPSTREAM_OWNER}" | awk '{print tolower($0);}')" ;
printf >> "$GITHUB_OUTPUT" -- '%s=ghcr.io/%s/%s:latest\n' \
ref "${user_lowercase}" "${IMAGE_NAME}" \
tag "${user_lowercase}" "${IMAGE_NAME}" ;
- name: Registry ref
id: origin
run: |
user_lowercase="$(printf -- '%s\n' "${GITHUB_ACTOR}" | awk '{print tolower($0);}')" ;
printf >> "$GITHUB_OUTPUT" -- '%s=ghcr.io/%s/%s:%s\n' \
'ref' "${user_lowercase}" "${IMAGE_NAME}" 'cache' \
'tag' "${user_lowercase}" "${IMAGE_NAME}" 'latest' ;
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into GitHub Container Registry
run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Lowercase github username for ghcr
id: string
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.actor }}
run: echo '${{ secrets.GITHUB_TOKEN }}' | docker login --password-stdin --username '${{ github.actor }}' 'https://ghcr.io'
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ steps.string.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest
cache-from: type=registry,ref=ghcr.io/${{ steps.string.outputs.lowercase }}/${{ env.IMAGE_NAME }}:latest
cache-to: type=inline
provenance: false
tags: ${{ steps.origin.outputs.tag }}
cache-from: |
type=registry,ref=${{ steps.upstream.outputs.ref }}
type=registry,ref=${{ steps.origin.outputs.ref }}
cache-to: type=registry,ref=${{ steps.origin.outputs.ref }},mode=max
build-args: |
IMAGE_NAME=${{ env.IMAGE_NAME }}
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ whitenoise = "*"
gunicorn = "*"
django-compressor = "*"
httptools = "*"
django-background-tasks = "*"
django-background-tasks = "==1.2.5"
django-basicauth = "*"
psycopg2-binary = "*"
mysqlclient = "*"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ services:
tubesync:
image: ghcr.io/meeb/tubesync:latest
container_name: tubesync
restart: unless-stopped
restart: on-failure:3
ports:
- 4848:4848
volumes:
Expand Down
4 changes: 2 additions & 2 deletions config/root/etc/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ http {

# Logging
log_format host '$remote_addr - $remote_user [$time_local] "[$host] $request" $status $bytes_sent "$http_referer" "$http_user_agent" "$gzip_ratio"';
access_log /dev/stdout;
error_log stderr;
access_log /config/log/nginx/access.log.gz combined gzip=9 flush=1m;
error_log /config/log/nginx/error.log info;

# GZIP
gzip on;
Expand Down
15 changes: 15 additions & 0 deletions config/root/etc/s6-overlay/s6-rc.d/tubesync-init/run
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,21 @@ then
chmod -R 0755 /downloads
fi

# Prepare for nginx logging into /config/log/nginx
mkdir -p /config/log
rm -rf /config/log/nginx.9
for n in $(seq 8 -1 0)
do
test '!' -d "/config/log/nginx.${n}" ||
mv "/config/log/nginx.${n}" "/config/log/nginx.$((1 + n))"
done ; unset -v n ;
rm -rf /config/log/nginx.0
test '!' -d /config/log/nginx ||
mv /config/log/nginx /config/log/nginx.0
rm -rf /config/log/nginx
cp -a /var/log/nginx /config/log/
cp -p /config/log/nginx/access.log /config/log/nginx/access.log.gz

# Run migrations
exec s6-setuidgid app \
/usr/bin/python3 /app/manage.py migrate
2 changes: 1 addition & 1 deletion tubesync/sync/management/commands/reset-tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def handle(self, *args, **options):
str(source.pk),
repeat=source.index_schedule,
queue=str(source.pk),
priority=5,
priority=10,
verbose_name=verbose_name.format(source.name)
)
# This also chains down to call each Media objects .save() as well
Expand Down
32 changes: 24 additions & 8 deletions tubesync/sync/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Source(models.Model):
_('source video codec'),
max_length=8,
db_index=True,
choices=list(reversed(YouTube_VideoCodec.choices[1:])),
choices=list(reversed(YouTube_VideoCodec.choices)),
default=YouTube_VideoCodec.VP9,
help_text=_('Source video codec, desired video encoding format to download (ignored if "resolution" is audio only)')
)
Expand Down Expand Up @@ -883,14 +883,19 @@ def get_display_format(self, format_str):
resolution = self.downloaded_format.lower()
elif self.downloaded_height:
resolution = f'{self.downloaded_height}p'
if resolution:
fmt.append(resolution)
if self.downloaded_format != Val(SourceResolution.AUDIO):
vcodec = self.downloaded_video_codec.lower()
if vcodec:
fmt.append(vcodec)
acodec = self.downloaded_audio_codec.lower()
fmt.append(acodec)
if acodec:
fmt.append(acodec)
if self.downloaded_format != Val(SourceResolution.AUDIO):
fps = str(self.downloaded_fps)
fmt.append(f'{fps}fps')
if fps:
fmt.append(f'{fps}fps')
if self.downloaded_hdr:
hdr = 'hdr'
fmt.append(hdr)
Expand Down Expand Up @@ -922,13 +927,19 @@ def get_display_format(self, format_str):
# Combined
vformat = cformat
if vformat:
resolution = vformat['format'].lower()
fmt.append(resolution)
if vformat['format']:
resolution = vformat['format'].lower()
else:
resolution = f"{vformat['height']}p"
if resolution:
fmt.append(resolution)
vcodec = vformat['vcodec'].lower()
fmt.append(vcodec)
if vcodec:
fmt.append(vcodec)
if aformat:
acodec = aformat['acodec'].lower()
fmt.append(acodec)
if acodec:
fmt.append(acodec)
if vformat:
if vformat['is_60fps']:
fps = '60fps'
Expand Down Expand Up @@ -1514,6 +1525,8 @@ def rename_files(self):
old_file_str = other_path.name
new_file_str = new_stem + old_file_str[len(old_stem):]
new_file_path = Path(new_prefix_path / new_file_str)
if new_file_path == other_path:
continue
log.debug(f'Considering replace for: {self!s}\n\t{other_path!s}\n\t{new_file_path!s}')
# it should exist, but check anyway
if other_path.exists():
Expand All @@ -1525,6 +1538,8 @@ def rename_files(self):
old_file_str = fuzzy_path.name
new_file_str = new_stem + old_file_str[len(fuzzy_stem):]
new_file_path = Path(new_prefix_path / new_file_str)
if new_file_path == fuzzy_path:
continue
log.debug(f'Considering rename for: {self!s}\n\t{fuzzy_path!s}\n\t{new_file_path!s}')
# it quite possibly was renamed already
if fuzzy_path.exists() and not new_file_path.exists():
Expand All @@ -1538,8 +1553,9 @@ def rename_files(self):

# try to remove empty dirs
parent_dir = old_video_path.parent
stop_dir = self.source.directory_path
try:
while parent_dir.is_dir():
while parent_dir.is_relative_to(stop_dir):
parent_dir.rmdir()
log.info(f'Removed empty directory: {parent_dir!s}')
parent_dir = parent_dir.parent
Expand Down
55 changes: 25 additions & 30 deletions tubesync/sync/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def source_pre_save(sender, instance, **kwargs):
try:
existing_source = Source.objects.get(pk=instance.pk)
except Source.DoesNotExist:
# Probably not possible?
log.debug(f'source_pre_save signal: no existing source: {sender} - {instance}')
return
existing_dirpath = existing_source.directory_path.resolve(strict=True)
new_dirpath = instance.directory_path.resolve(strict=False)
Expand Down Expand Up @@ -84,33 +84,7 @@ def source_post_save(sender, instance, created, **kwargs):
verbose_name=verbose_name.format(instance.name),
remove_existing_tasks=True
)
# Check settings before any rename tasks are scheduled
rename_sources_setting = settings.RENAME_SOURCES or list()
create_rename_tasks = (
(
instance.directory and
instance.directory in rename_sources_setting
) or
settings.RENAME_ALL_SOURCES
)
if create_rename_tasks:
mqs = Media.objects.filter(
source=instance.pk,
downloaded=True,
).defer(
'media_file',
'metadata',
'thumb',
)
for media in mqs:
verbose_name = _('Renaming media for: {}: "{}"')
rename_media(
str(media.pk),
queue=str(media.pk),
priority=16,
verbose_name=verbose_name.format(media.key, media.name),
remove_existing_tasks=True
)

verbose_name = _('Checking all media for source "{}"')
save_all_media_for_source(
str(instance.pk),
Expand Down Expand Up @@ -160,8 +134,30 @@ def media_post_save(sender, instance, created, **kwargs):
can_download_changed = False
# Reset the skip flag if the download cap has changed if the media has not
# already been downloaded
if not instance.downloaded:
downloaded = instance.downloaded
if not downloaded:
skip_changed = filter_media(instance)
else:
# Downloaded media might need to be renamed
# Check settings before any rename tasks are scheduled
media = instance
rename_sources_setting = settings.RENAME_SOURCES or list()
create_rename_task = (
(
media.source.directory and
media.source.directory in rename_sources_setting
) or
settings.RENAME_ALL_SOURCES
)
if create_rename_task:
verbose_name = _('Renaming media for: {}: "{}"')
rename_media(
str(media.pk),
queue=str(media.pk),
priority=16,
verbose_name=verbose_name.format(media.key, media.name),
remove_existing_tasks=True
)

# Recalculate the "can_download" flag, this may
# need to change if the source specifications have been changed
Expand Down Expand Up @@ -204,7 +200,6 @@ def media_post_save(sender, instance, created, **kwargs):
)
existing_media_download_task = get_media_download_task(str(instance.pk))
# If the media has not yet been downloaded schedule it to be downloaded
downloaded = instance.downloaded
if not (instance.media_file_exists or existing_media_download_task):
# The file was deleted after it was downloaded, skip this media.
if instance.can_download and instance.downloaded:
Expand Down
Loading