How to use the tartube.media.Folder function in tartube

To help you get started, we’ve selected a few tartube examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github axcore / tartube / tartube / media.py View on Github external
return 0
                    else:
                        return 0
                else:
                    return 0
            else:
                if obj1.name.lower() < obj2.name.lower():
                    return -1
                elif obj1.name.lower() > obj2.name.lower():
                    return 1
                else:
                    return 0
        else:
            if isinstance(obj1, Folder):
                return -1
            elif isinstance(obj2, Folder):
                return 1
            elif isinstance(obj1, Channel) or isinstance(obj1, Playlist):
                return -1
            elif isinstance(obj2, Channel) or isinstance(obj2, Playlist):
                return 1
            else:
                return 0
github axcore / tartube / tartube / media.py View on Github external
def get_type(self):

        if isinstance(self, Channel):
            return 'channel'
        elif isinstance(self, Playlist):
            return 'playlist'
        elif isinstance(self, Folder):
            return 'folder'
        else:
            return 'video'