Trying to import podcasts with no artworkURL

This commit is contained in:
Dan Dembinski
2020-03-09 16:42:52 -04:00
parent a3b27e1dea
commit eaefe02988
2 changed files with 4 additions and 4 deletions

View File

@@ -19,8 +19,8 @@ def feedImport ():
#checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported. #checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported.
r = requests.post(API_URL+'/addFeed/', json={"userID" : 1, "newURL" : url}) r = requests.post(API_URL+'/addFeed/', json={"userID" : 1, "newURL" : url})
# print(r.text) print(r.text)
print(url) # print(url)
y=y+1 y=y+1

View File

@@ -38,7 +38,7 @@ class podcasts(db.Model):
userID = db.Column(db.Integer) userID = db.Column(db.Integer)
title = db.Column(db.Text) title = db.Column(db.Text)
URL = db.Column(db.Text) URL = db.Column(db.Text)
artworkURL = db.Column(db.Text) artworkURL = db.Column(db.Text, default=None)
@app.route('/', methods=['GET']) @app.route('/', methods=['GET'])
@@ -132,7 +132,7 @@ def addFeed():
if not parsed.feed.title: if not parsed.feed.title:
artwork = str(parsed.feed.image) artwork = str(parsed.feed.image)
else: else:
artwork = None artwork = ''
# checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported. # checks to see if the podcast URL already exists for logged in user and skips it if it has already been imported.
# if the show doesn't already exist for the logged in user it gets added # if the show doesn't already exist for the logged in user it gets added