My Custom View for Video

General discussion about the media server. Feature requests. Hints, tips and tricks.
Post Reply
User avatar
phibertron
Posts: 1566
Joined: Sun Jan 30, 2011 5:52 pm
AV Hardware: Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

My Custom View for Video

Post by phibertron » Sat Feb 12, 2011 1:05 am

I have spent a little time in getting things tweaked with the Twonkly Video Tree
There is much more I'd like to do with it, it is what it is, and hopefully it keeps on getting better
(currently using 6.0.30)

I have made the following changes to the advanced.view.xml
Note:
The order in which you list the links
will NOT make them display in that order,
I'll get to how to do that in the view-definitions.xml

Code: Select all


advanced.view.xml

<container id='video' >
	<link id='video/folders' />
	<link id='video/genre' />
	<link id='video/year' />
	<link id='video/titleindex' />
	<link id='video/playlists' />
</container>
I have made the following changes to the view-definitions.xml
As I have noted above, to get the link order to be displayed in the order you want
You will have to add something to sort on, Okay then, Monkey see Monkey do

You will notice in the view-definitions.xml that each major section, music, picture, and video all have a track number assigned
<container name='music' id='music' upnp:originalTrackNumber='1'
<container name='pictures' id='picture' upnp:originalTrackNumber='2'
<container name='videos' id='video' upnp:originalTrackNumber='3'
Youll also see this numbered order in the playlist container

This numbered oder can be used by us to make our link sections be displayed in the order in which they are numbered
They do this on the navtree
<navtree sortcriteria='+upnp:originalTrackNumber'>

So thats what we'll do on the video container
<container name='videos' id='video' upnp:originalTrackNumber='3' sortcriteria='+upnp:originalTrackNumber'

Now all thats left is to add a track number to each of of our root containers
<container name='allvideos' id='video/all' upnp:originalTrackNumber='1'
<container name='By Genre' id='video/genre' upnp:originalTrackNumber='2'
<container name='By Folder' id='video/folders' upnp:originalTrackNumber='3'
<container name='By Title' id='video/titleindex' upnp:originalTrackNumber='4'
<container name='By Year' id='video/year' upnp:originalTrackNumber='5'
<container name='By Date' id='video/date' upnp:originalTrackNumber='6'
<container name='By Album' id='video/albums' upnp:originalTrackNumber='7'
<container name='By Rating' id='video/rating' upnp:originalTrackNumber='8'
<container name='playlists' id='video/playlists' upnp:originalTrackNumber='9'
<container name='classifiedvideos' id='video/classified' upnp:originalTrackNumber='10'
<container buildon='pv:onlineServiceName' groupid='video/onlineservices' upnp:originalTrackNumber='11'

Note:
The odrder in which these containers will now be displayed, will be based on there track number
So to change up the order, just renumber them to the order in which you want them to be displayed in
If you dont add the tracknumber to all of the root tracks then all bets are off

I have also made some other changes to the view-definitions.xml
in regards to the folder,title, and genre containers

I removed one of the sub containers for the folder container, as I didnt like the double layer it added
Im pretty sure it was originally done to deal with album art, but no longer see a need for it

I modified the title container so that it was single letter instead of the default 3
buildon='dc:title[1]'

I added the genre container, as it didnt exist for what ever reason
<container name='By Genre' id='video/genre' upnp:originalTrackNumber='2' createClass='object.item.videoItem.movie' class='object.container' >
<container buildon='upnp:genre' createClass='object.item.videoItem.movie' class='object.container' />
</container>


Code: Select all


view-definitions.xml

<container name='videos' id='video' upnp:originalTrackNumber='3' sortcriteria='+upnp:originalTrackNumber' createClass='object.item.videoItem.movie,object.item.videoItem.classified.movie,object.item.videoItem.online.movie' class='object.container'>

	<container name='allvideos' id='video/all' upnp:originalTrackNumber='1' createClass='object.item.videoItem.movie' class='object.container'/>

	<container name='By Genre' id='video/genre' upnp:originalTrackNumber='2' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='upnp:genre' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='By Folder' id='video/folders' upnp:originalTrackNumber='3' class='object.container.storageFolder' restricted='0' createClass='object.item.videoItem.movie'>
		<container buildon='res' createClass='object.item.videoItem.movie' class='object.container.storageFolder'/>
	</container>

	<container name='By Title' id='video/titleindex' upnp:originalTrackNumber='4' class='object.container' createClass='object.item.videoItem.movie'>
		<container buildon='dc:title[1]' class='object.container' createClass='object.item.videoItem.movie' />
	</container>

	<container name='By Year' id='video/year' upnp:originalTrackNumber='5' createClass='object.item.videoItem.movie' class='object.container'>
		<container buildon='pv:year' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='By Date' id='video/date' upnp:originalTrackNumber='6' createClass='object.item.videoItem.movie' class='object.container'>
		<container buildon='pv:year' createClass='object.item.videoItem.movie' class='object.container'>
			<container buildon='pv:month' createClass='object.item.videoItem.movie' class='object.container'/>
		</container>
	</container>

	<container name='By Album' id='video/albums' upnp:originalTrackNumber='7' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='upnp:album' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='By Rating' id='video/rating' upnp:originalTrackNumber='8' createClass='object.item.videoItem.movie' class='object.container' >
		<container buildon='pv:rating' createClass='object.item.videoItem.movie' class='object.container' />
	</container>

	<container name='playlists' id='video/playlists' upnp:originalTrackNumber='9' class='object.container' createClass='object.item.videoItem.movie,object.item.videoItem.online.movie' sortcriteria='+upnp:originalTrackNumber,+dc:title' restricted='0' flags='pv:playlistRoot=Video' >
		<container name='playlistrecentlyadded' filteron='pv:addedLast60' sortcriteria='-pv:addedTime' createClass='object.item.videoItem.movie' maxitems='500' upnp:originalTrackNumber='3' restricted='1' class='object.container.playlistContainer' flags='pv:smartplaylist=1' />
		<container name='playlistmostviewed' filteron='pv:playcount' sortcriteria='-pv:playcount' createClass='object.item.videoItem.movie' maxitems='500' upnp:originalTrackNumber='1' restricted='1' class='object.container.playlistContainer' flags='pv:smartplaylist=1'  />
		<container name='playlistlastviewed' filteron='pv:lastPlayedTime' sortcriteria='-pv:lastPlayedTime' createClass='object.item.videoItem.movie' maxitems='500' upnp:originalTrackNumber='2' restricted='1' class='object.container.playlistContainer' flags='pv:smartplaylist=1' />
		<container name='playlisthighlyrated' filteron='pv:highrated' sortcriteria='-pv:rating' createClass='object.item.videoItem.movie' maxitems='500' upnp:originalTrackNumber='4' restricted='1' class='object.container.playlistContainer' flags='pv:smartplaylist=1' />
		<container buildon='upnp:playlist' sortcriteria='+upnp:originalTrackNumber' createClass='object.item.videoItem.movie,object.item.videoItem.online.movie' upnp:originalTrackNumber='5' class='object.container.playlistContainer'  />
	</container>

	<container name='classifiedvideos' id='video/classified' upnp:originalTrackNumber='10' class='object.container'  createClass='object.item.videoItem.classified.movie'/>      

	<container buildon='pv:onlineServiceName' groupid='video/onlineservices' upnp:originalTrackNumber='11' createClass='object.item.videoItem.online.movie' class='object.container'>
		<container buildon='pv:onlineServiceTitle' createClass='object.item.videoItem.online.movie' class='object.container'/>
	</container>

</container>
So what did all of the modifcation give me
My video folder now looks like this

Code: Select all

By Genre
By Folder
By Title
By Year
Playlists
I actually have all my videos in root folders for their respective genre
So when I browse By Folder, it makes it a lot easier when finding things from a file share off of the server
as opposed to on big flat folder or other bucket scheme

Code: Select all

By Folder

Action
Animation
Comedy
Documentary
Drama
Family
Fantasy
Holiday
Horror
Military
Music
Musical
Romance
SciFi
Sports
Television
Thriller
Western
I also have all my videos tagged with year, and multple genre's,
There is some overlap in the folder structure and genre
but i did that on purpose, which like i said, is if one looks a the server from a file share
its easier to find things
But from a twonky perspective, I just leave the By Folder out of principal
I could get away without it, but any video not tagged would be in the unknown genre

Code: Select all

By Genre

007
Action
Animation
AniMusic
Baa Baa Black Sheep
Band of Brothers
Battlestar Galactica
Boston Celtics
Boston Red Sox
Caprica
Comedy
Documentary
Drama
Family
Fantasy
Full House
Hannah Montana
Harry Potter
Hogan's Heroes
Holiday
Horror
James Bond
John Adams
Lost
McHale's Navy
Metallica
Military
Music
Musical
New England Patriots
Romance
Rome
Rush
SciFi
Seinfeld
Soap
Space (Above and Beyond)
Spartacus
Sports
Star Trek
Star Wars
Stargate Atlantis
Stargate SG1
Stargate Universe
Takers
The Odd Couple
The Pacific
The Pillars of the Earth
The Sopranos
The X-Files
Thriller
USC Trojans
Western
I like the by title as a single letter
its worth noting, that anything thats starts with a digit, will be under the letter A

Code: Select all

By Title

A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
Y
Z
One of the things I would like to tweak would be By Year
is to be able to go in reverse order, which at present is not possible
20xx-19xx instead of 19xx-20xx

Code: Select all

By Year

1937
1939
1940
1942
1946
1949
1951
1953
1955
1959
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
One interesting thing about all of this ordering
Is that under playlists any playlists are added to the bottom of the list
as by default the playlists sub container is number 5

Note:
I use a playlist called New Arrivals, in which I hand code video addtions
I run twonky on a windows home server, and it frequently moves files around
each time this happens twonky adds it to the recently added list which = not funny
So I created my own hard list of video addtions in a wpl file, yup it not funny either

Code: Select all

Playlists

Most Viewed
Last Viewed
Recently Added
New Arrivals

There are many things I wish we could get twonky to do
But in the short term, I would really love to get the artist tag working
So that I could create a container By Artist or By Actor using the artist tag
This does not currently work but say for Example:

Code: Select all

<container name='By Artist' groupid='video/artist' class='object.container' createClass='object.item.videoItem.movie'>
   <container buildon='upnp:artist' class='object.container' createClass='object.item.videoItem.movie' />
</container>
I hope the above information helps all of you out with tweaking twonky to serve you the way it should
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

Post Reply