# Path: resources/lib/model/fanart.py
# class Fanart:
#     def __init__(self, original=None, thumb=None):
#         self.original = original
#         self.thumb = thumb
# 
#     def get_original(self):
#         return self.original
# 
#     def set_original(self, original):
#         self.original = original
# 
#     def get_thumb(self):
#         return self.thumb
# 
#     def set_thumb(self, thumb):
#         self.thumb = thumb


import os
import subprocess
from resources.lib.model.fanart import Fanart
        if self.fanarts is None:
            return Fanart(alt, alt)
        else:
            try:
                response = self.fanarts.itervalues().next()
                if not os.path.isfile(response.get_original()):
                    response.set_original(self._replace_thumb(response.get_thumb(), response.get_original()))
            except:
                response = Fanart(alt, alt)

            return response

    def get_selected_fanart(self):
        if hasattr(self, 'selected_fanart'):
            if self.selected_fanart.get_thumb() == '':
                self.selected_fanart = self.get_fanart('common/mesh.png')

            return self.selected_fanart
        else:
            self.selected_fanart = self.get_fanart('common/mesh.png')
            return self.selected_fanart

    def set_selected_fanart(self, uri):
        art = self.fanarts.get(os.path.basename(uri))
        if isinstance(art, Fanart):
            if not os.path.isfile(art.get_original()):
                art.set_original(self._replace_thumb(art.get_thumb(), art.get_original()))
            self.selected_fanart = art
        else:
            if os.path.isfile(uri):

# Path: resources/lib/model/fanart.py
# class Fanart:
#     def __init__(self, original=None, thumb=None):
#         self.original = original
#         self.thumb = thumb
# 
#     def get_original(self):
#         return self.original
# 
#     def set_original(self, original):
#         self.original = original
# 
#     def get_thumb(self):
#         return self.thumb
# 
#     def set_thumb(self, thumb):
#         self.thumb = thumb


# Path: resources/lib/model/game.py
import os
import subprocess
from resources.lib.model.fanart import Fanart

        if self.fanarts is None:
            return Fanart(alt, alt)
        else:
            try:
                response = self.fanarts.itervalues().next()
                if not os.path.isfile(response.get_original()):
                    response.set_original(self._replace_thumb(response.get_thumb(), response.get_original()))
            except:
                response = Fanart(alt, alt)

            return response

    def get_selected_fanart(self):
        if hasattr(self, 'selected_fanart'):
            if self.selected_fanart.get_thumb() == '':
                self.selected_fanart = self.get_fanart('common/mesh.png')

            return self.selected_fanart
        else:
            self.selected_fanart = self.get_fanart('common/mesh.png')
            return self.selected_fanart

    def set_selected_fanart(self, uri):
        art = self.fanarts.get(os.path.basename(uri))
        if isinstance(art, Fanart):
            if not os.path.isfile(art.get_original()):
                art.set_original(self._replace_thumb(art.get_thumb(), art.get_original()))
            self.selected_fanart = art
        else:
            if os.path.isfile(uri):

                self.selected_fanart = Fanart(uri, uri)