Rename episodes bug

Not sure if this is the correct place to file a bug report but here it goes…

So after clicking “rename all episodes in this series”, i kept getting an error on some on my shows.
The error: [GET] Internal Server Error : /api/rename?seriesId=5

Log:
14-2-23 23:49:28.0|Fatal|NzbDroneErrorPipeline|Request Failed

System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource](IEnumerable1 source) at NzbDrone.Core.MediaFiles.RenameEpisodeFileService.<GetPreviews>d__d.MoveNext() in m:\\BuildAgent2\\work\\328d72309b633a8\\src\zbDrone.Core\\MediaFiles\\RenameEpisodeFileService.cs:line 78 at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.d__0.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at NzbDrone.Core.MediaFiles.RenameEpisodeFileService.GetRenamePreviews(Int32 seriesId) in m:\\BuildAgent2\\work\\328d72309b633a8\\src\zbDrone.Core\\MediaFiles\\RenameEpisodeFileService.cs:line 57 at NzbDrone.Api.Episodes.RenameEpisodeModule.<>c__DisplayClassd.<GetEpisodes>b__c() in m:\\BuildAgent2\\work\\328d72309b633a8\\src\zbDrone.Api\\Episodes\\RenameEpisodeModule.cs:line 39 at NzbDrone.Api.NzbDroneRestModule1.ToListResource[TModel](Func1 function) in m:\\BuildAgent2\\work\\328d72309b633a8\\src\zbDrone.Api\zbDroneRestModule.cs:line 36 at NzbDrone.Api.Episodes.RenameEpisodeModule.GetEpisodes() in m:\\BuildAgent2\\work\\328d72309b633a8\\src\zbDrone.Api\\Episodes\\RenameEpisodeModule.cs:line 39 at NzbDrone.Api.REST.RestModule1.<set_GetResourceAll>b__c(Object options) in m:\BuildAgent2\work\328d72309b633a8\src\zbDrone.Api\REST\RestModule.cs:line 111
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

after some digging i was able to reproduce this.

All you have to do to reproduce this bug is to make a folder inside one of the season folder of a series and add any video file.

Hope this helps.

Not able to reproduce this as described, but I fixed the underlying issue.