|
| Author |
Message |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Sat Feb 06, 2010 9:29 pm Post subject: Re: Hacked Template Replacement Calrification |
|
|
| tbrowne wrote: | Could someone please clarify how to replace the current video templates (C:\Program Files\pyTivo\plugins\video\templates)?
It is easy enough to just replace the standard files with Radion06's replacements (which replaced my container.tmpl and TvBus.tmpl files, but did not replace my container.xsl file in this folder), as instructed above, but then what are the next steps to see if the replacement files take (mine do not seem to have). Do we create a new meta file (with metagenerator) which from our share we can pull to the NPL and expect to see the new and highly desired format??? Or is there another (missing, in my case) step?
What I did
1. replaced template (in C:\Program Files\pyTivo\plugins\video\templates)
2. soft reset of pytivo
3. created new meta file using metagenerator
4. saved new meta file with show in share folder (meta in .meta subfolder)
5. restart tivo box
6. pulled show to NPL from share using tivo
When done, there was NO change whatsoever in the way Tivo displayed the show in the NPL (sadly not even episodeNumber).
And, thanks to Radion06 for all the work and help... |
Stop pyTivo and restart it completely. A soft reset likely does not reload the templates. Just like a soft reset doesn't clear cached ffmpeg info.
And you don't have to create new metadata files. As soon as the new templates are loaded, all metadata will be displayed with the new formatting. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Sun Feb 14, 2010 6:56 am Post subject: |
|
|
The previous hacked templates broke after some recent pyTivo updates so I took a clean copy and reapplied my customizations along with choekstr's.
I also cleaned up the customizations a little to protect against missing metadata.
I've attached the new hacked templates. |
|
| Back to top |
|
 |
DavenLC
Joined: 31 May 2010 Posts: 4 Location: LC, TX
|
Posted: Mon May 31, 2010 4:52 pm Post subject: |
|
|
I like the Template. but now I get this error from these files templates-3.zip:
Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype:http://192.168.2.12:9032/plugins/video/container.xsl |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 2009 Location: Maryland
|
Posted: Tue Jun 01, 2010 12:06 am Post subject: |
|
|
| DavenLC wrote: | Error loading stylesheet: An XSLT stylesheet does not have an XML mimetype |
Curious. Are you sure this is related to your use of the modified templates? What browser version is this? What Python version? _________________ My pyTivo fork . My page |
|
| Back to top |
|
 |
DavenLC
Joined: 31 May 2010 Posts: 4 Location: LC, TX
|
Posted: Tue Jun 01, 2010 1:12 pm Post subject: |
|
|
well, I think so, I just discovered PyTivo over the weekend. (I've been using Videora for years)
Python 2.6.5,
I have Win XP SP3
pyTivo-wmcbrine-2009.03.19-RC1.
Tried FFox and IE8 same result. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
|
| Back to top |
|
 |
DavenLC
Joined: 31 May 2010 Posts: 4 Location: LC, TX
|
Posted: Tue Jun 01, 2010 10:53 pm Post subject: |
|
|
Tried following those directions. Says it started, but I cannot WebAdmin it.
reverted back to what I had originally.
I zipped up the files maybe you can see what I did wrong
[edit]
oops.. didnt move PyTivo.conf -
[edit]
Everything is fine! Works good too! |
|
| Back to top |
|
 |
DavenLC
Joined: 31 May 2010 Posts: 4 Location: LC, TX
|
Posted: Wed Jun 02, 2010 10:46 pm Post subject: |
|
|
| Are there any Graphical Templates for PyTivo? |
|
| Back to top |
|
 |
pjschaffer
Joined: 07 May 2008 Posts: 12
|
Posted: Fri Jun 04, 2010 1:24 am Post subject: |
|
|
| rdian06 wrote: | The previous hacked templates broke after some recent pyTivo updates so I took a clean copy and reapplied my customizations along with choekstr's.
I also cleaned up the customizations a little to protect against missing meta-data.
I've attached the new hacked templates. |
Thanks for the template. I've been using it for the last week or so and it works great.
That said, I have an idea for an enhancement that maybe others could use as well.
Here's the issue - I have to manually edit the meta-data file for each video to make the season number part of the episode number as MetaGenerator only reports the episode number of the season as opposed to the entire series (i.e. for a season 3, episode 12 show, it would report 12 not 312).
Here's the idea - If the episode number in the meta-data is less than 100, could the template then check the filename of the video to attempt to determine the season number. In general, the filename usually contains a string in the format of SxxEyy (or sxxeyy) where XX is the season number and YY is the episode number (i.e. Britain's Got Talent s04e14 .thebox.hannibal.avi).
Alternately (or as well as if the series info isn't in the filename), could the template check a default file in the same directory for the season number (say season.txt).
I would love to be able to attempt this myself, but I just haven't taught myself enough Python to be able to understand how the templates work, let alone modify them. |
|
| Back to top |
|
 |
txporter
Joined: 11 Dec 2008 Posts: 263 Location: Austin, TX
|
Posted: Fri Jun 04, 2010 2:02 pm Post subject: |
|
|
| I think what you are asking for has already been done with the pyTivoMetaThis script. You can looking into the guts of the script and see how they did it. |
|
| Back to top |
|
 |
REKnight
Joined: 27 Dec 2009 Posts: 10
|
Posted: Tue Aug 31, 2010 1:11 am Post subject: |
|
|
| pjschaffer wrote: | Here's the idea - If the episode number in the meta-data is less than 100, could the template then check the filename of the video to attempt to determine the season number. In general, the filename usually contains a string in the format of SxxEyy (or sxxeyy) where XX is the season number and YY is the episode number (i.e. Britain's Got Talent s04e14 .thebox.hannibal.avi). |
| txporter wrote: | I think what you are asking for has already been done with the pyTivoMetaThis script. You can looking into the guts of the script and see how they did it. |
I actually did modify the pyTivoMetaThis script to do this.
Here is the line I modifed: | Code: | text = "S%02dE%02d" % (int(e['SeasonNumber']), int(e['EpisodeNumber'])) |
That said it seems like the rdian06 updated template seems to have a split personality as far as this modification goes.
When I see the entry in the pyTivo share screen it looks good, but then when I enter the entry to start the transfer the entry seems to modify to show SeriesTitle '-' EpisodeTitle.
I don't know Python or XML, so I'm flying a little blind, just a little vb. |
|
| Back to top |
|
 |
choekstr

Joined: 06 Dec 2008 Posts: 152
|
Posted: Wed Sep 01, 2010 1:42 pm Post subject: |
|
|
I would restate that the best way is to modify one of the templates that are close to your liking. The template uses all the metadata that pytivometathis generates and massages per person into the format they like. The general concept of keeping the metadata clean and pristine while using templates to change the look and feel is the best option, IMO.
If you dig in a bit to the template and find where the share display section is and how the SxxEyy is generated and then replicate that in the other area then it should be a fairly easy exercise. The hardest part is to get a handle on the templates and figure out what changes which area.
Just my $0.02,
Chris |
|
| Back to top |
|
 |
REKnight
Joined: 27 Dec 2009 Posts: 10
|
Posted: Wed Sep 01, 2010 5:20 pm Post subject: |
|
|
| choekstr wrote: | I would restate that the best way is to modify one of the templates that are close to your liking. The template uses all the metadata that pytivometathis generates and massages per person into the format they like. The general concept of keeping the metadata clean and pristine while using templates to change the look and feel is the best option, IMO. |
I agree with you on this, but for me I was able to sort out how the py script work easier then I've been able to sort out the templates. I've never had the time to really grasp XML, so really this is a failure on my part more then anything else.
The issue as you've pointed out is that if the py script is updated for additional functionality then I have to go back and modify it again, but it seems that the templates aren't immune from that either since the the templates that wcw posted 1-11-09 don't seem to work with wmcbrine's most recent updates.
rdian06 mentions this in his updated template on 2-13-10, but I haven't been able to grok the differences (funny what a 1 yr old does to your concentration) between his update and the earlier templates.
I ended up falling back to a pre Feb 10 version of wmcbrine's builds and my modification to the script. And since it works for me I wanted to share what I had until someone with more knowledge then me built a template to match what I and pjschaffer are looking for in our implementation.
Hope that makes sense.
And thanks to everyone who is willing to put they're time into making this such a great project. |
|
| Back to top |
|
 |
rdian06
Joined: 12 Apr 2008 Posts: 1420
|
Posted: Wed Sep 01, 2010 5:37 pm Post subject: |
|
|
No, you missed the point.
If you modify the metadata generation tools to produce non-compliant metadata, then official changes to the pyTivo code or the official templates may cause problems when using your existing library of metadata.
The point of doing the customization in the templates is that you never have to go back and fix the individual file metadata. The drawback being if the official templates change, then the hacked templates need to be update as well.
As far as I know, my last round of hacked templates works with the latest code. Though I'm not 100% sure since I haven't updated to wmcbrine's latest recently. I don't recall anyone complaining after my last round of fixes. |
|
| Back to top |
|
 |
REKnight
Joined: 27 Dec 2009 Posts: 10
|
|
| Back to top |
|
 |
|