Skip to content

Commit

Permalink
Add download movie/episode button (Issue #106)
Browse files Browse the repository at this point in the history
closes #106
  • Loading branch information
nomad2k committed Dec 8, 2014
1 parent 815b771 commit 110383c
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

4.1.13
- Allow semi-colon (;) to be used as a list delimiter
- Add download movie/episode button

4.1.12
- Massive clean up of the music section
Expand Down
31 changes: 24 additions & 7 deletions resources/js/app/movies/movie.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,14 +289,31 @@ var movieDetailsPanel = new Ext.FormPanel({
name: 'trailer'
},
{
xtype: 'button',
text: 'View Trailer',
handler: function() {
if (Ext.getCmp('trailer').getValue() !== '') {
window.open(Ext.getCmp('trailer').getValue(), '');
xtype: 'panel',
layout: 'hbox',
items: [
{
xtype: 'button',
text: 'Download Movie',
handler: function() {
var selectedMovie = Ext.getCmp('Moviegrid').getSelectionModel().getSelected(),
path = selectedMovie.data.file;

if (path !== '') {
window.open(XWMM.util.convertVFSURL(path), '');
}
}
},
{
xtype: 'button',
text: 'View Trailer',
handler: function() {
if (Ext.getCmp('trailer').getValue() !== '') {
window.open(Ext.getCmp('trailer').getValue(), '');
}
}
}
},
width: 60
]
}
]
},
Expand Down
12 changes: 12 additions & 0 deletions resources/js/app/tvshows/tvshow.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,18 @@ var episodeDetailsPanel = new Ext.FormPanel({
fieldLabel: 'Description',
name: 'plot',
height: 125,
},
{
xtype: 'button',
text: 'Download Episode',
handler: function() {
var selectedEpisode = Ext.getCmp('episodeGird').getSelectionModel().getSelected(),
path = selectedEpisode.data.directory + selectedEpisode.data.file;

if (path !== '') {
window.open(XWMM.util.convertVFSURL(path), '');
}
}
}
]
},
Expand Down

0 comments on commit 110383c

Please sign in to comment.