Remove unused functions
This commit is contained in:
parent
3741cbc912
commit
78fed744fd
|
@ -35,23 +35,6 @@ function ItemGetSession(id as string, StartTimeTicks = 0 as longinteger)
|
|||
return data.PlaySessionId
|
||||
end function
|
||||
|
||||
' List of available libraries
|
||||
function LibraryList()
|
||||
url = Substitute("Users/{0}/Views/", get_setting("active_user"))
|
||||
resp = APIRequest(url)
|
||||
data = getJson(resp)
|
||||
results = []
|
||||
for each item in data.Items
|
||||
tmp = CreateObject("roSGNode", "HomeData")
|
||||
tmp.json = item
|
||||
params = { "Tag" : tmp.json.ImageTags.Primary, "maxHeight" : 261, "maxWidth" : 464 }
|
||||
tmp.imageURL = ImageURL(tmp.json.id, "Primary", params)
|
||||
results.push(tmp)
|
||||
end for
|
||||
data.Items = results
|
||||
return data
|
||||
end function
|
||||
|
||||
' Search across all libraries
|
||||
function SearchMedia(query as string)
|
||||
' This appears to be done differently on the web now
|
||||
|
@ -140,64 +123,6 @@ function ItemList(library_id = invalid as string, params = {})
|
|||
return data
|
||||
end function
|
||||
|
||||
' Return items for use on home screen (HomeRows)
|
||||
function HomeItemList(row = "" as string, params = {})
|
||||
if params["limit"] = invalid
|
||||
params["limit"] = 20
|
||||
end if
|
||||
if row = "continue" then
|
||||
params["recursive"] = true
|
||||
params["SortBy"] = "DatePlayed"
|
||||
params["SortOrder"] = "Descending"
|
||||
params["Filters"] = "IsResumable"
|
||||
end if
|
||||
|
||||
url = Substitute("Users/{0}/Items/", get_setting("active_user"))
|
||||
resp = APIRequest(url, params)
|
||||
data = getJson(resp)
|
||||
results = []
|
||||
for each item in data.Items
|
||||
tmp = CreateObject("roSGNode", "HomeData")
|
||||
imgParams = {}
|
||||
|
||||
param = { "AddPlayedIndicator": item.UserData.Played }
|
||||
imgParams.Append(param)
|
||||
|
||||
if item.UserData.PlayedPercentage <> invalid then
|
||||
param = { "PercentPlayed": item.UserData.PlayedPercentage }
|
||||
imgParams.Append(param)
|
||||
end if
|
||||
|
||||
param = { "maxHeight": 261 }
|
||||
imgParams.Append(param)
|
||||
param = { "maxWidth": 464 }
|
||||
imgParams.Append(param)
|
||||
|
||||
if item.type = "Movie"
|
||||
if item.ImageTags.Thumb <> invalid then
|
||||
param = { "Tag" : item.ImageTags.Thumb }
|
||||
imgParams.Append(param)
|
||||
tmp.imageURL = ImageURL(item.id, "Thumb", imgParams)
|
||||
else
|
||||
param = { "Tag" : item.ImageTags.Primary }
|
||||
imgParams.Append(param)
|
||||
tmp.imageURL = ImageURL(item.id, "Primary", imgParams)
|
||||
end if
|
||||
else if item.type = "Episode"
|
||||
if item.ImageTags.Primary <> invalid then
|
||||
param = { "Tag" : item.ImageTags.Primary }
|
||||
imgParams.Append(param)
|
||||
end if
|
||||
tmp.imageURL = ImageURL(item.id, "Primary", imgParams)
|
||||
end if
|
||||
|
||||
tmp.json = item
|
||||
results.push(tmp)
|
||||
end for
|
||||
data.items = results
|
||||
return data
|
||||
end function
|
||||
|
||||
' MetaData about an item
|
||||
function ItemMetaData(id as string)
|
||||
url = Substitute("Users/{0}/Items/{1}", get_setting("active_user"), id)
|
||||
|
|
Loading…
Reference in New Issue
Block a user