home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Import from MyFilms?
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Dewey" data-source="post: 1126190" data-attributes="member: 60221"><p>Hi RoChess,</p><p></p><p>I had the debugger on but I wasn't enabling the additional MePo debugger also - got the full log and worked out the problem, the scraper wamps provided appeared to be re-uploaded with a change to it to support Helios61s' later query (searching via @URL rather than [USER=79903]@source[/USER]). I corrected this and got it working.</p><p></p><p>I've got a follow up question for you on this if you know the answer; I've spent the last few days learning/understanding Xpath and I now have a rough idea but I'm getting held up on an issue - hoping you can give some guidance.</p><p></p><p>This is the code that wamps uses to search the AMC xml for matches;</p><p></p><p style="margin-left: 20px"><p style="margin-left: 20px"><retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" /></p></p> <p style="margin-left: 20px"> <parse name="mov" input="${file}" xpath="${search}" /></p> <p style="margin-left: 20px"> </p> <p style="margin-left: 20px"> <loop name="movs" on="mov"></p> <p style="margin-left: 20px"> <set name="movie[${count}].title" value="${mov[${count}].@TranslatedTitle}" /></p> <p style="margin-left: 20px"> <set name="movie[${count}].alternate_titles" value="${mov[${count}].@OriginalTitle}" /></p> <p style="margin-left: 20px"> <set name="movie[${count}].year" value="${mov[${count}].@Year}" /></p> <p style="margin-left: 20px"> <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/></p> <p style="margin-left: 20px"> <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" /></p> <p style="margin-left: 20px"> </loop></p> <p style="margin-left: 20px"></p><p>My problem is that I have several boxsets in AMC (where '\' in the title identifies the boxset) which means that the title comes into MovingPictures with the slash;</p><p style="margin-left: 20px">Evil Dead\Evil Dead</p> <p style="margin-left: 20px">Evil Dead\Evil Dead II: Dead by Dawn</p> <p style="margin-left: 20px">Evil Dead\Evil Dead III - Army of Darkness</p><p></p><p>What I'd like to do is use the Xpath functions substring-after to assign the title/alt_title and use the substring-before to set the collections field. I just don't know how to write the syntax correctly <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /> I'd also need to wrap this into an if statement so that the substring function only happens on boxsets <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /> <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite3" alt=":(" title="Frown :(" loading="lazy" data-shortname=":(" /></p><p></p><p style="margin-left: 20px"><p style="margin-left: 20px"><retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" /></p></p> <p style="margin-left: 20px"> <parse name="mov" input="${file}" xpath="${search}" /></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <loop name="movs" on="mov"> </p> <p style="margin-left: 20px"> </p> <p style="margin-left: 20px"> <!-- Modify title if its a BoxSet--></p> <p style="margin-left: 20px"> <substring-after name="newtitle[${count}]" input="${mov[0].@TranslatedTitle}" string="\" /></p> <p style="margin-left: 20px"> <set name="movie[${count}].title" value="${newtitle}"/></p> <p style="margin-left: 20px"> <substring-after name="newalttitle[${count}]" input="${mov[0].@OriginalTitle}" string="\" /></p> <p style="margin-left: 20px"> <set name="movie[${count}].alternate_titles" value="${newalttitle}"/></p> <p style="margin-left: 20px"> </p> <p style="margin-left: 20px"> <substring-before name="newcollections[${count}]" input="${mov[0].@TranslatedTitle}" string="\" /></p> <p style="margin-left: 20px"> <set name="movie[${count}].collections" value="${newcollections}"/></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"></p> <p style="margin-left: 20px"> <set name="movie[${count}].year" value="${mov[${count}].@Year}" /></p> <p style="margin-left: 20px"> <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/></p> <p style="margin-left: 20px"> <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" /></p> <p style="margin-left: 20px"> </loop></p><p></p><p>This code doesn't actually give an error, it just provides null values into the title, alt_title & collections fields.</p><p></p><p>Is this code even possible? I've attached the various docs in case it helps.</p><p></p><p>Cheers,</p><p>Dwight</p></blockquote><p></p>
[QUOTE="Dewey, post: 1126190, member: 60221"] Hi RoChess, I had the debugger on but I wasn't enabling the additional MePo debugger also - got the full log and worked out the problem, the scraper wamps provided appeared to be re-uploaded with a change to it to support Helios61s' later query (searching via @URL rather than [USER=79903]@source[/USER]). I corrected this and got it working. I've got a follow up question for you on this if you know the answer; I've spent the last few days learning/understanding Xpath and I now have a rough idea but I'm getting held up on an issue - hoping you can give some guidance. This is the code that wamps uses to search the AMC xml for matches; [INDENT][INDENT]<retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" />[/INDENT] <parse name="mov" input="${file}" xpath="${search}" /> <loop name="movs" on="mov"> <set name="movie[${count}].title" value="${mov[${count}].@TranslatedTitle}" /> <set name="movie[${count}].alternate_titles" value="${mov[${count}].@OriginalTitle}" /> <set name="movie[${count}].year" value="${mov[${count}].@Year}" /> <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/> <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" /> </loop> [/INDENT] My problem is that I have several boxsets in AMC (where '\' in the title identifies the boxset) which means that the title comes into MovingPictures with the slash; [INDENT]Evil Dead\Evil Dead Evil Dead\Evil Dead II: Dead by Dawn Evil Dead\Evil Dead III - Army of Darkness[/INDENT] What I'd like to do is use the Xpath functions substring-after to assign the title/alt_title and use the substring-before to set the collections field. I just don't know how to write the syntax correctly :( I'd also need to wrap this into an if statement so that the substring function only happens on boxsets :( :( [INDENT][INDENT]<retrieve name="file" file="${amc_DB}" encoding="iso-8859-1" />[/INDENT] <parse name="mov" input="${file}" xpath="${search}" /> <loop name="movs" on="mov"> <!-- Modify title if its a BoxSet--> <substring-after name="newtitle[${count}]" input="${mov[0].@TranslatedTitle}" string="\" /> <set name="movie[${count}].title" value="${newtitle}"/> <substring-after name="newalttitle[${count}]" input="${mov[0].@OriginalTitle}" string="\" /> <set name="movie[${count}].alternate_titles" value="${newalttitle}"/> <substring-before name="newcollections[${count}]" input="${mov[0].@TranslatedTitle}" string="\" /> <set name="movie[${count}].collections" value="${newcollections}"/> <set name="movie[${count}].year" value="${mov[${count}].@Year}" /> <subtract name="movie[${count}].popularity" value1="100" value2="${count}"/> <set name="movie[${count}].site_id" value="${mov[${count}].@Number}" /> </loop>[/INDENT] This code doesn't actually give an error, it just provides null values into the title, alt_title & collections fields. Is this code even possible? I've attached the various docs in case it helps. Cheers, Dwight [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Popular Plugins
Moving Pictures
Import from MyFilms?
Contact us
RSS
Top
Bottom