You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.reload() fails to show updated metadata when 'studio.value' is set to '' (ie, removed) #770
I was trying to remove (not change) the studio for a given movie, and I noticed something odd. When you pass in **{'studio.value': None [...]} as an arg to edit(), urllib.parse.urlencode encodes the None as a string: 'None', setting the studio name to 'None' rather than removing it.
print(movie.studio) # 'FakeStudio'k= {'studio.value': None, 'studio.locked':0}
movie.edit(**k)
movie.reload()
print(movie.studio) # 'None' # NOT None, but the string 'None'
This is kind of annoying, but not horrible (though maybe should be documented).
I found that passing in **{'studio.value': '' [...]} will work instead.
HOWEVER, it took me ages to realize this, because of the bug.
Although the movie in actuality now has its studio removed, reloading the the movie will display whatever studio it had before, as if it hadn't changed. This appears to be true only when the 'studio.value' key has a value of ''---all other strings will display correctly when updated.
Activity
JonnyWong16 commentedon Jun 5, 2021
This should already be addressed in #765. It's waiting for some other stuff before it can be merged.