Example #1
0
 public async Task PlayPlaylistFromExternal(VideoId videoId, PlaylistItemsSourceOrigin origin, string playlistId)
 {
     var result = await _messenger.Send(new VideoPlayRequestMessage()
     {
         PlaylistId = playlistId, PlaylistOrigin = origin
     });
 }
        public static ToastArguments MakePlayPlaylistToastArguments(PlaylistItemsSourceOrigin origin, string playlistId)
        {
            var args = new ToastArguments();

            args.Add(ToastArgumentKey_Action, ToastArgumentValue_Action_PlayPlaylist);
            args.Add(ToastArgumentKey_PlaylistOrigin, origin.ToString());
            args.Add(ToastArgumentKey_PlaylistId, playlistId);
            return(args);
        }
 public static VideoPlayRequestMessage PlayPlaylist(string playlistId, PlaylistItemsSourceOrigin playlistOrigin, string playlistSortOption)
 {
     return(new VideoPlayRequestMessage()
     {
         PlaylistId = playlistId,
         PlaylistOrigin = playlistOrigin,
         PlaylistSortOptionsAsString = playlistSortOption,
     });
 }
 public static VideoPlayRequestMessage PlayPlaylist(string playlistId, PlaylistItemsSourceOrigin playlistOrigin, string playlistSortOption, VideoId videoId, TimeSpan?initialPosition = null)
 {
     return(new VideoPlayRequestMessage()
     {
         PlaylistId = playlistId,
         PlaylistOrigin = playlistOrigin,
         PlaylistSortOptionsAsString = playlistSortOption,
         VideoId = videoId,
         Potision = initialPosition,
     });
 }
 public IPlaylistFactory Resolve(PlaylistItemsSourceOrigin origin)
 {
     return(origin switch
     {
         PlaylistItemsSourceOrigin.Local => _localMylistPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.Mylist => _mylistPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.Series => _seriesVideoPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.ChannelVideos => _channelVideoPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.UserVideos => _userVideoPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.CommunityVideos => _communityVideoPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.SearchWithKeyword => _searchPlaylistFactory.Value,
         PlaylistItemsSourceOrigin.SearchWithTag => _searchPlaylistFactory.Value,
         _ => throw new NotSupportedException(origin.ToString()),
     });
Example #6
0
 public IEnumerable <PlaylistEntity> GetPlaylistsFromOrigin(PlaylistItemsSourceOrigin playlistOrigin)
 {
     return(_collection.Find(x => x.PlaylistOrigin == playlistOrigin));
 }
Example #7
0
 public IEnumerable <PlaylistEntity> GetPlaylistsFromOrigin(PlaylistItemsSourceOrigin origin)
 {
     return(_playlistDbService.GetPlaylistsFromOrigin(origin));
 }