Quellcode durchsuchen

Mise à jour de 'betaseries.py'

master
TheBidouilleur vor 8 Monaten
Ursprung
Commit
ea7c557056
1 geänderte Dateien mit 17 neuen und 11 gelöschten Zeilen
  1. +17
    -11
      betaseries.py

+ 17
- 11
betaseries.py Datei anzeigen

@@ -166,18 +166,25 @@ def to_see(thetvdb_id):
print(u"Vous etes à jour")
return False

def seen(thetvdb_id):
def seen(thetvdb_id, mode):
# Permet de mettre un episode en 'vu' sur betaseries
print(u"Ajout d'un episode à la liste des vu")
file_path = 'latest/' + thetvdb_id + '.json'
with open(file_path) as json_file:
data = json.load(json_file)
if data['seen'] == True :
send_message('Episode deja vu')
return
API = create_api('seen', None)
API += str(data['id'])
if mode == 'latest' :
file_path = 'latest/' + thetvdb_id + '.json'
with open(file_path) as json_file:
data = json.load(json_file)
if data['seen'] == True :
send_message('Episode deja vu')
return
API += str(data['id'])
if mode == 'watched' :
API += str(thetvdb_id)

print(API)
request = requests.post(API)
if str(request) == '<Response [400]>' :
@@ -247,8 +254,7 @@ def what_2see():


def main():
path = "series/102261.json"
print(get_ep_code_series(path))
print("Nothing to do here")


if __name__ == '__main__':


Laden…
Abbrechen
Speichern