Skip to content

Commit

Permalink
Prevent datagrid auto selection on startup #32
Browse files Browse the repository at this point in the history
  • Loading branch information
laurencee committed Oct 1, 2017
1 parent bc8815e commit b72e887
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions GlobalAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]

[assembly: AssemblyVersion("2.10.0.0")]
[assembly: AssemblyFileVersion("2.10.0.0")]
[assembly: AssemblyVersion("2.10.1.0")]
[assembly: AssemblyFileVersion("2.10.1.0")]
8 changes: 6 additions & 2 deletions Livestream.Monitor/Model/StreamLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,14 @@ public async Task OpenStream(LivestreamModel livestreamModel, string streamQuali
{
if (livestreamModel?.ApiClient == null || !livestreamModel.Live) return;

// always fall back to an auto-selection stream quality if for some reason none was passed in
if (string.IsNullOrWhiteSpace(streamQuality))
streamQuality = StreamQuality.Best.ToString();

string livestreamerArgs = $"{livestreamModel.StreamUrl} {streamQuality}";
var apiClient = livestreamModel.ApiClient;

// hack to pass through the client id to livestreamer
// hack to pass through the client id to livestreamer
if (settingsHandler.Settings.PassthroughClientId)
{
if (apiClient is TwitchApiClient)
Expand Down Expand Up @@ -165,7 +169,7 @@ public async Task OpenVod(VodDetails vodDetails, IViewAware viewAware)

string livestreamerArgs = $"--player-passthrough hls {vodDetails.Url} best";

// hack to pass through the client id to livestreamer
// hack to pass through the client id to livestreamer
if (settingsHandler.Settings.PassthroughClientId)
{
// check domain name of url to see if this is a twitch.tv vod link
Expand Down
3 changes: 2 additions & 1 deletion Livestream.Monitor/Views/LivestreamListView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
<Grid.Resources>
<DataTemplate x:Key="GridLayout">
<DataGrid x:Name="LivestreamListDataGrid" ItemsSource="{Binding ViewSource.View}" SelectedItem="{Binding StreamsModel.SelectedLivestream}"
AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="True" >
AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" VirtualizingStackPanel.IsVirtualizing="True"
IsSynchronizedWithCurrentItem="False">
<DataGrid.Resources>
<ContextMenu x:Key="ContextMenu" cal:Action.TargetWithoutContext="{Binding Source={x:Reference LayoutControl}, Path=DataContext}">
<MenuItem Header="Remove Stream" cal:Message.Attach="[Click] = [RemoveLivestream]" />
Expand Down

0 comments on commit b72e887

Please sign in to comment.