From 81f03c0b449bec1fa60cf2936bfc3f66a5ad58c1 Mon Sep 17 00:00:00 2001 From: Miguel Ángel Moreno Date: Tue, 17 Jan 2023 13:17:40 +0100 Subject: chore: Rename project --- src/backend/tau/api/streams.clj | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/backend/tau/api/streams.clj (limited to 'src/backend/tau/api/streams.clj') diff --git a/src/backend/tau/api/streams.clj b/src/backend/tau/api/streams.clj deleted file mode 100644 index e1bd637..0000000 --- a/src/backend/tau/api/streams.clj +++ /dev/null @@ -1,36 +0,0 @@ -(ns tau.api.streams - (:require - [clojure.java.data :as j] - [ring.util.codec :refer [url-decode]] - [tau.api.items :as items]) - (:import - org.schabi.newpipe.extractor.stream.StreamInfo - org.schabi.newpipe.extractor.NewPipe - org.schabi.newpipe.extractor.localization.DateWrapper - java.time.Instant)) - -(defn get-stream - [url] - (let [info (StreamInfo/getInfo (url-decode url))] - {:name (.getName info) - :url (.getUrl info) - :description (.. info (getDescription) (getContent)) - :upload-date (.getTextualUploadDate info) - :uploader-name (.getUploaderName info) - :uploader-url (.getUploaderUrl info) - :uploader-avatar (.getUploaderAvatarUrl info) - :uploader-verified? (.isUploaderVerified info) - :service-id (.getServiceId info) - :thumbnail-url (.getThumbnailUrl info) - :duration (.getDuration info) - :tags (.getTags info) - :category (.getCategory info) - :view-count (.getViewCount info) - :like-count (when-not (= (.getLikeCount info) -1) (.getLikeCount info)) - :dislike-count (when-not (= (.getDislikeCount info) -1) (.getDislikeCount info)) - :subscriber-count (when-not (= (.getUploaderSubscriberCount info) -1) (.getUploaderSubscriberCount info)) - :audio-streams (j/from-java (.getAudioStreams info)) - :video-streams (j/from-java (.getVideoStreams info)) - :hls-url (.getHlsUrl info) - :dash-mpd-url (.getDashMpdUrl info) - :related-streams (items/get-items (.getRelatedStreams info))})) -- cgit v1.2.3