Add Re-download context menu item
This commit is contained in:
parent
4899ef3007
commit
7d09728e6b
@ -202,6 +202,25 @@ namespace LibationAvalonia.Views
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Force Re-Download
|
||||||
|
if (!entry.Liberate.IsSeries)
|
||||||
|
{
|
||||||
|
var reDownloadMenuItem = new MenuItem()
|
||||||
|
{
|
||||||
|
Header = "Re-download this audiobook",
|
||||||
|
IsEnabled = entry.Book.UserDefinedItem.BookStatus is LiberatedStatus.Liberated
|
||||||
|
};
|
||||||
|
|
||||||
|
args.ContextMenuItems.Add(reDownloadMenuItem);
|
||||||
|
reDownloadMenuItem.Click += (s, _) =>
|
||||||
|
{
|
||||||
|
//No need to persist this change. It only needs to last long for the file to start downloading
|
||||||
|
entry.Book.UserDefinedItem.BookStatus = LiberatedStatus.NotLiberated;
|
||||||
|
LiberateClicked?.Invoke(s, entry.LibraryBook);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
args.ContextMenuItems.Add(new Separator());
|
args.ContextMenuItems.Add(new Separator());
|
||||||
|
|
||||||
#region View Bookmarks/Clips
|
#region View Bookmarks/Clips
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -206,6 +206,25 @@ namespace LibationWinForms.GridView
|
|||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region Force Re-Download
|
||||||
|
if (!entry.Liberate.IsSeries)
|
||||||
|
{
|
||||||
|
var reDownloadMenuItem = new ToolStripMenuItem()
|
||||||
|
{
|
||||||
|
Text = "Re-download this audiobook",
|
||||||
|
Enabled = entry.Book.UserDefinedItem.BookStatus is LiberatedStatus.Liberated
|
||||||
|
};
|
||||||
|
|
||||||
|
ctxMenu.Items.Add(reDownloadMenuItem);
|
||||||
|
reDownloadMenuItem.Click += (s, _) =>
|
||||||
|
{
|
||||||
|
//No need to persist this change. It only needs to last long for the file to start downloading
|
||||||
|
entry.Book.UserDefinedItem.BookStatus = LiberatedStatus.NotLiberated;
|
||||||
|
LiberateClicked?.Invoke(s, entry.LibraryBook);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
ctxMenu.Items.Add(new ToolStripSeparator());
|
ctxMenu.Items.Add(new ToolStripSeparator());
|
||||||
|
|
||||||
#region View Bookmarks/Clips
|
#region View Bookmarks/Clips
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user