Пример #1
0
    def test_thumbnail_scanner(self):
        # add a video with no thumbnail
        video_file = File(file(movie_path('testdata')))
        json_data = file(json_data_path).read()
        video = Video.objects.create(
            title="Test", user=self.user1, video=video_file,
            data=json_data)
        video.save()

        # run scanner
        from nsextreme import thumbnail_scanner
        thumbnail_scanner()

        # check to see if thumbnail was generated
        video = Video.objects.get(pk=video.pk)
        assert video.thumbnail

        # check qtfaststart was applied
        with self.assertRaises(FastStartException):
            qtfaststart.processor.process(video.video.path, '/dev/null')
Пример #2
0
def scanner(request):
    from nsextreme import thumbnail_scanner
    thumbnail_scanner()
    return HttpResponse('ok')