Help please - HTML for TV Show list

Sep 22, 2015 at 5:28 AM
This is what I have but cannot get it to list the media_items. Any ideas?

<title>Basic TV List 2</title>

<<MC TV HTML Page>>

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Basic TV List - <<show_count>> Shows</title>

<h1 align="center"><font size="6"><b>XBMC Media Companion</b></font></h1> <h2 align="center"><font size="5"><b>HTML Output</b></font></h2> <table align="center" border="1" width="800" bgcolor="#ffffff" cellspacing="0" cellpadding="0"> <tr> <th>Genre</th> <th>Show</th> <th>Plot</th> </tr> <<media_item>> <tr> <td><font size="3"><<show_genre>></font></td> <td><font size="4"><<show_title>></td> <td><font size="2"><<show_nfo:plot:200>></font></td> </tr> <</media_item>> </table> <</body>>


<</MC TV HTML Page>>
Sep 22, 2015 at 9:34 AM
Sorry, Can't help with export stuff. I know nothing about html code.

I'll see if HueyHQ is able to assist...
Sep 23, 2015 at 3:04 AM
Edited Sep 24, 2015 at 1:35 AM
Hi Jock, I'll have a look at this tonight for you. HueyHQ

[Edit: sorry, didn't get a chance, but holed up in hotel tonight so will look then!]
Sep 24, 2015 at 8:53 AM
I'm sorry, I'm a bit behind in the codebase and development, and a dodgy, unsecure connection in the hotel, so I can't actually run any debug.

But I have found that you are missing a closing </font> tag immediately after <<show_title>>.

I don't know if this is causing the problem, but it should be the first thing you try.
Sep 26, 2015 at 5:29 AM
So, I've found a deficiency where the media export function is looking for seasons and episodes, and not just the show itself. I wrote it like this so that you can specify whether you want to include the seasons and episodes you have, just the missing seasons and episodes, or all of them. This method isn't particularly intuitive, so I may have to address this at some point.

As a workaround, just include the following line somewhere in between the <<media_item>> tags:

You may wish to include :all to the seasons and episodes tags to catch everything, in case your shows aren't populated with media files.
Sep 26, 2015 at 8:34 AM
That's closer to a solution but <td> is not being populated.

I tried <<season:all>><<episode:all>> and now get the table rows but no data.
I tried <<season:missing>><<episode:missing>> and now get the table rows, less rows, but still no data.

I had to change table parameters a little to see the rows.

This what I have now :
<table align="center" border="2" width="800" bgcolor="#ffffff" cellspacing="1" cellpadding="1"> <tr> <th>Genre</th> <th>Show</th> <th>Plot</th> </tr> <<media_item>> <<season:missing>> <<episode:missing>> <tr> <td><<show_genre>></td> <td><<show_title>></td> <td><<show_nfo:plot:200>></td> </tr> <</episode>> <</season>> <</media_item>> </table>
Sep 26, 2015 at 10:53 PM
Edited Sep 26, 2015 at 11:25 PM
What I meant was add <<season>><<episode>><</episode>><</season>> as a line by itself; between those tags it is looking for season tokens between the season tags, and episode tokens between the episode tags, not the show tokens.

Your code should look something like:
        <td><font size="3"><<show_genre>></font></td>
        <td><font size="4"><<show_title>></font></td>
        <td><font size="2"><<show_nfo:plot:200>></font></td>
As you've pointed out, this function isn't particularly intuitive, so I'll want to work on it some more when I get the chance. I'm pleased someone beside me uses it tho'!

Sep 27, 2015 at 2:14 AM
I know a few people who use the export functionality for movies and TV. It's a work or art in coding, that for sure.
Sep 28, 2015 at 2:22 AM
Hi Huey,

Guess I was being too clever. That format is working now except that
  1. I only get the genre for the first TV-Show in the list when using :all
  2. I get the first 4 genre in the list with no parameter.
  3. I added show_counter as the first field but still only get the first four genre. Also, show_counter starting at zero.
  4. Switch the order of Genre/Show to Show/Genre. Still only get first four shows genre.
  5. Rescraped Genre. I get more fields populated but not all. I can't find a common link to those missing Genre.
Added the field <td><<show_nfo:mpaa>></td>, I get "Error in token"

What I really wanted (for Christmas!) was a CSV output similar to movies. I tried to edit the movie template but no success.

Whenever you get around to looking into it. I have enough output for now.

Sep 28, 2015 at 8:55 AM
Can you please provide me a list of the first five or six shows that you have in your collection? In my collection, I didn't get anything listed for 'genre' at all! So there is a bug to look at right there for a start!

I'll look at the show counter starting at zero too.

The 'Error in token' error you are seeing is because of a function I used that has been deprecated in later versions of .NET, which i then went and hard-coded for movies, but never got around to fixing for TV.

Seems I gotta bit of work to do on TV then, eh!

So do you actually want a CSV file? Just using those three fields, or others as well? I'll come up with a working template if you'd like me to, unless you're keen to do it yourself?
Sep 28, 2015 at 11:22 AM
A CSV file similar to the Movies CSV wit ALL fields would be great as I can then manipulate and sort the data as required. If you can make a basic template, I can try add to that.

I guess there's no way to upload a file here?

Here is some output :

Count:<> Show Genre Cert Plot
0/81 A Touch of Frost Crime / Drama Error in token Detective
1/81 Absolutely Fabulous Comedy Error in token In this satirical
2/81 'Allo 'Allo! Comedy Error in token In this spoof of World War
3/81 An Idiot Abroad Comedy / Documentary / Travel Error in token
4/81 Band of Brothers Action / Adventure / Drama / Mini-Series Error
5/81 Banshee Error in token An unnamed ex-convict assumes the
6/81 Battlestar Galactica Error in token When the 12 Colonies of Man
7/81 Better Call Saul Comedy / Crime / Drama Error in token We meet
8/81 Black Lagoon Error in token Okajima Rokuro - now known almost
9/81 Blackadder Comedy Error in token Through four series and a few

My current template :

Note: <th>Count:<<show_count>></th> does not output count in this line.

<title>Basic TV List 3</title>

<<MC TV HTML Page>>

<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Basic TV List - <<show_count>> Shows</title>

<h1 align="center"><font size="6"><b>XBMC Media Companion</b></font></h1> <h2 align="center"><font size="5"><b>TV-Shows Listing</b></font></h2> <table align="center" border="2" width="800" bgcolor="#ffffff" cellspacing="1" cellpadding="1"> <tr> <th>Count:<<show_count>></th> <th>Show</th> <th>Genre</th> <th>Cert</th> <th>Plot</th> </tr> <<media_item>> <tr> <td><<show_counter>>/<<show_count>></td> <td><<show_title>></td> <td><<show_genre>></td> <td><<show_nfo:mpaa>></td> <td><<show_nfo:plot>></td> </tr> <<season>><<episode>><</episode>><</season>> <</media_item>> </table> <</body>>


<</MC TV HTML Page>>
Sep 28, 2015 at 8:15 PM
Cool, thanks - gives me something to go on with!

Dec 13, 2015 at 12:23 AM
Edited Dec 13, 2015 at 12:27 AM
Hi Jock,

I've had a tinker with the code, and have addressed some of your issues. I think the only one I haven't done yet is the need to add <<season>><<episode>><</episode>><</season>> for TV, which is a minefield and would take a lot of reworking.

I found that using <<show_nfo:genre>> works better than <<show_genre>> as it uses a different source structure.

I've got this template for you, but you'll have to wait until the next release for the fixes to be included.

<title>TV CSV Output</title>
<<MC TV HTML Page>>
<</MC TV HTML Page>>
Dec 19, 2015 at 2:26 AM
Thank you for this. I've not had time to get to it. I will let you know how I get on.
Dec 19, 2015 at 4:51 AM
Is it built into V3.6.3.9b?
Dec 19, 2015 at 5:59 AM
HueyHQ's changes were available from MC 3.638b, so are available in 3.639b also.
Dec 19, 2015 at 7:13 AM
I've copied his template from above. However, if I remove the fields I don't want and reformat the text file, it only lists the first show.
Guess some more work to be done.

I got a workaround by modifying a html template and then importing that to Open Office Calc.

Having a TV-Show csv template with Shoes, Seasons, and Episodes would be great.

I'll play with it some more.
Dec 19, 2015 at 10:02 PM
Hey Jock,

If you give me an example of what output you want, I'll create the template.
Dec 31, 2015 at 1:28 AM
Hi HueyHQ, sorry for delay, too much partying! I'll get this to you 'next year'.
Jan 2, 2016 at 8:30 AM
Hi HueyHQ,

Looking for a template to give csv output with the following fields,

show_stars (same as movie stars perhaps)

Would be good if you could include all episodes and flag those missing within same report.


Happy New Year.