Page 4 of 4

Re: UPNP client script 0.5 [MM3]

Posted: Fri Jul 16, 2010 8:13 am
by cholv
I would add to function 'UPNP_FillNode' in version 0.5

1. Visible not all nodes
2. Icons correspond to the name and type
3. Localize
4. Show Art Album if Album is present in library

'**********************************
'Define AFTER 'Dim NewSong'
'**********************************

Code: Select all

Dim NodeAllow            'Node Present (Video, for example, not visible)
Dim NodeIcon             'Icon for Node
Dim NodeClass            'NodeClass for Icon
'**********************************
'Null NodeClass AFTER 'title = ""'
'**********************************

Code: Select all

NodeClass = ""
'**********************************
'Define NodeClass AFTER 'title = y.childNodes(0).NodeValue'
'**********************************

Code: Select all

case "upnp:class"
	NodeClass = y.childNodes(0).NodeValue
'**********************************
'Define NodeAllow and NodeClass AFTER 'next'
'**********************************

Code: Select all

NodeAllow = true                'Default is present
NodeIcon = Node.IconIndex       'Default icon of parent node
select case title               'Select icon for title
	case "Browse Folders": NodeAllow = false
	case "Pictures": NodeAllow = false
	case "Video": NodeAllow = false
	case "Music": NodeIcon = 40
	case "Album": NodeIcon = 16
	case "All Music": NodeIcon = 48
	case "Artist": NodeIcon = 0
	case "Folders": NodeIcon = 20
	case "Genre": NodeIcon = 7
	case "Playlists": NodeAllow = false
End select
select case NodeClass	'Select Icon for Class
	case "object.container.person.musicArtist": NodeIcon = 0
	case "object.container.album.musicAlbum": NodeIcon = 16
End select
'**********************************
'Localize HERE
'**********************************

Code: Select all

title=SDB.Localize(title)
'Apply NodeAllow HERE

Code: Select all

If NodeAllow Then
'Apply NodeIcon AFTER 'NewNode.Caption = title'

Code: Select all

NewNode.IconIndex = NodeIcon
'BEFORE 'case "item":'

Code: Select all

End If
'**********************************
'Make 'Artist of Album' AFTER 'case "dc:creator"'
'**********************************

Code: Select all

if .AlbumArtistName=Empty Then .AlbumArtistName=y.childNodes(0).NodeValue
'**********************************
'Show Art Album if Album is present in library AFTER 'Trcks.AddTrack NewSong'
'**********************************

Code: Select all

NewSong.UpdateAlbum
'**********************************
'Show tree after once press on Node AFTER 'Trcks.FinishAdding'
'**********************************

Code: Select all

Node.Expanded = True

Re: UPNP client script 0.5 [MM3]

Posted: Mon Jul 19, 2010 2:25 pm
by cccccc
I can't download it from the website, get error message ? ;(

Re: UPNP client script 0.5 [MM3]

Posted: Sun Jul 25, 2010 7:52 am
by botijo
cccccc wrote:I can't download it from the website, get error message ? ;(
Works fine by me...

Re: UPNP client script 0.5 [MM3]

Posted: Fri Oct 01, 2010 7:47 pm
by jimstolz76
Nice script!

I just installed it and am streaming UPNP from a FreeNAS server I just set up. It plays perfectly in MM, but I'm confused about browsing music from the UPNP share.

My music is under FreeNAS\iTunes Music\artist folder\album folder. I have to click all the way through to the album folder to get any songs to populate in the main browser window. Admittedly I don't have much experience with MM, but do I have something wrong with my setup? How can I get the entire "iTunes Music" folder to populate the browser so you can search through it all?

THX!