Skip to content

Commit

Permalink
Removing deprecated fields to get it to work again.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tweeticoats authored and Tweeticoats committed Oct 22, 2023
1 parent 6d1f7a0 commit 4994c1d
Showing 1 changed file with 58 additions and 125 deletions.
183 changes: 58 additions & 125 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def tag_cleanup_2d(scenes,filter):
def tag_cleanup_star(scenes,filter):
res=[]
for s in scenes:
if s["rating"]==5:
if s["rating100"]==5:
res.append(s)
return res

Expand Down Expand Up @@ -283,8 +283,6 @@ def get_scenes(scene_filter, sort="updated_at",direction="DESC",per_page=100,pag
count
scenes {
id
checksum
oshash
title
details
url
Expand Down Expand Up @@ -317,21 +315,6 @@ def get_scenes(scene_filter, sort="updated_at",direction="DESC",per_page=100,pag
funscript
interactive_heatmap
}
galleries {
id
checksum
path
title
url
date
details
rating
organized
studio {
id
name
url
}
image_count
tags {
id
Expand Down Expand Up @@ -412,16 +395,12 @@ def get_scenes_F(scene_filter, sort="updated_at",direction="DESC",per_page=100,p
count
scenes {
id
checksum
oshash
title
details
url
date
rating
organized
rating100
o_counter
path
interactive
updated_at
created_at
Expand All @@ -430,6 +409,7 @@ def get_scenes_F(scene_filter, sort="updated_at",direction="DESC",per_page=100,p
play_duration
play_count
files {
basename
size
duration
video_codec
Expand All @@ -446,46 +426,9 @@ def get_scenes_F(scene_filter, sort="updated_at",direction="DESC",per_page=100,p
funscript
interactive_heatmap
}
galleries {
id
title
url
date
details
rating
organized
studio {
id
name
url
}
image_count
tags {
id
name
image_path
scene_count
}
}
performers {
id
name
gender
url
twitter
instagram
birthdate
ethnicity
country
eye_color
country
height
measurements
fake_tits
career_length
tattoos
piercings
aliases
}
studio{
id
Expand All @@ -496,18 +439,17 @@ def get_scenes_F(scene_filter, sort="updated_at",direction="DESC",per_page=100,p
stash_id
}
}
tags{
tags{
id
name
}
studio{
studio{
name
stash_ids{
endpoint
stash_id
}
}
}
stash_ids{
endpoint
stash_id
Expand All @@ -516,18 +458,11 @@ def get_scenes_F(scene_filter, sort="updated_at",direction="DESC",per_page=100,p
id
title
seconds
primary_tag{
id
name
primary_tag{
id
name
}
}
movies{
scene_index
movie{
id
name
}
}
}
}
}"""
Expand Down Expand Up @@ -657,8 +592,6 @@ def updateScene(sceneData):
query = """mutation sceneUpdate($input:SceneUpdateInput!) {
sceneUpdate(input: $input) {
id
checksum
oshash
title
details
url
Expand All @@ -670,6 +603,7 @@ def updateScene(sceneData):
updated_at
created_at
file {
basename
size
duration
video_codec
Expand All @@ -692,7 +626,6 @@ def updateScene(sceneData):
}
galleries {
id
checksum
path
title
url
Expand Down Expand Up @@ -987,53 +920,54 @@ def reload_filter_tag():


def scene_type(scene):
if "180_180x180_3dh_LR" in scene["path"]:
scene["is3d"] = True
scene["screenType"] = "dome"
scene["stereoMode"] = "sbs"
elif "_MKX200" in scene["path"]:
scene["is3d"] = True
scene["screenType"] = "mkx200"
scene["stereoMode"] = "sbs"
elif "_FISHEYE190" in scene["path"]:
scene["is3d"] = True
scene["screenType"] = "rf52"
scene["stereoMode"] = "sbs"
else:
scene["screenType"] = "flat"
scene["is3d"] = False
if 'SBS' in [x["name"] for x in scene["tags"]]:
scene["stereoMode"] = "sbs"
elif 'TB' in [x["name"] for x in scene["tags"]]:
scene["stereoMode"] = "tb"

if 'FLAT' in [x["name"] for x in scene["tags"]]:
scene["screenType"] = "flat"
scene["is3d"] = False
elif 'DOME' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "dome"
elif 'SPHERE' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "sphere"
elif 'MKX200' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "mkx200"
elif '200°' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "mkx200"
elif 'RF52' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "rf52"
elif '190°' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "rf52"
elif 'FISHEYE' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "fisheye"
if 'MONO' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = False
scene.pop("stereoMode",None)
for f in scene["files"]:
if "180_180x180_3dh_LR" in f['basename']:
scene["is3d"] = True
scene["screenType"] = "dome"
scene["stereoMode"] = "sbs"
elif "_MKX200" in f['basename']:
scene["is3d"] = True
scene["screenType"] = "mkx200"
scene["stereoMode"] = "sbs"
elif "_FISHEYE190" in f['basename']:
scene["is3d"] = True
scene["screenType"] = "rf52"
scene["stereoMode"] = "sbs"
else:
scene["screenType"] = "flat"
scene["is3d"] = False
if 'SBS' in [x["name"] for x in scene["tags"]]:
scene["stereoMode"] = "sbs"
elif 'TB' in [x["name"] for x in scene["tags"]]:
scene["stereoMode"] = "tb"

if 'FLAT' in [x["name"] for x in scene["tags"]]:
scene["screenType"] = "flat"
scene["is3d"] = False
elif 'DOME' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "dome"
elif 'SPHERE' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "sphere"
elif 'MKX200' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "mkx200"
elif '200°' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "mkx200"
elif 'RF52' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "rf52"
elif '190°' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "rf52"
elif 'FISHEYE' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = True
scene["screenType"] = "fisheye"
if 'MONO' in [x["name"] for x in scene["tags"]]:
scene["is3d"] = False
scene.pop("stereoMode",None)

if 'ApiKey' in headers:
scene["heatmap"]='/heatmap_proxy/'+scene["id"]
Expand Down Expand Up @@ -1069,7 +1003,6 @@ def performer_update(self,performer):
mutation performerUpdate($input: PerformerUpdateInput!) {
performerUpdate(input: $input) {
id
checksum
name
url
gender
Expand Down

0 comments on commit 4994c1d

Please sign in to comment.