|
@@ -85,22 +85,25 @@ func RunCmd(cmd *cobra.Command, args []string) {
|
|
|
|
|
|
if len(data.Scenes) > 0 {
|
|
if len(data.Scenes) > 0 {
|
|
for _, v := range data.Scenes {
|
|
for _, v := range data.Scenes {
|
|
|
|
+
|
|
|
|
+ // 场景封面图
|
|
|
|
+ if len(v.Icon) > 0 {
|
|
|
|
+ log.Info("Downloading Scenes-cover", "url", fmt.Sprintf("%s", v.Icon))
|
|
|
|
+ url := utils.DetectSource(v.Icon, dest, ossUrl)
|
|
|
|
+ err = utils.DownloadFile(url, v.Icon)
|
|
|
|
+ log.Info("Save Scenes-cover", "url", fmt.Sprintf("%s", url))
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
if v.Type == "pano" {
|
|
if v.Type == "pano" {
|
|
// 主Tiles图
|
|
// 主Tiles图
|
|
- //log.Info("current", "bucket", fmt.Sprintf("%s", bucket))
|
|
|
|
|
|
+
|
|
if utils.IsCommandAvailable("ossutil") {
|
|
if utils.IsCommandAvailable("ossutil") {
|
|
|
|
+ log.Info("current", "bucket", fmt.Sprintf("%s", bucket))
|
|
runMainTileDownload(v.SceneCode, dest, exclString, bucket)
|
|
runMainTileDownload(v.SceneCode, dest, exclString, bucket)
|
|
}
|
|
}
|
|
|
|
|
|
// 场景封面图
|
|
// 场景封面图
|
|
- if len(v.Icon) > 0 {
|
|
|
|
- log.Info("Downloading Scenes-cover", "url", fmt.Sprintf("%s", v.Icon))
|
|
|
|
- url := utils.DetectSource(v.Icon, dest, ossUrl)
|
|
|
|
- err = utils.DownloadFile(url, v.Icon)
|
|
|
|
- log.Info("Save Scenes-cover", "url", fmt.Sprintf("%s", url))
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- // 场景封面图
|
|
|
|
Hotspots := v.SomeData.Hotspots
|
|
Hotspots := v.SomeData.Hotspots
|
|
if Hotspots != nil {
|
|
if Hotspots != nil {
|
|
for _, Hotspot := range Hotspots {
|
|
for _, Hotspot := range Hotspots {
|