Sebastian Spaeth
1cb7dad3c2
Merge branch 'mypy' into 'main'
...
CI: Add mypy check
See merge request sspaeth/cleanmedia!3
2023-09-18 11:45:15 +00:00
Sebastian Spaeth
b01eb97a47
CI: flake8 the file
2023-09-18 13:44:09 +02:00
Sebastian Spaeth
9eea97f1e1
CI: Make mypy happy
...
cleanmedia:133: error: Value of type "tuple[Any, ...] | None" is not indexable [index]
So we do sanity check that row is not None now before doing something with row[0].
2023-09-18 13:39:13 +02:00
Sebastian Spaeth
7d6dc981e3
CI: Fix cleanmedia:107: error: Name "psycopg2.extensions.connection" is not defined [name-defined]
2023-09-18 13:35:41 +02:00
Sebastian Spaeth
3e063e92d4
CI: Add mypy check
2023-09-18 13:30:47 +02:00
Sebastian Spaeth
edae37dc06
CI: Don't keep artifacts around
...
The script is available from the repo, no need for an artifact.
2023-09-18 13:13:46 +02:00
Sebastian Spaeth
7c60a9037c
flake8: This is it. Green!
2023-09-18 13:11:12 +02:00
Sebastian Spaeth
329981fe49
flake8: Is this the end?
2023-09-18 13:10:08 +02:00
Sebastian Spaeth
65dff450c3
CI: Make flake8 less grumpy
2023-09-18 13:06:12 +02:00
Sebastian Spaeth
0fcf538a93
flake8: make pylinter a little more happy
2023-09-18 12:59:27 +02:00
Sebastian Spaeth
4cd9bc6136
Merge branch 'CI' into 'main'
...
Add CI
See merge request sspaeth/cleanmedia!2
2023-09-18 10:56:02 +00:00
Sebastian Spaeth
d222eba15a
CI: add one
2023-09-18 12:55:00 +02:00
Sebastian Spaeth
ad184116fc
cleanmedia: fix whitespace
...
too much!
2023-09-18 10:18:21 +02:00
Sebastian Spaeth
13b7ffcc5e
Add requirements
2023-05-17 12:17:16 +00:00
Sebastian Spaeth
4984a5d1a4
Update README
...
One todo point down, so we need to update the README accordingly.
2023-04-20 09:55:54 +02:00
Sebastian Spaeth
55652662ca
Fix deleted file calculation
...
We stupidly just output the total number of files, and not the number
of files that we attempted to delete, which leads to flawed statistics
output.
2023-04-20 09:53:41 +02:00
Sebastian Spaeth
e4a190749f
Merge branch 'master' of gitlab.com:sspaeth/cleanmedia
2023-04-20 09:46:28 +02:00
Sebastian Spaeth
1f3bc1e0c9
Add sanity check for thumbnails
...
Warn in case we have thumbnails in our db that do not refer to an
existing media entry in our db.
2023-04-20 09:45:20 +02:00
Sebastian Spaeth
405c207f8c
Clean up code comments a little
2023-04-19 18:29:50 +02:00
Sebastian Spaeth
1df1a8e74c
use correct class for typing hints
2023-04-19 18:25:02 +02:00
Sebastian Spaeth
94a643d636
mypy: Make the typing checks pass without error
2023-04-19 18:19:50 +02:00
Sebastian Spaeth
52484e7351
remove todo list from source code
2023-04-19 17:52:37 +02:00
Sebastian Spaeth
4fad9fcb0d
allow postgresql:// connection string
...
Due to popular demand ;-), also allow postgresl://
2023-02-02 07:42:16 +01:00
Sebastian Spaeth
6f99a37944
Add scary warranty disclaimer
2023-01-12 14:59:54 +01:00
Sebastian Spaeth
7b6ecf25ac
reintroduce correct failure handling
2023-01-12 14:53:32 +01:00
Sebastian Spaeth
3914546c92
simplify file counting
2023-01-12 14:49:39 +01:00
Sebastian Spaeth
d23e16cbee
Count deleted files
...
and report a summary statistic.
2023-01-12 14:47:20 +01:00
Sebastian Spaeth
4887745611
expand Readme somewhat
2022-11-30 10:33:24 +01:00
Sebastian Spaeth
430809c49b
Update README
...
Make it even betta!
2022-11-28 15:37:11 +01:00
Sebastian Spaeth
e79563ea6a
add license, make retention time configurable
...
Use 30 days by default, but allow configurability of retention time.
Add a license.
2022-11-28 15:13:36 +01:00
Sebastian Spaeth
0e035d47e9
Even nicer output on dryrun
...
and remove an obsolete comment.
2022-11-08 19:00:35 +01:00
Sebastian Spaeth
36d392e9b1
Better output on dryrun, make clear what we would delete now
2022-11-08 18:55:23 +01:00
Sebastian Spaeth
a00ffc258f
Demote log to debug
2022-11-08 18:51:59 +01:00
Sebastian Spaeth
f96b05f245
Use a cached property for fullpath
...
Instead of recalculating all the time.
2022-11-08 18:44:31 +01:00
Sebastian Spaeth
e66eb649d7
Move read_config down to the other global function(s)
2022-11-08 18:30:49 +01:00
Sebastian Spaeth
c8588634b3
Clean up and document a little
2022-11-08 18:27:40 +01:00
Sebastian Spaeth
2497e71c3b
Need to commit our changes
2022-11-08 17:59:43 +01:00
Sebastian Spaeth
7065a5437e
Properly delete files
2022-11-08 17:53:47 +01:00
Sebastian Spaeth
be6da99c1c
Delete db entries too
2022-11-08 17:39:21 +01:00
Sebastian Spaeth
8410389d6a
Initial commit
2022-11-08 17:18:32 +01:00