Skip to content

Commit 10b0833

Browse files
authored
Replace 'm' and 'mov' variable names with 'g' and 'grp'
- Changed monikers that were short for "movie" with new monikers short for "group". - Note: no change to moniker 'm' when used to represent a short-form for "marker".
1 parent a565ed0 commit 10b0833

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

plugins/TPDBMarkers/tpdbMarkers.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ def processScene(scene):
6161
# skip if there is already a group linked
6262
if settings["createGroupFromScene"] and len(scene.get("groups", [])) == 0:
6363
groups=[]
64-
for m in data["groups"]:
65-
group=processGroup(m)
64+
for g in data["groups"]:
65+
group=processGroup(g)
6666
if group:
6767
groups.append({"group_id": group["id"],"scene_index":None})
6868
log.debug(groups)
@@ -127,45 +127,45 @@ def processAll():
127127
log.progress((i / count))
128128
time.sleep(1)
129129

130-
def processGroup(m):
131-
log.debug(m)
132-
log.debug(m.keys())
130+
def processGroup(g):
131+
log.debug(g)
132+
log.debug(g.keys())
133133
# check if the group exists with the url, then match to the scene
134-
sm = stash.find_groups(
134+
sg = stash.find_groups(
135135
f={
136136
"url": {
137137
"modifier": "EQUALS",
138-
"value": m["url"],
138+
"value": g["url"],
139139
}
140140
}
141141
)
142-
log.debug("sm: %s" % (sm,))
143-
if len(sm) >0:
144-
return sm[0]
142+
log.debug("sg: %s" % (sg,))
143+
if len(sg) >0:
144+
return sg[0]
145145
# find the group by name
146-
sm=stash.find_groups(q=m['title'])
147-
for mov in sm:
148-
if mov['name']==m['title']:
149-
return mov
146+
sg=stash.find_groups(q=g['title'])
147+
for grp in sg:
148+
if grp['name']==g['title']:
149+
return grp
150150

151151

152152
# just create the group with the details from tpdb
153153
new_group={
154-
'name': m['title'],
155-
'date': m['date'],
156-
'synopsis': m['description'],
157-
'front_image': m['image'],
158-
'back_image': m['back_image'],
159-
'urls': [m['url']],
154+
'name': g['title'],
155+
'date': g['date'],
156+
'synopsis': g['description'],
157+
'front_image': g['image'],
158+
'back_image': g['back_image'],
159+
'urls': [g['url']],
160160
}
161-
if m['site']:
162-
studio=stash.find_studio(m['site'],create=True)
161+
if g['site']:
162+
studio=stash.find_studio(g['site'],create=True)
163163
if studio:
164164
new_group['studio_id']=studio['id']
165165

166-
mov=stash.create_group(new_group)
167-
log.debug(mov)
168-
return mov
166+
grp=stash.create_group(new_group)
167+
log.debug(grp)
168+
return grp
169169

170170

171171

0 commit comments

Comments
 (0)