Custom Scanner not updating metadata.

Looking through my log it looks like it’s getting all the information it wants:
'2016-02-17 12:40:19,207 (17e0) : INFO (logkit:16) - UPDATE: \aragorn\recordings\Kiwi Living\Kiwi Living_20151113_19302035.ts
2016-02-17 12:40:19,209 (17e0) : INFO (logkit:16) - No poster data found
2016-02-17 12:40:19,209 (17e0) : INFO (logkit:16) - No posterbanner data found
2016-02-17 12:40:19,210 (17e0) : INFO (logkit:16) - Looking for episode XML file \aragorn\recordings\Kiwi Living\Kiwi Living_20151113_19302035.xml
2016-02-17 12:40:19,219 (17e0) : INFO (logkit:16) - xmlFile File exists…
2016-02-17 12:40:19,252 (17e0) : INFO (logkit:16) - Looks like an NPVR XML file (has )
2016-02-17 12:40:19,253 (17e0) : INFO (logkit:16) - Looking for title, setting to Ep Number first20151113
2016-02-17 12:40:19,253 (17e0) : INFO (logkit:16) - Episode title set to 20151113
2016-02-17 12:40:19,253 (17e0) : INFO (logkit:16) - Episode summary set to Erin creates a female version of a man-cave; Lee-Anne investigates ways to get a better night’s sleep; and Matt tries out new inner city attractions in Christchurch.
2016-02-17 12:40:19,253 (17e0) : INFO (logkit:16) - Setting AirDate from
2016-02-17 12:40:19,253 (17e0) : INFO (logkit:16) - AirDate_s 2015-11-13 19:25:02
2016-02-17 12:40:19,255 (17e0) : INFO (logkit:16) - AirDate set: time.struct_time(tm_year=2015, tm_mon=11, tm_mday=13, tm_hour=19, tm_min=25, tm_sec=2, tm_wday=4, tm_yday=317, tm_isdst=-1)
2016-02-17 12:40:19,255 (17e0) : INFO (logkit:16) - Setting Studio from
2016-02-17 12:40:19,255 (17e0) : INFO (logkit:16) - TV ONE
2016-02-17 12:40:19,256 (17e0) : INFO (logkit:16) - AirDate_s 2015-11-13 19:25:02
2016-02-17 12:40:19,256 (17e0) : INFO (logkit:16) - AirDate_end_s 2015-11-13 20:40:00 time.struct_time(tm_year=2015, tm_mon=11, tm_mday=13, tm_hour=19, tm_min=25, tm_sec=2, tm_wday=4, tm_yday=317, tm_isdst=-1)
2016-02-17 12:40:19,256 (17e0) : INFO (logkit:16) - Got End time to datetime:time.struct_time(tm_year=2015, tm_mon=11, tm_mday=13, tm_hour=20, tm_min=40, tm_sec=0, tm_wday=4, tm_yday=317, tm_isdst=-1)
2016-02-17 12:40:19,257 (17e0) : INFO (logkit:16) - Time taken: 4498.0
2016-02-17 12:40:19,257 (17e0) : INFO (logkit:16) - Duration set to 4498000
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - ++++++++++++++++++++++++
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - TV Episode nfo Information
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - ------------------------
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - Title: 20151113
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - Summary: Erin creates a female version of a man-cave; Lee-Anne investigates ways to get a better night’s sleep; and Matt tries out new inner city attractions in Christchurch.
2016-02-17 12:40:19,259 (17e0) : INFO (logkit:16) - Year: 2015-11-13
2016-02-17 12:40:19,260 (17e0) : INFO (logkit:16) - ++++++++++++++++++++++++

But when I look at the plex metadata I don’t see the summary:
Video ratingKey=“247” key="/library/metadata/247" parentRatingKey=“237” grandparentRatingKey=“236” guid=“local://247” type=“episode” title=“20151113” grandparentKey="/library/metadata/236" parentKey="/library/metadata/237" grandparentTitle=“Kiwi Living” summary="" index=“20151113” parentIndex=“2015” year=“2015” thumb="/library/metadata/247/thumb/1455666462" duration=“4497000” originallyAvailableAt=“2015-11-13” addedAt=“1447400400” updatedAt=“1455666462” chapterSource=""

Attached is the bundle and a sample XML file. Any help appreciated. I’m trying to write a scanner and agent to get NextPVR based recordings into plex - the episodes aren’t in the S0xE0x format, so there’s an associated XML file to read. I’ve tried basing the off the NFO one, but can’t figure out why the summary, or other details are not getting into plex.

Let me know if you get it to work, same problem here (see my post, same forum, today)

You can see I haven’t had any replies. I was just reading our thread before I got to here, in the hope it has some answers.

I saw your thread and went through some of it base on this post http://forums.plex.tv/discussion/comment/1142074/#Comment_1142074

I thought I saw an error with teh studio begin set So I commented it out.

Anyway I can see down the bottom it mentions a info.xml for the episode. I just has a look at this and it’s got all the details in it, but for some reason it doesn’t display on the web gui for plex.

I think you’re having the same type of symptom that i do, look up in your “Plex Media Server.log” file, for each update mine shows a line that says (example with 3 movies, “mymovieguid” is the guid you set during the “search” function) :

Mar 07, 2016 16:17:29:470 [2940] WARN - Error refreshing metadata for “mymovieguid”?lang=en

Setting all metadata to hardcoded values did nothing for me, and this is the only problem i can see that could affect this particular symptom…

I don’t see that error anywhere on my server log. I’m going to take the advice you were given to hard code values then one by one change them to the read in values.

I think I’ve got mine working. I added a bunch more error check (try, except pass) Also I found I wasn’t updating the title, and setting the title to none was probably my main cause of issues.

Cool, title should be working on my side here’s the relevant part :
(finaltitle is a string var previously checked as non empty, unicodize is a utility func to strip non unicode chars, the titles show up in the info.xml…)
metadata.title = unicodize(finaltitle)
metadata.title_sort = unicodize(finaltitle)
metadata.original_title = unicodize(finaltitle)

@psycik - Thanks for a brilliant bundle to sort the NEXTPVR recordings into PLEX TV Series library - it’s great. Sorry to ask what’s probably a simple question. I’ve searched all around the forum and I think I’ve done all the right things:

I can’t get the xml scanner to produce metadata for each episode though - I’ve got both the .bundles in the right place and both show up in the library section & I’ve put NextPVRRecordingsScanner.py in the C:\Users\User\AppData\Local\Plex Media Server\Scanners\Series directory and enabled output of xml files for each recording. I don’t get any metatata though, mainly the episode description that Next PVR has embedded in the xml…

It’s a nextpvr setting. In the config.xml file it is something like storemetadatainxml

Config is is users/public/npvr

Thanks @psycik - yes, I have NextPVR outputting xml files, one for each episode but no joy I’m afraid. Any other ideas?

The library section you’re trying to read the recordings into are set to use the nextpvr scanner and nextpvr metadata agent?

There is a log in the log/pms directory for npvrxml which is the metadata agent. You might need to post that.