filter by file type

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
ringostarr
Posts:4
Joined:Mon Mar 14, 2011 11:56 pm
AV Hardware:Terratec Noxon iRadio for iPod
filter by file type

Post by ringostarr » Tue Mar 15, 2011 12:01 am

Is it possible to filter the database by media format e.g. only mp3 or ogg-files?

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

Re: filter by file type

Post by phibertron » Tue Mar 15, 2011 12:31 am

You can with the following

buildon='pv:extension'
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

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

Re: filter by file type

Post by phibertron » Tue Mar 15, 2011 12:54 am

Here are a couple of examples of how one could use it

<container name='By Type' groupid='music/ext' createClass='object.item.audioItem.musicTrack' class='object.container' >
<container buildon='pv:extension' createClass='object.item.audioItem.musicTrack' class='object.container' />
</container>

<container name='By Type' groupid='picture/ext' createClass='object.item.imageItem.photo' class='object.container' >
<container buildon='pv:extension' createClass='object.item.imageItem.photo' class='object.container.album.photoAlbum' />
</container>

<container name='By Type' groupid='video/ext' createClass='object.item.videoItem.movie' class='object.container'>
<container buildon='pv:extension' createClass='object.item.videoItem.movie' class='object.container' />
</container>
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

ringostarr
Posts:4
Joined:Mon Mar 14, 2011 11:56 pm
AV Hardware:Terratec Noxon iRadio for iPod

Re: filter by file type

Post by ringostarr » Tue Mar 15, 2011 9:41 pm

thanks for the fast answer, but in which file must i add or change it?

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

Re: filter by file type

Post by phibertron » Tue Mar 15, 2011 10:01 pm

If you are using the advanced.view.xml as your view

Add the ones you want to the appropriate sections

For ex:

Code: Select all

<view name='byfolder' path='folder.view'>
	<navtree>

		<container id='music'>
			...
			<link groupid='music/ext' />
		</container>

		<container id='picture' >
			...
			<link groupid='picture/ext' />
		</container>

		<container id='video' >
			...
			<link groupid='video/ext' />
		</container>

	</navtree>
</view>
And in the view-definitions.xml

Code: Select all


<container name='music' id='music'...
	...
	<container name='By Type' groupid='music/ext' createClass='object.item.audioItem.musicTrack' class='object.container' >
		<container buildon='pv:extension' createClass='object.item.audioItem.musicTrack' class='object.container' />
	</container>
</container>

<container name='pictures' id='picture'...
	...
	<container name='By Type' groupid='picture/ext' createClass='object.item.imageItem.photo' class='object.container' >
		<container buildon='pv:extension' createClass='object.item.imageItem.photo' class='object.container.album.photoAlbum' />
	</container>
</container>

<container name='videos' id='video'...
	...
	<container name='By Type' groupid='video/ext' createClass='object.item.videoItem.movie' class='object.container'>
		<container buildon='pv:extension' createClass='object.item.videoItem.movie' class='object.container' />
	</container>
</container>
The above is just where to put them in addtiion to what is already there
dont add the "..." those are just to mean there is existing stuff there =)
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

ringostarr
Posts:4
Joined:Mon Mar 14, 2011 11:56 pm
AV Hardware:Terratec Noxon iRadio for iPod

Re: filter by file type

Post by ringostarr » Wed Mar 16, 2011 12:18 am

Alright, I have understood the syntax... It runs and I can now choose the folders by extension like "artist/album/mp3" and "artist/album/ogg".

Is there a way to prefilter the media extension, so that you don't have to select the "mp3" or "ogg" folder...
maybe something like the sortcriteria-attribute or so
e.g.
...
<container buildon='upnp:album' albumart='1' sortcriteria='+pv:numberOfThisDisc,+upnp:originalTrackNumber' filtercriteria='ext:mp3' createClass='object.item.audioItem.musicTrack' class='object.container.album.musicAlbum'/>
...

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

Re: filter by file type

Post by phibertron » Wed Mar 16, 2011 12:40 am

Sadly no
its not possible to use values in any way with any of the buildon or filteron commands
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

ringostarr
Posts:4
Joined:Mon Mar 14, 2011 11:56 pm
AV Hardware:Terratec Noxon iRadio for iPod

Re: filter by file type

Post by ringostarr » Wed Mar 16, 2011 1:17 am

ok, thanks for the answer.

It could be a good option, but it's better than nothing.

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

Re: filter by file type

Post by phibertron » Wed Mar 16, 2011 1:26 am

no worries

It would be a great option, one I hope the soon/someday/hopefully they impliment

True, at least we have some options, which is better than no options
Of the media servers out there, only a few allow for full tree customization
and only one makes it wicked easy
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

Locked