public bool CreateAndEnqueueJob( StreamService service, string id, IVideoInfo info = null ) { IVideoJob job; switch ( service ) { case StreamService.Twitch: job = new TwitchVideoJob( TwitchAPI, id ); break; case StreamService.Hitbox: job = new HitboxVideoJob( id ); break; default: throw new Exception( service.ToString() + " isn't a known service." ); } if ( info != null ) { job.VideoInfo = info; } return EnqueueJob( job ); }
public bool CreateAndEnqueueJob( IVideoInfo info ) { return CreateAndEnqueueJob( info.Service, info.VideoId, info ); }
public bool Equals(IVideoInfo other) { return(other != null && Service == other.Service && VideoId == other.VideoId); }