Closed harroguk closed 3 years ago
It means video_details['contentDetails']['duration'] is equal to None...
Change line 299 to:
episode.duration = ISO8601DurationToSeconds(video_details['contentDetails']['duration'] or "PT0M0S")*1000; Log.Info('[ ] duration: "{}"->"{}"'.format(video_details['contentDetails']['duration'], episode.duration))
If works will put in master code
Line Changed Restarted Plex Server (I dont know any other way to reload a plugin)
Ran "refresh Metadata" on the episode Ran "refresh Metadata" on the show
Metadata is still not updated for the episode. Error still appears in the log. I have attached a full log here
If you want to see if you have problems matching a file locally then a file with the issue is named and in the path below. Or if someone else wants to see if they have a problem too then the link is https://www.youtube.com/watch?v=2jOX4IUYqTU
D:\TV\YouTube\PlayStation Access [UC6yzV_xgKn8r77FkcmZyMSg]\PlayStation Access - s2021e102051701 - 7 Things Gamers Only Do When They Have A New Console [2jOX4IUYqTU].mp4
iBad code, my bad... Change line 49 the function:
### Convert ISO8601 Duration format into seconds ###
def ISO8601DurationToSeconds(duration):
def js_int(value): return int(''.join([x for x in list(value or '0') if x.isdigit()])) # js-like parseInt - https://gist.github.com/douglasmiranda/2174255
try: match = re.match('PT(\d+H)?(\d+M)?(\d+S)?', duration).groups()
except: return 0
else: return 3600 * js_int(match[0]) + 60 * js_int(match[1]) + js_int(match[2])
No problem, won't be able to check anything until tomorrow now, pesky children :) will let you know how it goes.
Turns out I lied. I made the change sat on the bathroom floor on my mobile phone whilst potty training my youngest.
It works, just needs pushing to master.
As always thanks for the help, I will fire you some money when I find your PayPal on the Plex website again.
Well did it on the phone too to be honest... Donation link at the bottom of the readme.
Clicking refresh metadata on the episode in plex produces the following in com.plexapp.agents.youtube.log
If I reresh metadata at the show level then I get...
I first noticed this behavior on 2021-02-02 1700 UTC