feat: Implement Playlists and Programs Management
- Added PlaylistsGroupViewModel to manage playlists and selection. - Introduced ProgramsGroupViewModel for handling program groups and subscriptions. - Created ProgramsListViewModel to manage individual program listings. - Developed SettingsViewModel for user settings including playlist management. - Implemented TVPlayerViewModel as the main view model coordinating screens and data. - Added PlayerView for video playback with LibVLC integration. - Created XAML views for PlaylistsGroup, ProgramsGroup, ProgramsList, and Settings. - Added sample M3U playlist for testing. - Documented WPF build instructions and project structure in WPF-BUILD.md. - Configured global.json for .NET SDK versioning.
This commit is contained in:
@@ -5,9 +5,26 @@ namespace TV_Player.ViewModels
|
||||
{
|
||||
public static class SettingsModel
|
||||
{
|
||||
private static readonly string AppDataFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "TVPlayer");
|
||||
private static readonly string AppDataFolder = Path.Combine(GetWritableAppDataFolder(), "TVPlayer");
|
||||
private static readonly string SettingsFilePath = Path.Combine(AppDataFolder, "settings.json");
|
||||
|
||||
private static string GetWritableAppDataFolder()
|
||||
{
|
||||
var localAppData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
if (!string.IsNullOrWhiteSpace(localAppData))
|
||||
{
|
||||
return localAppData;
|
||||
}
|
||||
|
||||
var appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
if (!string.IsNullOrWhiteSpace(appData))
|
||||
{
|
||||
return appData;
|
||||
}
|
||||
|
||||
return AppContext.BaseDirectory;
|
||||
}
|
||||
|
||||
public static Dictionary<string,string> Playlists { get; set; }
|
||||
public static bool StartFullScreen { get; set; }
|
||||
public static bool StartFromLastScreen { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user