public void Delete(StreamMedia stream) { using (connection.Lock()) { connection.Delete(stream); } }
public bool Contains(StreamMedia stream) { using (connection.Lock()) { return(GetStream(stream.Path) != null); } }
public void Insert(StreamMedia stream) { using (connection.Lock()) { connection.Insert(stream); } }
public void Update(StreamMedia stream) { using (connection.Lock()) { connection.Update(stream); } }
public Task RemoveStreamFromCollectionAndDatabase(StreamMedia stream) { var collectionStream = Streams?.FirstOrDefault(x => x.Path == stream.Path); if (collectionStream != null) { Streams?.Remove(collectionStream); } return(DeleteStream(stream)); }
public static StreamMedia GetStreamItem(VLCStorageFile file) { var video = new StreamMedia(); video.Name = file.Name; video.VlcMedia = file.Media; video.Path = file.Media.mrl(); return(video); }
public async Task <StreamMedia> LoadStreamFromDatabaseOrCreateOne(string mrl) { var stream = await LoadStream(mrl); if (stream == null) { stream = new StreamMedia(mrl); await streamsDatabase.Insert(stream); } return(stream); }
public override async void Execute(object parameter) { var mrl = parameter as string; if (string.IsNullOrEmpty(mrl)) { ToastHelper.Basic("Please enter a valid URL."); return; } mrl = mrl.Trim(); //TODO: pass MRL to vlc try { var stream = new StreamMedia(mrl); await Locator.MediaPlaybackViewModel.SetMedia(stream); } catch (Exception ex) { ExceptionHelper.CreateMemorizedException("PlayNetworkMRLCommand.Execute", ex); return; } Locator.NavigationService.Go(VLCPage.VideoPlayerPage); Locator.MainVM.CloseStreamFlyout(); }
public Task Update(StreamMedia stream) { return(streamsDatabase.Update(stream)); }
private Task DeleteStream(StreamMedia media) { return(streamsDatabase.Delete(media)); }
public async Task <bool> Contains(StreamMedia stream) { return(await Get(stream.Path) != null); }
public Task Delete(StreamMedia stream) { var connection = new SQLiteAsyncConnection(DbPath); return(connection.DeleteAsync(stream)); }
public async Task Insert(StreamMedia stream) { var connection = new SQLiteAsyncConnection(DbPath); await connection.InsertAsync(stream); }