Closed tamburra closed 4 years ago
Yes. Not attaching agent Logs which would show for each field the data direction...
The source is only used in case of a conflict, when Plex and local have different values. I did check the source and if both are populated and you set it to local it should update Plex.
It shouldn't have updated the title but the rest is expected.
My apologies. Here is the log for a different file of the same series. What i did was change the title field in the NFO directly to "Unseen Sketches" and then refreshed metadata on the episode in plex. You can see in the log the local title differs from plex but it still took the plex over the local and now the NFO was edited by Lambda and the title field got changed back to "Episode 102". The title field is NOT locked within plex. It took the plex data over the local data even though my settings are set to take local.
2020-05-09 14:09:04,053 (7f2416ffd700) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/sections/2/all?type=4&X-Plex-Container-Start=97840&X-Plex-Container-Size=20'
2020-05-09 14:09:04,066 (7f2416ffd700) : INFO (__init__:70) - # [97841-97860 of 108888] http://127.0.0.1:32400/library/sections/2/all?type=4&X-Plex-Container-Start=97840&X-Plex-Container-Size=20
2020-05-09 14:09:04,066 (7f2416ffd700) : INFO (__init__:687) - [ ] serie ratingKey: 257104, season: 0, episode: 102
2020-05-09 14:09:04,066 (7f2416ffd700) : INFO (__init__:687) - [ ] filenoext: "That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD"
2020-05-09 14:09:04,067 (7f2416ffd700) : INFO (__init__:85) - nfo_load("{'/media/TV Shows/Th...", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo") - nfo_file: "/media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.nfo"
2020-05-09 14:09:04,068 (7f2416ffd700) : INFO (__init__:142) - SaveFile("/library/metadata/452571/thumb/1589040330", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "thumb"
2020-05-09 14:09:04,069 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "/library/metadata/452571/thumb/1589040330", type: "<type 'str'>"
2020-05-09 14:09:04,069 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "/library/metadata/452571/thumb/1589038006", type: "<type 'str'>"
2020-05-09 14:09:04,070 (7f2416ffd700) : INFO (__init__:206) - [@] Plex update episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.nfo, ratingKey:
2020-05-09 14:09:04,070 (7f2416ffd700) : INFO (__init__:142) - SaveFile("Episode 102", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "title"
2020-05-09 14:09:04,071 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "Episode 102", type: "<type 'str'>"
2020-05-09 14:09:04,071 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "Unseen Sketches", type: "<type 'str'>"
2020-05-09 14:09:04,072 (7f2416ffd700) : INFO (__init__:117) - [X] tag: "title" found, updating attributes: "{'text': 'Episode 102'}"
2020-05-09 14:09:04,073 (7f2416ffd700) : INFO (__init__:142) - SaveFile("", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "plot"
2020-05-09 14:09:04,073 (7f2416ffd700) : INFO (__init__:142) - SaveFile("None", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "aired"
2020-05-09 14:09:04,074 (7f2416ffd700) : INFO (__init__:142) - SaveFile("That Mitchell and Webb Look", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "showtitle"
2020-05-09 14:09:04,074 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "That Mitchell and Webb Look", type: "<type 'str'>"
2020-05-09 14:09:04,074 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "That Mitchell and Webb Look", type: "<type 'str'>"
2020-05-09 14:09:04,074 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,075 (7f2416ffd700) : INFO (__init__:142) - SaveFile("None", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "year"
2020-05-09 14:09:04,075 (7f2416ffd700) : INFO (__init__:142) - SaveFile("1589038003", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "dateadded"
2020-05-09 14:09:04,075 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "1589038003", type: "<type 'str'>"
2020-05-09 14:09:04,076 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "1589038003", type: "<type 'str'>"
2020-05-09 14:09:04,076 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,076 (7f2416ffd700) : INFO (__init__:142) - SaveFile("0", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "season"
2020-05-09 14:09:04,077 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "0", type: "<type 'str'>"
2020-05-09 14:09:04,077 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "", type: "<type 'str'>"
2020-05-09 14:09:04,077 (7f2416ffd700) : INFO (__init__:117) - [X] tag: "season" found, updating attributes: "{'text': '0'}"
2020-05-09 14:09:04,077 (7f2416ffd700) : INFO (__init__:122) - attribute: "text", value: "0"
2020-05-09 14:09:04,078 (7f2416ffd700) : INFO (__init__:142) - SaveFile("102", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "episode"
2020-05-09 14:09:04,078 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "102", type: "<type 'str'>"
2020-05-09 14:09:04,078 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "102", type: "<type 'str'>"
2020-05-09 14:09:04,079 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,079 (7f2416ffd700) : INFO (__init__:142) - SaveFile("That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "file"
2020-05-09 14:09:04,079 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", type: "<type 'str'>"
2020-05-09 14:09:04,080 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", type: "<type 'str'>"
2020-05-09 14:09:04,080 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,080 (7f2416ffd700) : INFO (__init__:142) - SaveFile("/media/TV Shows/That Mitchell and Webb Look/Specials", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "path"
2020-05-09 14:09:04,081 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "/media/TV Shows/That Mitchell and Webb Look/Specials", type: "<type 'str'>"
2020-05-09 14:09:04,081 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "/media/TV Shows/That Mitchell and Webb Look/Specials", type: "<type 'str'>"
2020-05-09 14:09:04,081 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,081 (7f2416ffd700) : INFO (__init__:142) - SaveFile("/media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "filenameandpath"
2020-05-09 14:09:04,082 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "/media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", type: "<type 'str'>"
2020-05-09 14:09:04,082 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "/media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv", type: "<type 'str'>"
2020-05-09 14:09:04,082 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,083 (7f2416ffd700) : INFO (__init__:142) - SaveFile("/media/TV Shows/That Mitchell and Webb Look", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "basepath"
2020-05-09 14:09:04,083 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "/media/TV Shows/That Mitchell and Webb Look", type: "<type 'str'>"
2020-05-09 14:09:04,083 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "/media/TV Shows/That Mitchell and Webb Look", type: "<type 'str'>"
2020-05-09 14:09:04,083 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_nfo: /media/TV Shows/That Mitchell and Webb Look/Specials/.nfo
2020-05-09 14:09:04,084 (7f2416ffd700) : INFO (__init__:142) - SaveFile("None", "/media/TV Shows/That Mitchell and Webb Look", "series_nfo", "tvshow.nfo"...) xml_field: "{'test': {'rating': {'default': '', 'max': '10', 'Name': '', 'value': {'text': None}}}}"
2020-05-09 14:09:04,084 (7f2416ffd700) : INFO (__init__:142) - SaveFile("/library/metadata/452571/thumb/1589040330", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_thumbs", "{}.ext"...) xml_field: ""
2020-05-09 14:09:04,085 (7f2416ffd700) : DEBUG (networking:143) - Requesting 'http://127.0.0.1:32400/library/metadata/452571/thumb/1589040330'
2020-05-09 14:09:04,095 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "binary...", type: "<type 'str'>"
2020-05-09 14:09:04,095 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "binary...", type: "<type 'str'>"
2020-05-09 14:09:04,096 (7f2416ffd700) : INFO (__init__:206) - [=] No update - episode_thumbs: /media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.jpg
2020-05-09 14:09:04,096 (7f2416ffd700) : INFO (__init__:687) - <?xml version='1.0' encoding='utf8'?>
<Video ratingKey="452571" key="/library/metadata/452571" parentRatingKey="452569" grandparentRatingKey="257104" guid="com.plexapp.agents.thetvdb://80165/0/102?lang=en" parentGuid="com.plexapp.agents.thetvdb://80165/0?lang=en" grandparentGuid="com.plexapp.agents.thetvdb://80165?lang=en" type="episode" title="Episode 102" grandparentKey="/library/metadata/257104" parentKey="/library/metadata/452569" grandparentTitle="That Mitchell and Webb Look" parentTitle="Specials" summary="" index="102" parentIndex="0" thumb="/library/metadata/452571/thumb/1589040330" art="/library/metadata/257104/art/1589040333" grandparentThumb="/library/metadata/257104/thumb/1589040333" grandparentArt="/library/metadata/257104/art/1589040333" grandparentTheme="/library/metadata/257104/theme/1589040333" duration="1193040" addedAt="1589038003" updatedAt="1589040330" chapterSource="media">
<Media id="1792587" duration="1193040" bitrate="4782" width="720" height="576" aspectRatio="1.78" audioChannels="2" audioCodec="ac3" videoCodec="mpeg2video" videoResolution="576" container="mkv" videoFrameRate="PAL" videoProfile="main">
<Part id="3591027" key="/library/parts/3591027/1588991188/file.mkv" duration="1193040" file="/media/TV Shows/That Mitchell and Webb Look/Specials/That Mitchell and Webb Look - s00e102 - Unseen Sketches - DVD.mkv" size="713128230" container="mkv" videoProfile="main"/>
</Media>
</Video>
2020-05-09 14:09:04,097 (7f2416ffd700) : INFO (__init__:687) -
2020-05-09 14:09:04,071 (7f2416ffd700) : INFO (__init__:206) - [?] plex_value: "Episode 102", type: "<type 'str'>"
2020-05-09 14:09:04,071 (7f2416ffd700) : INFO (__init__:206) - [?] local_value: "Unseen Sketches", type: "<type 'str'>"
2020-05-09 14:09:04,072 (7f2416ffd700) : INFO (__init__:117) - [X] tag: "title" found, updating attributes: "{'text': 'Episode 102'}"
Need to search more in depth. Will update this post, no need to reply for now
Line 372
SaveFile(video.get('title' ), path, 'movies_nfo', nfo_xml=nfo_xml, dynamic_name=filenoext, xml_field='title', metadata_field=metadata.title )
Call the function SaveFile() line 127, which calculate plex and local value, then have 2 tests to update plex or local value if needed only
SaveFile("Episode 102", "/media/TV Shows/That Mitchell and Webb Look/Specials", "episode_nfo", "{}.nfo"...) xml_field: "title"
[?] plex_value: "Episode 102", type: "<type 'str'>"
[?] local_value: "Unseen Sketches", type: "<type 'str'>"
[X] tag: "title" found, updating attributes: "{'text': 'Episode 102'}"
So if local_value exists and plex_value doesn't or source is set to local and metadata_field is not empty, then it updates plex_value but that didn't happen
elif local_value==plex_value: Log.Info('[=] No update - {}: {}'.format(field, destination)); # Identical
elif local_value and (not plex_value or Prefs['metadata_source']=='local' and metadata_field is not None):
elif plex_value and (not local_value or Prefs['metadata_source']=='plex' or Prefs['metadata_source']=='local' and metadata_field is None):
Notes
"metadata_field is None" should be "metadata_field is not None" line 198
Line 185 update remote value
elif local_value and (not plex_value or Prefs['metadata_source']=='local') and metadata_field is not None:
Line 198 update local value (keep in mind plex_value==local_value already tested)
elif plex_value and (not local_value or Prefs['metadata_source']=='local') and metadata_field is not None:
Please test next upload and paste logs again please, this one seem tricky
Please test next upload and paste logs again please
Much thanks for looking into this. I will be back to test this soon and report back.
Please test latest version and report
No answer for more than 30 days
My Metadata source setting is currently set to "Local". I have created my own NFO files manually for some TV episodes. In Plex i scanned the TV Show library so the new episodes populate in Plex. Lambda then changes all my manual NFO's to different content. I was under the impression that when setting metadata source to local, that this would not happen. I am looking to have the metadata from the NFO be the data entered into plex when i scan the library.
Here is my manual nfo i created:
This is what Lambda then changes it too
The expected behavior that I am looking for is that Lambda would NOT change the TITLE within my NFO due to the metadata source being local. Am i doing something wrong?