44'********************************************************************
55
66'*******************************************************************
7- ' Return a roArray of roAssociativeArrays for the selected category
7+ ' Return a roArray of ContentNodes for the selected category
8+ ' The list is sorted by title, and the ContentNode has the fields
9+ ' setup for direct use with the VideoNode
10+ '
11+ ' Pass the server url and the category (the subdirectory) to get the
12+ ' metadata from.
813'*******************************************************************
914Function getCategoryMetadata (url As String , category As String ) As Object
1015 cat_url = url + "/" + category + "/"
@@ -39,9 +44,14 @@ Function getCategoryMetadata(url As String, category As String) As Object
3944 return list
4045End Function
4146
42- '**********************************
43- '** Return the type of the directory
44- '**********************************
47+ '*********************************
48+ ' Return the type of the directory
49+ '
50+ ' 1 = photos
51+ ' 2 = songs
52+ ' 3 = episodes
53+ ' 4 = movies
54+ '*********************************
4555Function directoryType (listing_hash As Object ) As Integer
4656 if listing_hash .DoesExist ("photos" ) then
4757 return 1
@@ -55,8 +65,18 @@ Function directoryType(listing_hash As Object) As Integer
5565 return 0
5666End Function
5767
68+ '**************************************************************
5869' Get the poster name for the content type
59- ' First look for a specific .png or .jpg matching the file, then try 'default'
70+ '
71+ ' First look for a specific .png or .jpg matching the basename,
72+ ' then try 'default'
73+ '
74+ ' Pass the full listing hash, the server url, basename of the
75+ ' video, and content type. eg. SD, HD, FHD
76+ '
77+ ' It returns the full url to the poster to use or "" if none
78+ ' are found in the listing.
79+ '**************************************************************
6080Function GetPosterURL (listing_hash as Object , url as String , basename as String , content as String ) as String
6181 if listing_hash .DoesExist (basename + "-" + content + ".png" ) then
6282 return url + basename + "-" + content + ".png"
@@ -71,7 +91,15 @@ Function GetPosterURL(listing_hash as Object, url as String, basename as String,
7191 return ""
7292End Function
7393
94+ '************************************************************
7495' Get the bif file url for the content type
96+ '
97+ ' Pass the full listing hash, the server url, basename of the
98+ ' video, and content type. eg. SD, HD, FHD
99+ '
100+ ' It returns the full url to the bif file or "" if none are
101+ ' found in the listing.
102+ '************************************************************
75103Function GetBifURL (listing_hash as Object , url as String , basename as String , content as String ) as String
76104 if listing_hash .DoesExist (basename + "-" + content + ".bif" ) then
77105 return url + basename + "-" + content + ".bif"
@@ -80,9 +108,14 @@ Function GetBifURL(listing_hash as Object, url as String, basename as String, co
80108 return ""
81109End Function
82110
83- '******************************************
84- '** Create an object with the movie metadata
85- '******************************************
111+ '*****************************************************
112+ ' Create an object with the movie metadata
113+ '
114+ ' Return a ContentNode with all the fields
115+ ' needed for use with the VideoNode setup.
116+ '
117+ ' Pass the filename, server url, and full listing_hash
118+ '*****************************************************
86119Function MovieObject (file As Object , url As String , listing_hash as Object ) As Object
87120 o = CreateObject ("roSGNode " , "ContentNode" )
88121 o .ContentType = "movie"
0 commit comments