first commit
This commit is contained in:
commit
5de45a37bd
9 files changed
+499
No files matched your search
+45
@@ -0,0 +1,45 @@
|
||||
FROM ghcr.io/dannyvfilms/floppy:release
|
||||
|
||||
USER root
|
||||
|
||||
RUN python - <<'PY'
|
||||
from pathlib import Path
|
||||
import sys
|
||||
|
||||
path = Path("/floppy/app/media_list_views.py")
|
||||
text = path.read_text()
|
||||
|
||||
old = ''' else:
|
||||
# Default: most recently updated
|
||||
show_trackers = show_trackers.order_by("-updated_at")
|
||||
'''
|
||||
|
||||
new = ''' else:
|
||||
# Default: most recently completed/listened podcast show
|
||||
show_trackers = show_trackers.annotate(
|
||||
last_completed=Max("show__podcast_entries__end_date")
|
||||
).order_by(
|
||||
F("last_completed").desc(nulls_last=True),
|
||||
"show__title",
|
||||
)
|
||||
'''
|
||||
|
||||
if new in text:
|
||||
print("Podcast sort patch already present upstream")
|
||||
elif old in text:
|
||||
path.write_text(text.replace(old, new, 1))
|
||||
print("Applied podcast sort patch")
|
||||
else:
|
||||
print("ERROR: Podcast sort patch no longer matches upstream Floppy", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
PY
|
||||
|
||||
COPY start.sh /app/code/start.sh
|
||||
COPY supervisord-cloudron.conf /app/code/supervisord-cloudron.conf
|
||||
COPY nginx-cloudron.conf /app/code/nginx-cloudron.conf
|
||||
|
||||
RUN chmod +x /app/code/start.sh
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
CMD ["/app/code/start.sh"]
|
||||
Reference in new issue
Block a user