Skip to content

Commit

Permalink
Merge pull request #413 from enen92/master
Browse files Browse the repository at this point in the history
[movies][tvshow] Fix art map when updating movie/show details
  • Loading branch information
enen92 authored Jul 14, 2020
2 parents 21065cd + 8f9db20 commit 10f20ec
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/js/apps/movie/edit/edit_controller.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
editForm: true
tabs: true
callback: (data, formView) =>
@setArt(data)
@saveCallback(data, formView)
}
form = App.request "form:popup:wrapper", options
Expand Down Expand Up @@ -88,6 +89,16 @@
}
]

## Properly write the art map
setArt: (data) ->
art = {}
if 'fanart' of data
art["fanart"] = data.fanart
if 'thumbnail' of data
art["poster"] = data.thumbnail
delete data.thumbnail
data["art"] = art

## Save the settings to Kodi
saveCallback: (data, formView) ->
controller = App.request "command:kodi:controller", 'video', 'VideoLibrary'
Expand Down
11 changes: 11 additions & 0 deletions src/js/apps/tvshow/editShow/edit_show_controller.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
editForm: true
tabs: true
callback: (data, formView) =>
@setArt(data)
@saveCallback(data, formView)
}
form = App.request "form:popup:wrapper", options
Expand Down Expand Up @@ -64,6 +65,16 @@
}
]

## Properly write the art map
setArt: (data) ->
art = {}
if 'fanart' of data
art["fanart"] = data.fanart
if 'thumbnail' of data
art["poster"] = data.thumbnail
delete data.thumbnail
data["art"] = art

## Save the settings to Kodi
saveCallback: (data, formView) ->
controller = App.request "command:kodi:controller", 'video', 'VideoLibrary'
Expand Down

0 comments on commit 10f20ec

Please sign in to comment.