mirror of
https://github.com/celogeek/piwigo-cli.git
synced 2025-05-25 10:12:37 +02:00
add filename
This commit is contained in:
parent
ade03260e2
commit
308017edb7
@ -46,8 +46,8 @@ func (c *ImagesTagCommand) Execute(args []string) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println(img)
|
fmt.Println(img)
|
||||||
|
|
||||||
t := table.NewWriter()
|
t := table.NewWriter()
|
||||||
t.AppendRows([]table.Row{
|
t.AppendRows([]table.Row{
|
||||||
{"Name", imgDetails.Name},
|
{"Name", imgDetails.Name},
|
||||||
@ -61,6 +61,5 @@ func (c *ImagesTagCommand) Execute(args []string) error {
|
|||||||
t.SetOutputMirror(os.Stdout)
|
t.SetOutputMirror(os.Stdout)
|
||||||
t.SetStyle(table.StyleLight)
|
t.SetStyle(table.StyleLight)
|
||||||
t.Render()
|
t.Render()
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ func (img *ImageDetails) Preview(height int) (string, error) {
|
|||||||
buf := bytes.NewBuffer([]byte{})
|
buf := bytes.NewBuffer([]byte{})
|
||||||
|
|
||||||
buf.WriteString("\033]1337")
|
buf.WriteString("\033]1337")
|
||||||
buf.WriteString(";File=")
|
buf.WriteString(fmt.Sprintf(";File=%s", img.Filename))
|
||||||
buf.WriteString(";inline=1")
|
buf.WriteString(";inline=1")
|
||||||
buf.WriteString(fmt.Sprintf(";size=%d;", resp.ContentLength))
|
buf.WriteString(fmt.Sprintf(";size=%d;", resp.ContentLength))
|
||||||
if height > 0 {
|
if height > 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user