Compare commits
No commits in common. "main" and "v0.1.0" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -12,5 +12,3 @@ pom.xml.asc
|
|||||||
.hgignore
|
.hgignore
|
||||||
.hg/
|
.hg/
|
||||||
.calva
|
.calva
|
||||||
.clj-kondo
|
|
||||||
.lsp
|
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
(ns remcon.channels)
|
|
||||||
|
|
||||||
(defn make-general [addr]
|
|
||||||
{:address addr
|
|
||||||
;:vid {:class "yayin-alani"}
|
|
||||||
:vid {:class "media"}
|
|
||||||
:autostarts true
|
|
||||||
:muted true})
|
|
||||||
|
|
||||||
|
|
||||||
(def channels {"trt-muzik" (make-general "https://tv.canlitv.ing/trtmuzikcanli")
|
|
||||||
"tv8" {:address "https://www.tv8.com.tr/canli-yayin"
|
|
||||||
:vid {:id "AcunnPlayerContainer"}
|
|
||||||
:muted true
|
|
||||||
:autostarts true}
|
|
||||||
"show" (make-general "https://tv.canlitv.ing/show-tv-canli")
|
|
||||||
"star" (make-general "https://tv.canlitv.ing/startvcanli")
|
|
||||||
"kanald" {:address "https://www.kanald.com.tr/canli-yayin"
|
|
||||||
:vid {:id "playerArea"}
|
|
||||||
:muted true
|
|
||||||
:autostarts true}
|
|
||||||
"atv" {:address "https://www.atv.com.tr/canli-yayin"
|
|
||||||
:vid {:id "live"}
|
|
||||||
:muted true
|
|
||||||
:autostarts false}
|
|
||||||
"cn" (make-general "https://tv.canlitv.ing/cartoon-network")
|
|
||||||
"trt1" {:address "https://www.tabii.com/tr/watch/live/trt1"
|
|
||||||
:vid {:class "_Ehgxv"}
|
|
||||||
:muted false
|
|
||||||
:autostarts true}})
|
|
@ -2,14 +2,43 @@
|
|||||||
(:gen-class))
|
(:gen-class))
|
||||||
|
|
||||||
(require '[etaoin.api :as e]
|
(require '[etaoin.api :as e]
|
||||||
'remcon.channels)
|
'[etaoin.keys :as k]
|
||||||
|
'[clojure.string :as str])
|
||||||
|
|
||||||
; The actual map of channels is defined in remcon.channels
|
(defn make-general [addr]
|
||||||
(refer 'remcon.channels :only ['channels])
|
{:address addr
|
||||||
|
;:vid {:class "yayin-alani"}
|
||||||
|
:vid {:class "media"}
|
||||||
|
:autostarts true
|
||||||
|
:muted true})
|
||||||
|
|
||||||
|
(def channels {
|
||||||
|
"trt-muzik" (make-general "https://tv.canlitv.ing/trtmuzikcanli")
|
||||||
|
"tv8" {:address "https://www.tv8.com.tr/canli-yayin"
|
||||||
|
:vid {:id "AcunnPlayerContainer"}
|
||||||
|
:muted true
|
||||||
|
:autostarts true}
|
||||||
|
"show" (make-general "https://tv.canlitv.ing/show-tv-canli")
|
||||||
|
"star" (make-general "https://tv.canlitv.ing/startvcanli")
|
||||||
|
"kanald" {:address "https://www.kanald.com.tr/canli-yayin"
|
||||||
|
:vid {:id "playerArea"}
|
||||||
|
:muted true
|
||||||
|
:autostarts true}
|
||||||
|
"atv" {:address "https://www.atv.com.tr/canli-yayin"
|
||||||
|
:vid {:id "live"}
|
||||||
|
:muted true
|
||||||
|
:autostarts false}
|
||||||
|
"cn" (make-general "https://tv.canlitv.ing/cartoon-network")
|
||||||
|
"trt1" {:address "https://www.tabii.com/tr/watch/live/trt1"
|
||||||
|
:vid {:class "_Ehgxv"}
|
||||||
|
:muted false
|
||||||
|
:autostarts true}
|
||||||
|
})
|
||||||
|
|
||||||
(defn toggle-fs [driver ch]
|
(defn toggle-fs [driver ch]
|
||||||
(e/double-click driver (:vid ch)))
|
(e/double-click driver (:vid ch)))
|
||||||
|
|
||||||
|
|
||||||
(defmacro unless [pred & body]
|
(defmacro unless [pred & body]
|
||||||
`(if (not ~pred)
|
`(if (not ~pred)
|
||||||
(do ~@body)))
|
(do ~@body)))
|
||||||
@ -20,6 +49,7 @@
|
|||||||
(e/wait driver 2)
|
(e/wait driver 2)
|
||||||
(unless (:autostarts ch)
|
(unless (:autostarts ch)
|
||||||
(e/click driver (:vid ch))
|
(e/click driver (:vid ch))
|
||||||
|
;(e/wait driver 3)
|
||||||
)
|
)
|
||||||
(when (:muted ch)
|
(when (:muted ch)
|
||||||
(if (not (:autostarts ch))
|
(if (not (:autostarts ch))
|
||||||
@ -37,6 +67,7 @@
|
|||||||
(toggle-fs d (get channels chname)))
|
(toggle-fs d (get channels chname)))
|
||||||
|
|
||||||
(defn -main
|
(defn -main
|
||||||
|
"I don't do a whole lot ... yet."
|
||||||
[& args]
|
[& args]
|
||||||
(let [driver (if (= (first args) "ch")
|
(let [driver (if (= (first args) "ch")
|
||||||
(e/chrome {:args ["start-maximized" "--no-sandbox" "--disable-dev-shm-usage"]})
|
(e/chrome {:args ["start-maximized" "--no-sandbox" "--disable-dev-shm-usage"]})
|
||||||
|
Loading…
Reference in New Issue
Block a user