adding the episode_seen option and fix potential mistake
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
@@ -63,18 +63,19 @@ class betaserieUtils():
|
||||
def identify_episode(self,show_id,episode_number,verbose=False):
|
||||
#
|
||||
# Usage
|
||||
# episode_id = beta.identify_episode(show_id,"S01E01",True)
|
||||
# episode_id,episode_seen = beta.identify_episode(show_id,"S01E01",True)
|
||||
#
|
||||
url = "https://api.betaseries.com/episodes/search?show_id="+str(show_id)+"&number="+str(episode_number)
|
||||
|
||||
response = requests.request("GET", url, headers=self.headers, data=self.payload)
|
||||
|
||||
episode_id = response.json()['episode']['id']
|
||||
episode_seen = response.json()['episode']['user']['seen']
|
||||
if verbose:
|
||||
print("Url request: "+str(url))
|
||||
print(response.text)
|
||||
|
||||
return episode_id
|
||||
return episode_id,episode_seen
|
||||
|
||||
def mark_episodes_watched(self,episode_id,verbose=False):
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user