Update hatenadir/ds/v2-xx/movie.py
Simplify checking the star color Co-authored-by: Peder B. Sundt <pbsds@hotmail.com>
This commit is contained in:
1 parent
c7271434e7
commit
77ce0c90ed
1 file changed
+1
-4
@@ -82,10 +82,7 @@ class CreatorIDFileResource(resource.Resource):
|
|||||||
return self.GenerateDetailsPage(creator, ".".join(file.split(".")[:-1])).encode("UTF-8")
|
return self.GenerateDetailsPage(creator, ".".join(file.split(".")[:-1])).encode("UTF-8")
|
||||||
elif filetype == "star":
|
elif filetype == "star":
|
||||||
path = "/".join(request.path.split("/")[3:])
|
path = "/".join(request.path.split("/")[3:])
|
||||||
try:
|
color = request.args.get('starcolor', ["yellow"])[0] # colour of star, can be green, red, blue, or purple. Yellow otherwise.
|
||||||
color = request.args.get('starcolor')[0] #colour of the star. can be green, red, blue, or purple.
|
|
||||||
except:
|
|
||||||
color = "yellow" #if starcolor arg doesn't exist, then its yellow. there's probably a better way to handle this, but I'm not fluent with python ;-;
|
|
||||||
headers = request.getAllHeaders()
|
headers = request.getAllHeaders()
|
||||||
|
|
||||||
#bad formatting
|
#bad formatting
|
||||||
|
|||||||
Reference in new issue
Block a user
