MCPcopy Index your code
hub / github.com/MALSync/MALSync / streamingUI

Method streamingUI

src/simkl/simklClass.ts:147–167  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145 }
146
147 async streamingUI() {
148 con.log('Streaming UI');
149
150 const { malObj } = this.page;
151
152 const streamUrl = malObj.getStreamingUrl();
153 if (typeof streamUrl !== 'undefined') {
154 this.malkiss.streamUrl = streamUrl;
155
156 const resumeUrlObj = malObj.getResumeWatching();
157 const continueUrlObj = malObj.getContinueWatching();
158 con.log('Resume', resumeUrlObj, 'Continue', continueUrlObj);
159 if (continueUrlObj && continueUrlObj.ep === malObj.getEpisode() + 1) {
160 this.malkiss.continueUrl = continueUrlObj.url;
161 } else if (resumeUrlObj && resumeUrlObj.ep === malObj.getEpisode()) {
162 this.malkiss.resumeUrl = resumeUrlObj.url;
163 }
164 } else {
165 this.malkiss.streamUrl = null;
166 }
167 }
168
169 getImage() {
170 return $('#detailPosterImg').attr('src');

Callers 1

initMethod · 0.95

Calls 1

getStreamingUrlMethod · 0.45

Tested by

no test coverage detected