#set($publishtype = $!searcherManager.getData($catalogid,"publishdestination",$order.publishdestination))
Publishing to $publishtype
#set($filetypes = [])
#if ($publishtype.publishtype == "youtube")
#end
#foreach( $item in $orderitems )
#set( $asset = $mediaarchive.getAssetBySourcePath($item.assetsourcepath))
#set($fileformat = $asset.fileformat) ##need to get an example fileformat for each filetype
#set($filetype = $searcherManager.getData($catalogid,"assettype",$asset.assettype))
#if(!$filetype)
#set($filetype = $searcherManager.getData($catalogid,"assettype","none"))
#end
#set( $omit = $invaliditems.contains("${asset.id}"))
#set($found = false)
#foreach( $ft in $filetypes)
#set( $ftname = $filetype.getName($context.getLocale()) )
#if ($ft.get(0).equals($ftname))
#set($num = $numberutils.toInt("${ft.get(1)}"))
#set($num = $num + 1)
#set($null = $ft.set(1,"$num"))
#set($found = true)
#break
#end
#end
#if(!$found)
#set( $ftname = $filetype.getName($context.getLocale()) )
#set($null = $filetypes.add([$ftname,"1",$fileformat,"${omit}",$filetype.getId()]))
#end
##add hidden inputs
##add extra variables for specific publishers
#if ($publishtype.publishtype == "youtube")
#elseif ($publishtype.publishtype == "fatwire")
#set($homeurl = "${context.siteRoot}${home}${apphome}")
#set($username = $context.getUserName())
#end
#end
#foreach( $ft in $filetypes)
#set($filetype = $ft.get(0))
#set($num = $ft.get(1))
#set($fileformat = $ft.get(2))
#set($omit = $ft.get(3))
#set($ftid = $ft.get(4))
##include header if youtube
#if($publishtype.publishtype == "youtube")
| |
YouTube [[Category]] |
[[Format]] |
#end
|
#if($omit == "true")
Selected $num $filetype
#else
Publishing $num $filetype
#end
|
#if($omit == "true")
$context.putPageValue("publisher",$publishtype)
$context.putPageValue("filetype",$filetype)
$pages.include("./publishererror.html",$context)
|
#else
#if ($publishtype.publishtype == "youtube")
$pages.include("./youtubecategoryselector.html")
|
#end
#set($presetsearcher = $searcherManager.getSearcher($catalogid, "convertpreset") )
#set($presetquery = $presetsearcher.createSearchQuery() )
#set($null = $presetquery.setAndTogether(false))
#set( $rendertype = false)
#set( $rendertype = $mediaarchive.getMediaRenderType($fileformat) )
#if($publishtype.publishtype == "fatwire")
#set( $null = $presetquery.setAndTogether(true) )
#set( $null = $presetquery.append("publishtofatwire","true"))
#if( $rendertype )
#set( $null = $presetquery.append("inputtype",$rendertype))
#end
#else
#set( $null = $presetquery.setAndTogether(false) )
#if( $rendertype )
#set( $null = $presetquery.addExact("inputtype",$rendertype) )
#end
#set( $null = $presetquery.addExact("inputtype","all") )
#end
#set($null = $presetquery.addSortBy("ordering"))
#set( $results = $presetsearcher.search($presetquery) )
#if($canconvert || $candownloadfpo)
#else
#end
|
#end
#end