croneter / PlexKodiConnect

Plex integration in Kodi done right
GNU General Public License v2.0
1.14k stars 77 forks source link

ERROR in library sync #613

Closed travhavlicek closed 5 years ago

travhavlicek commented 5 years ago

Getting ERROR in library sync notification popping up every 20 seconds or so. Seems to be hung up on my Recorded TV library which has video recorded in Plex using a HDHomeRun Connect.

Running PKC 2.5.20 beta on Kodi 18 x64 RC5.2 on Windows 10.

kodi.log

ghost commented 5 years ago

1.0.2 isn't the PKC version number btw.

travhavlicek commented 5 years ago

Apologies, version number for PKC is 2.5.20

croneter commented 5 years ago

Thanks for the log, @travhavlicek ! I'm sorry to tell you that this is a bug on the Plex side of things:

The PMS sends this XML for your library Recorded TV:

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="1" allowSync="1" identifier="com.plexapp.plugins.library" librarySectionID="13" librarySectionTitle="Recorded TV" librarySectionUUID="9731ec7f-0997-4af6-a2fb-e5d24e315a8f" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1539017183">
<Directory ratingKey="23904" key="/library/metadata/23904/children" guid="com.plexapp.agents.thetvdb://81388?lang=en" librarySectionTitle="Recorded TV" librarySectionID="13" librarySectionKey="/library/sections/13" studio="PBS" type="show" title="PBS NewsHour" summary="PBS NewsHour is the long running news magazine broadcast every weeknight on PBS. The show was created by veteran newsmen Robert MacNeil &amp; Jim Lehrer, and has been on the air&#160;since 1975. In 2009, the show, previously known as The NewsHour With Jim Lehrer, became PBS NewsHour. One of the major differences between network news and the PBS NewsHour is that because the show is publicly funded, there are no commercials. This allows the NewsHour to dedicate more time to comprehensive reporting. The nightly broadcast features a two-anchor format, with a rotation of NEWSHOUR senior correspondents Gwen Ifill, Judy Woodruff and Jeffrey Brown. Senior correspondents Margaret Warner and Ray Suarez deliver compelling original reporting &amp; newsmaker interviews from the field. Correspondent Hari Sreenivasan delivers news to the digital world and anchors the news summary on the television broadcasts." index="1" rating="9.3" lastViewedAt="1546796965" year="1983" thumb="/library/metadata/23904/thumb/1547859625" art="/library/metadata/23904/art/1547859625" banner="/library/metadata/23904/banner/1547859625" duration="3600000" originallyAvailableAt="1983-09-05" leafCount="7" viewedLeafCount="0" childCount="1" addedAt="1545267602" updatedAt="1547859625" autoDeletionItemPolicyUnwatchedLibrary="-7" autoDeletionItemPolicyWatchedLibrary="0" leafCount="10" viewedLeafCount="0">
<Genre id="13018" filter="genre=13018" tag="News" />
<Channel id="12188" filter="channel=12188" tag="2.1 KTCADT (PBS)" />
<Role id="15985" filter="actor=15985" tag=" Gwen Ifill" role="" thumb="https://thetvdb.com/banners/actors/75911.jpg" />
<Role id="15987" filter="actor=15987" tag=" Judy Woodruff" role="" thumb="https://thetvdb.com/banners/actors/75914.jpg" />
<Role id="15986" filter="actor=15986" tag=" Jeffrey Brown" role="" thumb="https://thetvdb.com/banners/actors/75910.jpg" />
<Role id="15989" filter="actor=15989" tag=" Ray Suarez" role="" thumb="https://thetvdb.com/banners/actors/75912.jpg" />
<Role id="15988" filter="actor=15988" tag=" Margaret Warner" role="" thumb="https://thetvdb.com/banners/" />
<Role id="15991" filter="actor=15991" tag="Hari Sreenivasan" role="" thumb="https://thetvdb.com/banners/actors/320108.jpg" />
<Role id="15990" filter="actor=15990" tag="Christina Bellantoni" role="" thumb="https://thetvdb.com/banners/actors/320109.jpg" />
<Similar id="15982" filter="similar=15982" tag="The Face of Analia" />
<Similar id="15981" filter="similar=15981" tag="The Daily Show with Trevor Noah" />
<Similar id="15977" filter="similar=15977" tag="Family Guy" />
<Similar id="15978" filter="similar=15978" tag="Gotham" />
<Similar id="15979" filter="similar=15979" tag="Supernatural" />
<Similar id="15061" filter="similar=15061" tag="South Park" />
<Similar id="15976" filter="similar=15976" tag="Arrow" />
<Similar id="15983" filter="similar=15983" tag="The Flash" />
<Similar id="15980" filter="similar=15980" tag="The Big Bang Theory" />
<Similar id="15984" filter="similar=15984" tag="The Simpsons" />
<Similar id="15131" filter="similar=15131" tag="Game of Thrones" />
<Location path="/mnt/media/Recorded TV/PBS NewsHour (2009)" />
<Extras size="0">
</Extras>
</Directory>
</MediaContainer>

PlexKodiConnect warns you that it cannot parse this XML:

WARNING: PLEX.download: Unable to convert the response for: https://192.168.7.45:32400/library/metadata/23904?includeRelated=0&includeExtras=1&includeReviews=1&skipRefresh=1&checkFiles=0

The reason for this: the attribute leafCount exists twice in line number 3! Please take this up with the Plex team.

Out of the blue, you can try to recreate this entire Plex section. That might help. But I'd still ask on the Plex forums...

croneter commented 5 years ago

It seems to be the attribte leafCount, but not necessarily always in line 3. E.g. the response for

https://192.168.7.45:32400/library/sections/13/all?type=2

is

<?xml version="1.0" encoding="UTF-8"?>
<MediaContainer size="8" totalSize="8" allowSync="1" art="/:/resources/show-fanart.jpg" identifier="com.plexapp.plugins.library" librarySectionID="13" librarySectionTitle="Recorded TV" librarySectionUUID="9731ec7f-0997-4af6-a2fb-e5d24e315a8f" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1539017183" nocache="1" offset="0" sortAsc="1" thumb="/:/resources/show.png" title1="Recorded TV" title2="All Shows" viewGroup="show" viewMode="131122">
<Directory ratingKey="21311" key="/library/metadata/21311/children" type="show" title="The Day Reagan Was Shot" titleSort="Day Reagan Was Shot" summary="Interviews with James Brady, Sarah Brady, Alexander Haig and Lyn Nofzinger; host Tony Snow." index="1" lastViewedAt="1496712445" year="2001" thumb="/library/metadata/21311/thumb/1547887904" originallyAvailableAt="2001-01-01" leafCount="1" viewedLeafCount="0" childCount="1" addedAt="1496678401" updatedAt="1547887904">
<Genre tag="History" />
<Genre tag="Documentary" />
<Genre tag="Public affairs" />
</Directory>
<Directory ratingKey="21334" key="/library/metadata/21334/children" type="show" title="The Beatles: From the Beginning to the End" titleSort="Beatles: From the Beginning to the End" contentRating="TV-PG" summary="Recounting the incredible rise of The Beatles, from Liverpool and Hamburg nightclubs to a worldwide cultural phenomenon; behind the scenes glimpse into the lives of John Lennon, Paul McCartney, George Harrison and Ringo Starr rarely seen." index="1" year="2015" thumb="/library/metadata/21334/thumb/1547887904" originallyAvailableAt="2015-01-01" leafCount="1" viewedLeafCount="0" childCount="1" addedAt="1497016800" updatedAt="1547887904">
<Genre tag="Documentary" />
<Genre tag="Music" />
<Genre tag="Special" />
</Directory>
<Directory ratingKey="21351" key="/library/metadata/21351/children" studio="PBS" type="show" title="NOVA" contentRating="TV-PG" summary="Seen in more than 100 countries, NOVA is the most watched science television series in the world and the most watched documentary series on PBS. It is also one of television&#39;s most acclaimed series, having won every major television award, most of them many times over." index="1" rating="9.1" lastViewedAt="1536367379" year="1974" thumb="/library/metadata/21351/thumb/1518663644" art="/library/metadata/21351/art/1518663644" banner="/library/metadata/21351/banner/1518663644" duration="3600000" originallyAvailableAt="1974-03-03" leafCount="36" viewedLeafCount="0" childCount="6" addedAt="1497328200" updatedAt="1518663644" autoDeletionItemPolicyUnwatchedLibrary="0" autoDeletionItemPolicyWatchedLibrary="0">
<Genre tag="Documentary" />
</Directory>
<Directory ratingKey="21942" key="/library/metadata/21942/children" studio="ABC (AU)" type="show" title="Frontline (1994)" summary="Frontline is a satirical comedy on Current Affairs. From the anchor Mike Moore who believes he does all the work (but just reads the autocue) to the egotistic reporter Brooke Vandenberg and the troubles of the other staff (not to mention horrible  Friday Night Entertainer Elliot Rhodes) After two years, the show did a thing related only to sci-fi programs, by skipping forward a number of years. The show, however, maintained it&#39;s high quality and is one of the Top Australian shows ever made. From Season 2 onwards, there are no specific writing credits as Cilauro, Kennedy, Sitch and Gleisner wrote in practically all episodes. The same is said for directing." index="1" rating="9.5" viewCount="3" lastViewedAt="1547610376" year="1994" thumb="/library/metadata/21942/thumb/1546660814" art="/library/metadata/21942/art/1546660814" banner="/library/metadata/21942/banner/1546660814" duration="1200000" originallyAvailableAt="1994-05-09" leafCount="38" viewedLeafCount="3" childCount="5" addedAt="1505273402" updatedAt="1546660814" autoDeletionItemPolicyUnwatchedLibrary="0" autoDeletionItemPolicyWatchedLibrary="0">
<Genre tag="Comedy" />
<Role tag="Alison Whyte" />
<Role tag="Anita Cerdic" />
<Role tag="Boris Conley" />
</Directory>
<Directory ratingKey="21965" key="/library/metadata/21965/children" studio="History" type="show" title="The Vietnam War" titleSort="Vietnam War" summary="At a total cost of more than 3.1 million lives, the Vietnam conflict is, to date, America s longest and most controversial war. It also marked the first time TV journalists ventured out to the frontlines to bring the spectacle of combat into American living rooms. Across the nation, Americans watched, captivated by the surprise Tet Offensive and the slow-motion tragedy of the 77-day Battle of Khe Sanh, and witnessed the courage and skill of American soldiers at decisive engagements like Ia Drang Valley, Con Thien, and Dak To.&#xD;&#xA;&#xD;&#xA;Now THE HISTORY CHANNEL presents a comprehensive 2-disc set that profiles the decision-makers and chronicles each key event in the Vietnam war, from the advisors arrival in 1959 to the airlift from the roof of the American Embassy in 1975. Archival footage and interviews with historians and veterans reveal the military and political strategies in play, and CBS News archives take viewers to the frontlines to witness the daily struggles of American servicemen and women." index="1" rating="7.0" viewCount="5" lastViewedAt="1520646692" year="2008" thumb="/library/metadata/21965/thumb/1506657608" art="/library/metadata/21965/art/1506657608" banner="/library/metadata/21965/banner/1506657608" duration="21600000" originallyAvailableAt="2008-01-15" leafCount="10" viewedLeafCount="4" childCount="1" addedAt="1505698202" updatedAt="1506657608" autoDeletionItemPolicyUnwatchedLibrary="0" autoDeletionItemPolicyWatchedLibrary="0">
<Genre tag="Documentary" />
</Directory>
<Directory ratingKey="22675" key="/library/metadata/22675/children" studio="CBS" type="show" title="60 Minutes" summary="60 Minutes has been on the air since 1968, beginning on a Tuesday, but spending most of its time on Sundays, where it remains today.&#xD;&#xA;&#xD;&#xA;This popular news magazine provides both hard hitting investigations, interviews and features, along with people in the news and current events.&#xD;&#xA;60 Minutes has set unprecedented records in the Nielsen&#39;s ratings with a number 1 rating, five times, making it among the most successful TV programs in all of television history.&#xD;&#xA;&#xD;&#xA;This series has won more Emmy awards than any other news program and in 2003, Don Hewitt, the creator (back in 1968), was awarded the Lifetime Achievement Emmy, along with the 60 Minute correspondents.&#xD;&#xA;Added to the 11 Peabody awards, this phenomenally long-lived series has collected 78 awards up to the 2005 season and remains among the viewers top choice for news magazine features." index="1" rating="8.7" lastViewedAt="1500948183" year="1968" thumb="/library/metadata/22675/thumb/1522022461" art="/library/metadata/22675/art/1522022461" banner="/library/metadata/22675/banner/1522022461" duration="2700000" originallyAvailableAt="1968-09-01" leafCount="1" viewedLeafCount="0" childCount="1" addedAt="1522022401" updatedAt="1522022461" autoDeletionItemPolicyUnwatchedLibrary="0" autoDeletionItemPolicyWatchedLibrary="0">
<Genre tag="Documentary" />
<Genre tag="News" />
<Role tag="Steve Kroft" />
<Role tag="Anderson Cooper" />
<Role tag="Mike Wallace" />
</Directory>
<Directory ratingKey="22990" key="/library/metadata/22990/children" studio="NBC" type="show" title="American Ninja Warrior" contentRating="TV-PG" summary="The heart-racing obstacle-course competition of ultra-athletes questing for a shot at the fabled Mt. Midoriyama.  This American version of the Japanese show Sasuke (aka Ninja Warrior) televises a series of qualification courses across the nation, with the top contenders going to Las Vegas for the finals on the 4-stage &#34;Mt. Midoriyama&#34; obstacle course.&#xD;&#xA;&#xD;&#xA;In earlier seasons the show was a proving ground to find (and train) American athletes to send to Japan to compete in the original Sasuke tournaments." index="1" rating="8.5" year="2009" thumb="/library/metadata/22990/thumb/1531188023" art="/library/metadata/22990/art/1531188023" banner="/library/metadata/22990/banner/1531188023" duration="5100000" originallyAvailableAt="2009-12-12" leafCount="1" viewedLeafCount="0" childCount="1" addedAt="1531188003" updatedAt="1531188023">
<Genre tag="Reality" />
<Genre tag="Special Interest" />
<Role tag="Matt Iseman" />
<Role tag="Kristine Leahy" />
</Directory>
<Directory ratingKey="23904" key="/library/metadata/23904/children" studio="PBS" type="show" title="PBS NewsHour" summary="PBS NewsHour is the long running news magazine broadcast every weeknight on PBS. The show was created by veteran newsmen Robert MacNeil &amp; Jim Lehrer, and has been on the air&#160;since 1975. In 2009, the show, previously known as The NewsHour With Jim Lehrer, became PBS NewsHour. One of the major differences between network news and the PBS NewsHour is that because the show is publicly funded, there are no commercials. This allows the NewsHour to dedicate more time to comprehensive reporting. The nightly broadcast features a two-anchor format, with a rotation of NEWSHOUR senior correspondents Gwen Ifill, Judy Woodruff and Jeffrey Brown. Senior correspondents Margaret Warner and Ray Suarez deliver compelling original reporting &amp; newsmaker interviews from the field. Correspondent Hari Sreenivasan delivers news to the digital world and anchors the news summary on the television broadcasts." index="1" rating="9.3" lastViewedAt="1546796965" year="1983" thumb="/library/metadata/23904/thumb/1547859625" art="/library/metadata/23904/art/1547859625" banner="/library/metadata/23904/banner/1547859625" duration="3600000" originallyAvailableAt="1983-09-05" leafCount="7" viewedLeafCount="0" childCount="1" addedAt="1545267602" updatedAt="1547859625" autoDeletionItemPolicyUnwatchedLibrary="-7" autoDeletionItemPolicyWatchedLibrary="0" leafCount="10" viewedLeafCount="0">
<Genre tag="News" />
<Role tag=" Gwen Ifill" />
<Role tag=" Jeffrey Brown" />
<Role tag=" Judy Woodruff" />
</Directory>
</MediaContainer>

Here, line 38 is the culprit. Really weird!!

travhavlicek commented 5 years ago

Thanks for the info. I will take this to the Plex forum and try recreating that specific library.