Solved TMM can't re-read .nfo files altered by "NFO Watchedstate Updater"
#1
Rainbow 
Hey there,

when you scrape movie-items with TMM, after "NFO Watchedstate Updater" changes them (barely), TMM can't re-read the .nfo files.

I narrowed the problem down to this (simplified example!):

.nfo file from TMM scraping:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- created on 2014-12-14 15:12:30 - tinyMediaManager 2.6.4 -->
<movie>
    <title>A MovieName here</title>
    <originaltitle>A MovieName here</originaltitle>
    <set></set>
    <sorttitle></sorttitle>
    <rating>6.8</rating>
    <year>2013</year>
    <top250></top250>
    <votes>464</votes>
    <outline>Text Text Text Text Text Text Text Text Text Text Text Text Text</outline>
    <plot>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text</plot>
    <tagline>Text Text Text Text </tagline>
    <runtime>116</runtime>
    <thumb></thumb>
    <mpaa>DE:FSK 16 / DE:FSK16 / DE:16 / DE:ab 16</mpaa>
    <certification>DE:FSK 16 / DE:FSK16 / DE:16 / DE:ab 16</certification>
    <id>11111111111111111111</id>
    <ids>
        <entry>
            <key>tmdbId</key>
            <value xsi:type="xs:int" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1111111111</value>
        </entry>
        <entry>
            <key>imdbId</key>
            <value xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1111111111</value>
        </entry>
    </ids>
    <watched>false</watched>
    <playcount>0</playcount>
</movie>

.nfo file alfter altering and cleanup from "NFO Watchedstate Updater":
Code:
<?xml version='1.0' encoding='UTF-8'?>
<movie xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <title>A MovieName here</title>
  <originaltitle>A MovieName here</originaltitle>
  <set />
  <sorttitle />
  <rating>6.8</rating>
  <year>2013</year>
  <top250 />
  <votes>464</votes>
  <outline>Text Text Text Text Text Text Text Text Text Text Text Text Text</outline>
  <plot>Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text</plot>
  <tagline>Text Text Text Text </tagline>
  <runtime>116</runtime>
  <thumb />
  <mpaa>DE:FSK 16 / DE:FSK16 / DE:16 / DE:ab 16</mpaa>
  <certification>DE:FSK 16 / DE:FSK16 / DE:16 / DE:ab 16</certification>
  <id>11111111111111111111</id>
  <ids>
    <entry>
      <key>tmdbId</key>
      <value xsi:type="xs:int">1111111111</value>
    </entry>
    <entry>
      <key>imdbId</key>
      <value xsi:type="xs:string">1111111111</value>
    </entry>
  </ids>
  <watched>true</watched>
  <playcount>1</playcount>
</movie>


FIX:
It all comes down to the two attributes:

If i remove
xsi:type="xs:int"
and
xsi:type="xsConfusedtring"
the .nfo file can be read by TMM again.

TMM error:
Quote:20:18:17.037 ERROR o.t.core.movie.connector.MovieToXbmcNfoConnector - getData
java.lang.IllegalArgumentException: prefix xs is not bound to a namespace
at com.sun.xml.internal.bind.DatatypeConverterImpl._parseQName(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiTypeLoader.parseXsiType(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.XsiTypeLoader.startElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.SAXConnector.startElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) ~[na:1.8.0_25]
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unknown Source) ~[na:1.8.0_25]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0_25]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0_25]
at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(Unknown Source) ~[na:1.8.0_25]
at org.tinymediamanager.core.movie.connector.MovieToXbmcNfoConnector.parseNFO(MovieToXbmcNfoConnector.java:726) ~[tmm.jar:2.6.4 (r1770)]
at org.tinymediamanager.core.movie.connector.MovieToXbmcNfoConnector.getData(MovieToXbmcNfoConnector.java:543) ~[tmm.jar:2.6.4 (r1770)]
at org.tinymediamanager.core.movie.tasks.MovieUpdateDatasourceTask.parseMovieDirectory(MovieUpdateDatasourceTask.java:400) [tmm.jar:2.6.4 (r1770)]
at org.tinymediamanager.core.movie.tasks.MovieUpdateDatasourceTask.access$100(MovieUpdateDatasourceTask.java:67) [tmm.jar:2.6.4 (r1770)]
at org.tinymediamanager.core.movie.tasks.MovieUpdateDatasourceTask$FindMovieTask.call(MovieUpdateDatasourceTask.java:881) [tmm.jar:2.6.4 (r1770)]
at org.tinymediamanager.core.movie.tasks.MovieUpdateDatasourceTask$FindMovieTask.call(MovieUpdateDatasourceTask.java:853) [tmm.jar:2.6.4 (r1770)]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_25]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_25]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_25]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_25]


Thanks Smile
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#2
Hi,

thanks for the info. I'll put a workaround in the next version

Manuel
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#3
Great, thank you!
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#4
Hey there again,
just out of interest, will there be a last version pushed out within this year which contains the workaround? Smile
No hurry!
Thanks.
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#5
I hope so Smile
till XMAS we have very little time (work & family), but I hope I have some more time after XMAS to work on tmm
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#6
Alright, thanks. Take the time you need. Smile Merry XMAS.
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#7
Hey there,

just tried the pre-release, reinitialized the database and still getting many .nfo which can't be read. Possibly because of the thing we talked about here.

Question: Is the fix in the 2.6.5 prerelease? Or am i trying too soon?

Will provide more info. Smile

Follow up:

Just tried removing the two attributes like mentioned in my initial post. - and tada - works again.

So it seems that if there is a possible fix in 2.6.5, it doesn't seem to work?

Thanks anyway, we will sort this out! No hurry! Smile


Let me know if you need more info.


Essentially everything i tested some minutes ago is still the same as what i described in my first post.
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#8
You are right - the fix I've included was not good enough. in the next prerelease there will be a (hopefully) working fix Big Grin

stay tuned
tinyMediaManager - THE media manager of your choice - available for Windows, macOS and Linux
Help us translate tinyMediaManager at Weblate | Translations at 66%
Found a bug or want to submit a feature request? Contact us at GitLab
#9
Thanks! I'll report back.
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#10
Quick feedback. Updated last night and although i only did a short test, it seems to work now! Smile Thanks
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)
#11
Still looking good. Did some more tests.
猬咃笍猬咃笍 Leave 馃憤 on useful posts聽 路聽 axbmcuser REPO (Easy install)聽 路聽 Confluence ZEITGEIST (intuitive UI for Kodi)

Logout Mark Read Team Forum Stats Members Help
TMM can't re-read .nfo files altered by "NFO Watchedstate Updater"1