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

Fixes and Improvements since Twitch API change this month #486

Closed
wants to merge 129 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
e3881f1
Patch for Twitch API changes 2024/5 and tweaks
Arne-Weber May 14, 2024
f143dae
further cleanup and added a comment
Arne-Weber May 14, 2024
62ce0c6
updated manual.txt
Arne-Weber May 14, 2024
4360919
removed unnecessary comment
Arne-Weber May 14, 2024
efad885
fixed run_dev.bat
Arne-Weber May 14, 2024
59df728
Update constants.py
Windows200000 May 14, 2024
c11af9b
Update channel.py
Windows200000 May 14, 2024
c1fda7b
Update main.py
Windows200000 May 14, 2024
03a4c4c
Update channel.py
Windows200000 May 14, 2024
3b10a3f
Update channel.py
Windows200000 May 14, 2024
bf87077
Update channel.py
Windows200000 May 14, 2024
95e8799
Updated watch frequency to 20s
Arne-Weber May 15, 2024
80ab1d0
Fixed displaying seconds
Arne-Weber May 15, 2024
d0afcb7
Changed documentation string to match others
Arne-Weber May 15, 2024
7920e9a
Updated README to reflect changes in how the application farms drops.
Windows200000 May 16, 2024
698afc2
check URLs and hardcoded 60s -> WATCH_INTERVAL
Arne-Weber May 16, 2024
ebad208
Updated ENglish, Czech and German translation
Arne-Weber May 16, 2024
a86862e
removed empty line for consistency
Arne-Weber May 16, 2024
93b7cc8
added "Validators" to requirements.txt
Arne-Weber May 16, 2024
f233161
Create a workflow to ensure patch notes were added for in-dev (#18)
Windows200000 May 17, 2024
6629aac
Create release.yml for releasing stable version. Mostly copied from c…
Windows200000 May 17, 2024
26de460
Updated ci workflow for the purposes of this fork (#19)
Windows200000 May 17, 2024
a42ea36
Added option to manually trigger patch notes workflow (#20)
Windows200000 May 17, 2024
7a62504
Update Check_patch_notes.yml to resolve merge conflict (#22)
Windows200000 May 17, 2024
96319cb
Update master (#21)
Windows200000 May 17, 2024
0238142
Delete .github/workflows/Release.yml (#24)
Windows200000 May 17, 2024
dd35e8b
Update Master (#27)
Windows200000 May 17, 2024
6e8f884
updated workflows
Arne-Weber May 17, 2024
ae11bd4
updated workflows
Arne-Weber May 17, 2024
74beaa4
Updated release workflow
Arne-Weber May 17, 2024
45fcded
Updated release workflow
Arne-Weber May 17, 2024
0a3b70c
Updated release workflow
Arne-Weber May 17, 2024
aa7776f
Merge branch 'master' into in-dev
Windows200000 May 17, 2024
1bb33d7
Merge pull request #30 from Windows200000/in-dev
Windows200000 May 17, 2024
0048e4d
I think this should actually fix this workflow
Arne-Weber May 17, 2024
1b169c0
I think this should actually fix this workflow
Arne-Weber May 17, 2024
a0091db
maybe the release workflow will work this time...
Arne-Weber May 17, 2024
c9cd4ad
maybe the release workflow will work this time...
Arne-Weber May 17, 2024
f894aa5
Hopefully, release workflow should do versioning
Arne-Weber May 18, 2024
24cf51b
Merge branch 'master' into in-dev
Windows200000 May 18, 2024
c93a8f2
Hopefully, release workflow should do versioning
Arne-Weber May 18, 2024
ed098b8
finalized updates to release workflow
Arne-Weber May 18, 2024
eec61df
Merge branch 'in-dev' of https://github.com/Windows200000/TwitchDrops…
Arne-Weber May 18, 2024
7df2d42
Update Russian Translation
kilroy98 May 17, 2024
dbdc975
Update Ukrainian Translation
kilroy98 May 17, 2024
b4cec67
Update patch_notes.txt
kilroy98 May 17, 2024
4e3767d
Update README.md
kilroy98 May 17, 2024
0fcb967
another attempt at auto-checking patch notes
Arne-Weber May 18, 2024
9cb10c3
Merge branch 'in-dev' of https://github.com/Windows200000/TwitchDrops…
Arne-Weber May 18, 2024
24d189e
updated patch notes with accurate date
Arne-Weber May 18, 2024
643925a
Update 繁體中文.json
zelda0079 May 18, 2024
72f0744
Update patch_notes.txt
zelda0079 May 18, 2024
4d270fa
Update README.md
zelda0079 May 18, 2024
cb517a0
readme and patch notes update
Arne-Weber May 18, 2024
9b41a32
Update Français.json
Calvineries May 18, 2024
13545cc
Update patch_notes.txt
Calvineries May 19, 2024
de2b66b
Update README.md
Calvineries May 19, 2024
3af6997
added commit hash to release
Arne-Weber May 19, 2024
75404ec
added translation credits
Arne-Weber May 19, 2024
31eb4d6
Update master
Windows200000 May 19, 2024
70b84cd
fixed release.yml
Arne-Weber May 19, 2024
8d5f03c
tweaked patch notes format
Arne-Weber May 19, 2024
1572291
updated readme translation credits to look nicer
Arne-Weber May 19, 2024
27c5c37
Updated README and release notes
Arne-Weber May 20, 2024
5138444
incomplete dark mode added
Arne-Weber May 20, 2024
dbada57
updated patch notes
Arne-Weber May 20, 2024
3ca39b3
more work on dark mode
Arne-Weber May 21, 2024
fa75358
added dark mode
Arne-Weber May 21, 2024
7a71514
removed English.json from gitignore
Arne-Weber May 21, 2024
72fb601
added end-priority to translations
Arne-Weber May 22, 2024
6fea3a3
Should fix Theme-related crash on linux
Arne-Weber May 23, 2024
e9412bd
updated patch notes and README
Arne-Weber May 23, 2024
b90e7b5
Translate Русский.json via GitLocalize
ElvisDesigns May 23, 2024
346023e
Translate Español.json via GitLocalize
notNSANE May 23, 2024
f7abd33
Translate Deutsch.json via GitLocalize
Windows200000 May 23, 2024
8dab6eb
Translate Čeština.json via GitLocalize
Windows200000 May 23, 2024
23bc198
updated patch notes
Arne-Weber May 23, 2024
1e8c2a3
more detailed patch notes
Arne-Weber May 23, 2024
c130fa8
Add sorting by end_at setting by @jaredkotoff
Arne-Weber May 25, 2024
d16d1d4
patch notes and newlines at end of files
Arne-Weber May 25, 2024
919ac15
updated patch notes
Arne-Weber May 25, 2024
a2434c4
Translate 繁體中文.json via GitLocalize
Windows200000 May 25, 2024
551f387
Translate 简体中文.json via GitLocalize
Windows200000 May 25, 2024
68063bb
updated patch notes
Arne-Weber May 25, 2024
342df8d
Translate Українська.json via GitLocalize
Nollasko May 25, 2024
7f6ed2b
Translate Türkçe.json via GitLocalize
DogancanYr May 25, 2024
6127388
more translations - readme and patch notes
Arne-Weber May 25, 2024
b61f80c
better patch notes readability
Arne-Weber May 25, 2024
0f42b24
Added dark mode image
Windows200000 May 25, 2024
95fa970
fixed patch notes typo
Arne-Weber May 25, 2024
cc1d300
translation patch notes and README
Arne-Weber May 28, 2024
837abba
Translate Italiano.json via GitLocalize
Kuddus73 May 28, 2024
05b1edc
Translate Polski.json via GitLocalize
flxderdev May 28, 2024
fcbe9e1
Translate Polski.json via GitLocalize
rvpv May 28, 2024
ebd18e2
Translate Türkçe.json via GitLocalize
DogancanYr May 28, 2024
66e34f6
Translate Українська.json via GitLocalize
Nollasko May 28, 2024
22300ca
Translate العربية.json via GitLocalize
5wi5wi May 30, 2024
53a0e2b
Translate Türkçe.json via GitLocalize
DogancanYr May 30, 2024
19badbf
Translate 简体中文.json via GitLocalize
Suz1e May 30, 2024
6cf6fc7
udpated README and patch notes
Arne-Weber May 30, 2024
53292fa
Merge branch 'in-dev' of https://github.com/Windows200000/TwitchDrops…
Arne-Weber May 30, 2024
e27728a
Fixed prioritize_by_ending_soonest
Valentin-Metz May 28, 2024
f8cadec
Print logs to stdout
Valentin-Metz May 29, 2024
10988d8
Support unlinked campaigns
Valentin-Metz May 29, 2024
b9d152f
Revert "Support unlinked campaigns"
Valentin-Metz May 30, 2024
9c1b44d
updated english translation
Arne-Weber May 30, 2024
664dd22
Update العربية.json
Windows200000 May 30, 2024
35151ec
fixed patch patch_notes
Arne-Weber May 30, 2024
ffe127a
fixed translate.py to match English.json
Arne-Weber May 30, 2024
ea067ff
moved default translation from .py to .json
Arne-Weber May 31, 2024
d7caa46
added dark theme to dypeddict
Arne-Weber May 31, 2024
0cdd507
removed writing English.json & using DEFAULT_LANG
Arne-Weber May 31, 2024
06483b6
updated patch notes
Arne-Weber May 31, 2024
67a5dfc
pyinstaller
Arne-Weber May 31, 2024
5da42c1
testing why English.json isn't included in build
Arne-Weber May 31, 2024
0b8d857
reverted last commit
Arne-Weber May 31, 2024
e79c1eb
reverted default translation for now
Arne-Weber May 31, 2024
7721732
Moving default translation to English.json, again
Arne-Weber May 31, 2024
e82f4d8
cleanup translate.py
Arne-Weber May 31, 2024
e00187f
Update twitch.py
KK2-5 Jun 1, 2024
1c1a950
fixed tray title exceeding 128 causing crash
Arne-Weber Jun 1, 2024
9cda8cb
attempt at fixing scrolling for linux
Arne-Weber Jun 1, 2024
442bf89
The scroll fix for linux didn't work
Arne-Weber Jun 1, 2024
6fa5e7f
removed debug print statements
Arne-Weber Jun 1, 2024
8d2a34c
shorter taskbar title: allows 128, but shows 127
Arne-Weber Jun 1, 2024
2115fe9
fixed comment spelling
Arne-Weber Jun 1, 2024
679e4da
changed theme logic to use if-else, not of match
Arne-Weber Jun 3, 2024
1db7ce6
remove unnecessary can_earn_within_next_hour()
Arne-Weber Jun 3, 2024
87b3128
updated patch notes for next release
Arne-Weber Jun 5, 2024
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
24 changes: 24 additions & 0 deletions .github/workflows/Check_patch_notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check patch notes

on:
pull_request:
branches:
- in-dev
workflow_dispatch:

jobs:
check_patch_notes:
runs-on: ubuntu-latest # windows-latest | macos-latest
name: Test changed-files
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2 # "0" OR "2" -> To retrieve the preceding commit.

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- name: Run when patch noted don't change
if: ${{ !contains(steps.changed-files.outputs.modified_files, 'patch_notes.txt') }}
run: exit 1
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Build
name: Build dev version

on:
push:
branches:
- 'master'
- 'in-dev'
pull_request:
branches:
- 'in-dev'
workflow_dispatch:

env:
Expand Down Expand Up @@ -193,8 +195,8 @@ jobs:
path: Twitch.Drops.Miner.Linux.AppImage.zip

update_releases_page:
#NOTEif: github.event.pull_request.merged == true || github.event_name == 'push'
name: Upload builds to Releases
if: github.event_name != 'pull_request'
needs:
- windows
- linux-pyinstaller
Expand All @@ -221,7 +223,10 @@ jobs:
artifactErrorsFailBuild: true
artifacts: artifacts/*/*
body: |
**This is an automatically generated in-development pre-release version of the application, that includes the latest master branch changes.**
# ⚠️ Please help with translation as tracked in #2 !

***
**This is an automatically generated in-development pre-release version of the application, that includes the latest in-dev branch changes.**
**⚠️ This build is not stable and may end up terminating with a fatal error. ⚠️**
**Use at your own risk.**

Expand Down
257 changes: 257 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
name: Build release

on:
pull_request:
types: [closed]
branches:
- 'master'
workflow_dispatch:

env:
PYTHON_VERSION: '3.10'

jobs:
windows:
name: Windows
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up variables
id: vars
run: |
Add-Content $env:GITHUB_OUTPUT "sha_short=$(git rev-parse --short HEAD)"

- name: Append git revision to project version
run: |
(Get-Content version.py) `
-Replace '^__version__\s*=\s*"[^"]+', "`$0.${{steps.vars.outputs.sha_short}}" |`
Out-File version.py

# Ensure Python version
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}

- name: Install project dependencies
run: |
python3 -m pip install wheel
python3 -m pip install -r requirements.txt

- name: Install UPX
run: |
Invoke-WebRequest -Uri https://github.com/upx/upx/releases/download/v4.0.2/upx-4.0.2-win64.zip -OutFile (Join-Path $env:Temp upx.zip)
Expand-Archive -LiteralPath (Join-Path $env:Temp upx.zip) -DestinationPath $env:Temp
Move-Item -Path (Join-Path $env:Temp upx-*) -Destination (Join-Path $env:Temp upx)
Add-Content $env:GITHUB_PATH (Join-Path $env:Temp upx)

- name: Install PyInstaller
run: |
python3 -m pip install pyinstaller

- name: Create portable executable
run: |
pyinstaller build.spec

- name: Create release folder
run: |
$FolderName = 'Twitch Drops Miner'
New-Item $FolderName -ItemType Directory
Copy-Item dist\*.exe $FolderName
Copy-Item manual.txt $FolderName
Compress-Archive -Path $FolderName -DestinationPath Twitch.Drops.Miner.Windows.zip

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Twitch.Drops.Miner.Windows
path: Twitch.Drops.Miner.Windows.zip

linux-pyinstaller:
name: Linux (PyInstaller)
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up variables
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"

- name: Append git revision to project version
run: |
sed -ri "s/^__version__\s*=\s*\"[^\"]+/\0.${{ steps.vars.outputs.sha_short }}/" version.py

# NOTE: We're only use a custom version of Python here because truststore requires at least Python 3.10, but Ubuntu 20.04 has Python 3.8.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}

- name: Install system dependencies
run: |
sudo apt update
sudo apt install gir1.2-appindicator3-0.1 libgirepository1.0-dev python3-tk

- name: Install project dependencies
run: |
python3 -m pip install wheel
python3 -m pip install -r requirements.txt

- name: Install PyInstaller
run: |
python3 -m pip install pyinstaller

# NOTE: Remove this step if/once libxft gets updated to 2.3.5 or newer on Ubuntu 20.04, which currently has 2.3.3.
- name: Build a recent version of libXft
run: |
mkdir -p /tmp/libXft
cd /tmp/libXft
curl -L https://xorg.freedesktop.org/releases/individual/lib/libXft-2.3.8.tar.xz -o libXft.tar.xz
tar xvf libXft.tar.xz
cd libXft-*
./configure --prefix=/tmp/libXft --sysconfdir=/etc --disable-static
make
make install-strip

- name: Create portable executable
run: |
LD_LIBRARY_PATH=/tmp/libXft/lib xvfb-run --auto-servernum pyinstaller build.spec

- name: Show PyInstaller warnings
run: |
cat build/build/warn-build.txt || true

- name: Create release folder
run: |
folder='Twitch Drops Miner'
mkdir "${folder}"
cp manual.txt dist/* "${folder}"
7z a Twitch.Drops.Miner.Linux.PyInstaller.zip "${folder}"

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Twitch.Drops.Miner.Linux.PyInstaller
path: Twitch.Drops.Miner.Linux.PyInstaller.zip

linux-appimage:
name: Linux (AppImage)
runs-on: ubuntu-22.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up variables
id: vars
run: |
echo "app_version=$(python3 -c 'from version import __version__ as v; print(v)')" >> "${GITHUB_OUTPUT}"
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"

- name: Append git revision to project version
run: |
sed -ri "s/^__version__\s*=\s*\"[^\"]+/\0.${{steps.vars.outputs.sha_short}}/" version.py

- name: Install system dependencies
run: |
sudo apt update
sudo apt install libgirepository1.0-dev python3-testresources

- name: Download AppImage Builder
run: |
curl -L https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.1.0/appimage-builder-1.1.0-x86_64.AppImage -o appimage-builder
chmod +x appimage-builder

- name: Create AppImage
env:
APPIMAGE_EXTRACT_AND_RUN: 1
APP_VERSION: ${{steps.vars.outputs.app_version}}.${{steps.vars.outputs.sha_short}}
PYTHON_VERSION: ${{env.PYTHON_VERSION}}
run: |
./appimage-builder --recipe appimage/AppImageBuilder.yml

- name: Create release folder
run: |
folder='Twitch Drops Miner'
mkdir "${folder}"
cp *.AppImage manual.txt "${folder}"
7z a Twitch.Drops.Miner.Linux.AppImage.zip "${folder}"

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: Twitch.Drops.Miner.Linux.AppImage
path: Twitch.Drops.Miner.Linux.AppImage.zip

update_releases_page:
name: Upload builds to Releases
#NOTEif: github.event.pull_request.merged == true
needs:
- windows
- linux-pyinstaller
- linux-appimage
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Get next version
uses: reecetech/[email protected]
id: version
with:
scheme: semver
increment: minor

- name: Set up variables
id: vars
run: |
echo "date_now=$(date --rfc-3339=seconds)" >> "${GITHUB_OUTPUT}"
echo "sha_short=$(git rev-parse --short HEAD)" >> "${GITHUB_OUTPUT}"

- name: Download build artifacts from previous jobs
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Read patch notes from file
id: patch_notes
uses: juliangruber/[email protected]
with:
path: ./patch_notes.txt

- name: Upload builds to Releases
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: artifacts/*/*
body: |
# ⚠️ Please help with translation as tracked in #2 and channel points as tracked in #23 !

***
**This is an automatically generated updated version of the application, that includes the latest master branch changes.**
**This build should be stable, but if you encounter anything, please report any issues you find.**

- Last build date: `${{ steps.vars.outputs.date_now }}`
- Reference commit: ${{ github.sha }}

***
## Patch notes:
${{ steps.patch_notes.outputs.content }}

name: Updated tested build - ${{ steps.version.outputs.v-version }} (${{ steps.vars.outputs.sha_short }})
prerelease: false
removeArtifacts: true
tag: ${{ steps.version.outputs.v-version }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ __pycache__
log.txt
/lock.file
settings.json
/lang/English.json
#/lang/English.json
# AppImage
/AppDir
/appimage-builder
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Twitch Drops Miner

Thanks to @DevilXD and other contributors from the [original repo](https://github.com/DevilXD/TwitchDropsMiner) for the vast majority of the code.

This application allows you to AFK mine timed Twitch drops, without having to worry about switching channels when the one you were watching goes offline, claiming the drops, or even receiving the stream data itself. This helps both you and Twitch save on bandwidth and hassle. Everyone wins!

### How It Works:

Every ~60 seconds, the application sends a "minute watched" event to the channel that's currently being watched - this is enough to advance the drops. Note that this completely bypasses the need to download any actual stream video and sound. To keep the status (ONLINE or OFFLINE) of the channels up-to-date, there's a websocket connection established that receives events about streams going up or down, or updates regarding the current amount of viewers.
Every ~20 seconds, the application asks Twitch for a URL to the raw stream data of the channel currently being watched. It then fetches the metadata of this data stream - this is enough to advance the drops. Note that this completely bypasses the need to download any actual stream video and sound. To keep the status (ONLINE or OFFLINE) of the channels up-to-date, there's a websocket connection established that receives events about streams going up or down, or updates regarding the current amount of viewers.

### Features:

Expand All @@ -30,6 +32,8 @@ Every ~60 seconds, the application sends a "minute watched" event to the channel
![Main](https://user-images.githubusercontent.com/4180725/164298155-c0880ad7-6423-4419-8d73-f3c053730a1b.png)
![Inventory](https://user-images.githubusercontent.com/4180725/164298315-81cae0d2-24a4-4822-a056-154fd763c284.png)
![Settings](https://user-images.githubusercontent.com/4180725/164298391-b13ad40d-3881-436c-8d4c-34e2bbe33a78.png)
![Help](https://github.com/Windows200000/TwitchDropsMiner-updated/assets/72623832/ca1c25e1-650f-415b-ab9d-8cfc001fc7e6)


### Notes:

Expand Down Expand Up @@ -129,3 +133,5 @@ if they aren't already there. Doing so ensures proper markdown rendering on Gith
@casungo - For the entirety of the Italian (Italiano) translation.
@Bamboozul - For the entirety of the Arabic (العربية) translation.
@Kjerne - For the entirety of the Danish (Dansk) translation.

For updating Translations: @Kuddus73, @VSeryi, @Windows200000, @BreakshadowCN, @kilroy98, @zelda0079, @Calvineries, @notNSANE, @ElvisDesigns, @DogancanYr, @Nollasko, @rvpv, @flxderdev, @5wi5wi, @fgr1178707QQ, @Suz1e, @Patriot99
3 changes: 1 addition & 2 deletions build.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ to_add: list[tuple[Path, str, bool]] = [
(Path(SITE_PACKAGES_PATH, "seleniumwire/ca.key"), "./seleniumwire", False),
]
for lang_filepath in WORKING_DIR.joinpath("lang").glob("*.json"):
if lang_filepath.stem != DEFAULT_LANG:
to_add.append((lang_filepath, "lang", True))
to_add.append((lang_filepath, "lang", True))

# ensure the required to-be-added data exists
datas: list[tuple[Path, str]] = []
Expand Down
11 changes: 11 additions & 0 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ class ExpiringHash(TypedDict):
default_database: Hashes = {}


class CurrentSeconds:
LIFETIME = timedelta(days=7)

def set_current_seconds(value):
global current_seconds
current_seconds = value

def get_current_seconds():
return current_seconds


class ImageCache:
LIFETIME = timedelta(days=7)

Expand Down
Loading