# Path: vodmanagement/models.py
# class UserPermission(models.Model):
# class VodManager(models.Manager):
# class FileDirectory(models.Model):
#     class Meta:
# class VideoRegion(models.Model):
#     class Meta:
# class VideoCategory(models.Model):
#     class Meta:
# class MultipleUpload(models.Model):
#     class Meta:
# class Restore(models.Model):
#     class Meta:
# class Vod(models.Model):
#     class Meta:
#     def __str__(self):
#     def has_permision(self):
#     def active(self, *args, **kwargs):
# def upload_location(instance, filename):
# def upload_image_location(instance, filename):
# def upload_record_image_location(instance, filename):
# def default_description(instance):
# def default_filedir():
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def __str__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def colored_level(self):
#     def save(self, force_insert=False, force_update=False, using=None,
#              update_fields=None):
#     def save(self, without_valid=False, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def image_tag(self):
#     def get_absolute_url(self):
#     def add_view_count(self):
#     def colored_active(self):
#     def video_format(self):
# def pre_save_post_receiver(sender, instance, *args, **kwargs):
# def post_init_receiver(sender, instance, *args, **kwargs):
# TYPES = (
#     ('common', 'Common'),
#     ('special', 'Special purpose'),
# )
# VIDEO_QUALITY = [
#     ('SD', '标清'),
#     ('HD', '高清'),
#     ('FHD', '超清'),
# ]
# SAVE_PATH = (
#     ('', settings.LOCAL_MEDIA_ROOT),
# )


import logging
import os
import re
import zipfile
from pathlib import Path
from django.core.files.base import File
from django.conf import settings
from vodmanagement import models
from datetime import datetime
# -*- coding: utf-8 -*-

class ResumableFile(object):
    def __init__(self, storage, kwargs):
        self.storage = storage
        self.kwargs = kwargs
        self.chunk_suffix = "_part_"
        self.video_allow = getattr(settings, 'ADMIN_RESUMABLE_VIDEO_ALLOW', ['.mp4', '.mkv' '.avi', '.rmvb', 'mpeg', '.mov'])
        self.image_allow = getattr(settings, 'ADMIN_RESUMABLE_IMAGE_ALLOW', ['.jpg', '.jpeg', '.png', '.bmp', '.gif'])


# Path: vodmanagement/models.py
# class UserPermission(models.Model):
# class VodManager(models.Manager):
# class FileDirectory(models.Model):
#     class Meta:
# class VideoRegion(models.Model):
#     class Meta:
# class VideoCategory(models.Model):
#     class Meta:
# class MultipleUpload(models.Model):
#     class Meta:
# class Restore(models.Model):
#     class Meta:
# class Vod(models.Model):
#     class Meta:
#     def __str__(self):
#     def has_permision(self):
#     def active(self, *args, **kwargs):
# def upload_location(instance, filename):
# def upload_image_location(instance, filename):
# def upload_record_image_location(instance, filename):
# def default_description(instance):
# def default_filedir():
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def __str__(self):
#     def __str__(self):
#     def save(self, *args, **kwargs):
#     def colored_level(self):
#     def save(self, force_insert=False, force_update=False, using=None,
#              update_fields=None):
#     def save(self, without_valid=False, *args, **kwargs):
#     def __unicode__(self):
#     def __str__(self):
#     def image_tag(self):
#     def get_absolute_url(self):
#     def add_view_count(self):
#     def colored_active(self):
#     def video_format(self):
# def pre_save_post_receiver(sender, instance, *args, **kwargs):
# def post_init_receiver(sender, instance, *args, **kwargs):
# TYPES = (
#     ('common', 'Common'),
#     ('special', 'Special purpose'),
# )
# VIDEO_QUALITY = [
#     ('SD', '标清'),
#     ('HD', '高清'),
#     ('FHD', '超清'),
# ]
# SAVE_PATH = (
#     ('', settings.LOCAL_MEDIA_ROOT),
# )


# Path: admin_resumable/files.py
import logging
import os
import re
import zipfile
from pathlib import Path
from django.core.files.base import File
from django.conf import settings
from vodmanagement import models
from datetime import datetime

# -*- coding: utf-8 -*-

class ResumableFile(object):
    def __init__(self, storage, kwargs):
        self.storage = storage
        self.kwargs = kwargs
        self.chunk_suffix = "_part_"
        self.video_allow = getattr(settings, 'ADMIN_RESUMABLE_VIDEO_ALLOW', ['.mp4', '.mkv' '.avi', '.rmvb', 'mpeg', '.mov'])
        self.image_allow = getattr(settings, 'ADMIN_RESUMABLE_IMAGE_ALLOW', ['.jpg', '.jpeg', '.png', '.bmp', '.gif'])


    @property