pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pyTivo Video Templates
Goto page Previous  1, 2, 3, 4  Next
 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Hacks
 View previous topic :: View next topic  
Author Message
rdian06



Joined: 12 Apr 2008
Posts: 1420

PostPosted: Sat Feb 06, 2010 9:29 pm    Post subject: Re: Hacked Template Replacement Calrification Reply with quote

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
View user's profile Send private message
rdian06



Joined: 12 Apr 2008
Posts: 1420

PostPosted: Sun Feb 14, 2010 6:56 am    Post subject: Reply with quote

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
View user's profile Send private message
DavenLC



Joined: 31 May 2010
Posts: 4
Location: LC, TX

PostPosted: Mon May 31, 2010 4:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
wmcbrine



Joined: 04 Jan 2008
Posts: 2009
Location: Maryland

PostPosted: Tue Jun 01, 2010 12:06 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DavenLC



Joined: 31 May 2010
Posts: 4
Location: LC, TX

PostPosted: Tue Jun 01, 2010 1:12 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
rdian06



Joined: 12 Apr 2008
Posts: 1420

PostPosted: Tue Jun 01, 2010 6:34 pm    Post subject: Reply with quote

DavenLC wrote:
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.


Did you update to the latest wmcbrine git version? See:

http://pytivo.sourceforge.net/forum/updated-windows-installer-2009-03-21-t512-30.html#7536
Back to top
View user's profile Send private message
DavenLC



Joined: 31 May 2010
Posts: 4
Location: LC, TX

PostPosted: Tue Jun 01, 2010 10:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
DavenLC



Joined: 31 May 2010
Posts: 4
Location: LC, TX

PostPosted: Wed Jun 02, 2010 10:46 pm    Post subject: Reply with quote

Are there any Graphical Templates for PyTivo?
Back to top
View user's profile Send private message Visit poster's website
pjschaffer



Joined: 07 May 2008
Posts: 12

PostPosted: Fri Jun 04, 2010 1:24 am    Post subject: Reply with quote

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
View user's profile Send private message
txporter



Joined: 11 Dec 2008
Posts: 263
Location: Austin, TX

PostPosted: Fri Jun 04, 2010 2:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
REKnight



Joined: 27 Dec 2009
Posts: 10

PostPosted: Tue Aug 31, 2010 1:11 am    Post subject: Reply with quote

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
View user's profile Send private message
choekstr



Joined: 06 Dec 2008
Posts: 152

PostPosted: Wed Sep 01, 2010 1:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
REKnight



Joined: 27 Dec 2009
Posts: 10

PostPosted: Wed Sep 01, 2010 5:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
rdian06



Joined: 12 Apr 2008
Posts: 1420

PostPosted: Wed Sep 01, 2010 5:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
REKnight



Joined: 27 Dec 2009
Posts: 10

PostPosted: Wed Sep 01, 2010 7:05 pm    Post subject: Reply with quote

rdian06 wrote:
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.


You are correct, I did miss that, thanks for the clarification. Funny since I was JUST updating the metadata for my library of shows... Embarassed

Also may explain why your most recent template (I only saw the one on 2/13/10, were there others?) worked until I mucked up the metadata format.

Sadly I just don't have the XML knowledge to change a template to do what I need. I'm actually running 2 media servers with pyTivo, so if someone felt like building a template like "SeriesTitle-EpNum-EpTitle-and-EpNumber-preceeds-EpTitle-PadEpNumber" but with EpNum in SxxExx format, I'd be happy to test it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Hacks All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.2110s ][ Queries: 13 (0.0138s) ][ GZIP on - Debug on ]