Separate `target to additional host` field

So that we could actually generate proper urls
This commit is contained in:
Felisp 2024-08-22 02:55:21 +02:00
parent d0b59f0507
commit afdeca4e37
2 changed files with 6 additions and 2 deletions

View file

@ -15,9 +15,13 @@
;; Default ChOD to use if none is specified by the user ;; Default ChOD to use if none is specified by the user
:default-chod 94 :default-chod 94
;; If you want to do some preprocessing beforehand, you can override ;; If you want to do some preprocessing beforehand, you can override
;; Target URL for the board, but the response must be same the 4chan API would return ;; target URL for the board, but the response must be same the 4chan API would return
;; /$board/catalog.json will be appended to this link ;; /$board/catalog.json will be appended to this link
;; This is target for API requests
:target "https://api.4chan.org" :target "https://api.4chan.org"
;; This host that has the actual threads, /board/thread-no will be appeneded
;; to this
:host "https://boards.4chan.org"
;; Commented parts bellow are still unimplemented ;; Commented parts bellow are still unimplemented
;; ------ ;; ------
;; Only download catalog when someone requests feed and cache is old ;; Only download catalog when someone requests feed and cache is old

View file

@ -103,7 +103,7 @@
:description "RSS based thread watcher"} :description "RSS based thread watcher"}
body (map #(thread-to-rss-item body (map #(thread-to-rss-item
%1 %1
(get board-config :target) (get board-config :host)
(get board-config :name)) items)] (get board-config :name)) items)]
(rss/channel-xml head body))) (rss/channel-xml head body)))