Skip to content

Commit 29b4449

Browse files
committed
Updates to v3.5-pre / v1.1.22-pre
[New Features] * Playlist - Adds Playlist support on the decoder context (will be extended to support playlist files such as .pls/.m3u/.m3u8 etc.) - Adds Playlist support for BitSwarm (Torrent) and YoutubeDL (Web) plugins - Allows playing received items while playlist is still in progress - Separates main user input with playlist items, embedded streams and external streams - Adds basic scraping (for title, season, episode) * Sessions: Adds support to re-open a previously opened session (with the same input/playlist item/streams/curtime/audio and subs delay) * Subtitles - Adds basic local search support and improves suggestion algorithm - Adds Config.Subtitles.SearchLocal/SearchLocalOnInputType/SearchOnline/SearchOnlineOnInputType [Enchantments] * Overall Code Clean-up * Renderer - Allows late assignment of the Control/Handle (you can start playing before the control has been created) - Allows WARP device to be forced from the configuration (luid=-1000) * Threading, Locking and Cancellation - Improves Open/OpenAsync implementation - Replaces threads with tasks and gets rid of EnsureThreadDone - Improves locking and cancellation * Demuxer Packet Queue, CurTime and BufferedDuration * UI Updates mainly for Streams (as ObservableCollection) [Issues] * Fixes a null reference on renderer's SetViewport with D3D11 VP #158 * Fixes a rare dead lock on player's seek * Fixes an issue on WPF Control that it wouldn't go idle when the mouse was above the sliders [Important/Breaking Changes] * Player.Title can now be accessed from Player.Playlist.Selected.Title * Player.PlaybackCompleted renamed to Player.PlaybackStopped * Player.[AVS].Inputs and Player.[AVS].ExternalStreams can be accessed from Playlist.Items and Playlist.Items[N].External[AVS]Streams * LogOutput for files now will not append by default check Engine.Config.LogAppend * Changes the way that Player's Open Completed events will fire (only what user requested to open). If you still need to catch all the events subscribe on the Decoder Context's events (Player.decoder)
1 parent 891d26b commit 29b4449

72 files changed

Lines changed: 3918 additions & 3058 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

FlyleafLib.Controls.WPF/Config.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static void Load(Flyleaf flyleaf, string path)
3535
} catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); }
3636
}
3737

38-
public static void Save(Flyleaf flyleaf, string uiConfigPath, string configPath)
38+
public static void Save(Flyleaf flyleaf, string uiConfigPath, string configPath, string enginePath)
3939
{
4040
try
4141
{
@@ -54,6 +54,10 @@ public static void Save(Flyleaf flyleaf, string uiConfigPath, string configPath)
5454

5555
if (configPath != null)
5656
flyleaf.Config.Save(configPath);
57+
58+
if (enginePath != null)
59+
flyleaf.ConfigEngine.Save(enginePath);
60+
5761
} catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); }
5862
}
5963
}

FlyleafLib.Controls.WPF/Converters.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ public object[] ConvertBack(object value, Type[] targetTypes, object parameter,
159159
=> throw new NotImplementedException();
160160
}
161161

162+
public class PlaylistItemsConverter : IMultiValueConverter
163+
{
164+
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
165+
{
166+
return $"Playlist ({values[0]}/{values[1]})";
167+
}
168+
169+
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
170+
=> throw new NotImplementedException();
171+
}
172+
162173
public class GetDictionaryItemConverter : IMultiValueConverter
163174
{
164175
public object Convert(object[] value, Type targetType, object parameter, CultureInfo culture)

FlyleafLib.Controls.WPF/Flyleaf.xaml

Lines changed: 3 additions & 243 deletions
Large diffs are not rendered by default.

FlyleafLib.Controls.WPF/Flyleaf.xaml.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public partial class Flyleaf : UserControl, INotifyPropertyChanged, IVideoView
2424
#region Properties
2525
public string UIConfigPath { get; set; }
2626
public string ConfigPath { get; set; }
27+
public string EnginePath { get; set; }
2728

2829
public Player Player
2930
{
@@ -50,9 +51,6 @@ public SerializableDictionary<string, SerializableDictionary<string, string>>
5051
public ObservableCollection<UITheme>
5152
UIThemes { get; set; } = new ObservableCollection<UITheme>();
5253

53-
public string ErrorMsg { get => _ErrorMsg; set => Set(ref _ErrorMsg, value); }
54-
string _ErrorMsg;
55-
5654
public bool ShowDebug { get => _ShowDebug; set { Set(ref _ShowDebug, value); Config.Player.Stats = value; } }
5755
bool _ShowDebug;
5856

@@ -394,7 +392,11 @@ private void InitializePlayer(Player oldPlayer = null)
394392
Unloaded += (o, e) => { Dispose(); };
395393
Player.Control.MouseClick += (o, e) => { if (e.Button == System.Windows.Forms.MouseButtons.Right & popUpMenu != null) popUpMenu.IsOpen = true; };
396394
MouseDown += (o, e) => { Player?.Activity.ForceFullActive(); };
397-
MouseMove += (o, e) => { Player?.Activity.ForceFullActive(); };
395+
MouseMove += (o, e) => {
396+
// Weird bug when slider's value changes will cause mouse move event to fire (so we can not go idle while mouse over the sliders)
397+
if (!(e.OriginalSource is System.Windows.Shapes.Rectangle))
398+
Player?.Activity.ForceFullActive();
399+
};
398400

399401
if (defaultTheme != null)
400402
defaultTheme.VideoView = Config.Video.BackgroundColor;
@@ -524,7 +526,7 @@ public async void OpenSettingsAction(object obj = null)
524526
{
525527
settings.ApplySettings();
526528
if (result.ToString() == "save")
527-
UIConfig.Save(this, UIConfigPath, ConfigPath);
529+
UIConfig.Save(this, UIConfigPath, ConfigPath, EnginePath);
528530
}
529531
}
530532

FlyleafLib.Controls.WPF/FlyleafLib.Controls.WPF.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>net6.0-windows;net5.0-windows;net472</TargetFrameworks>
55
<UseWindowsForms>true</UseWindowsForms>
66
<UseWPF>true</UseWPF>
7-
<Version>1.1.21</Version>
7+
<Version>1.1.22-pre</Version>
88
<Authors>SuRGeoNix</Authors>
99
<Copyright>SuRGeoNix © 2022</Copyright>
1010
<PackageLicenseExpression>LGPL-3.0-or-later</PackageLicenseExpression>
@@ -14,7 +14,10 @@
1414
<PackageTags>flyleaf flyleaflib video audio media player element control</PackageTags>
1515
<Description>WPF Media Player Control/Element (based on FlyleafLib)</Description>
1616
<PackageReleaseNotes>
17-
* Fixes an issue with Pop-Up menu and Subtitles embedded streams
17+
* Adds Playlist support (on popup menu)
18+
* Adds Search Local / Search Online on Subtitles Settings
19+
* Plugins' external streams will be all as one under External
20+
* Fixes an issue that it wouldn't go idle when the mouse was above the sliders
1821
* Updates FlyleafLib
1922
</PackageReleaseNotes>
2023
</PropertyGroup>

0 commit comments

Comments
 (0)