# Path: coverart_utils.py
# class NaturalString(str):
#     '''
#     this class implements an object that can naturally compare
#     strings
#     i.e. "15 album" < "100 album"
#     '''
# 
#     def __init__(self, string):
#         super(NaturalString, self).__init__()
#         convert = lambda text: int(text) if text.isdigit() else text.lower()
#         alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)',
#                                                                  key)]
# 
#         self._string_elements = alphanum_key(string)
# 
#     def __lt__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__lt__(other)
#         else:
#             return self._string_elements < other._string_elements
# 
#     def __le__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__le__(other)
#         else:
#             return self._string_elements <= other._string_elements
# 
#     def __gt__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__gt__(other)
#         else:
#             return self._string_elements > other._string_elements
# 
#     def __ge__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__ge__(other)
#         else:
#             return self._string_elements >= other._string_elements


import shutil
import os
import sys
import subprocess
import rb
import coverart_rb3compat as rb3compat
                    import winreg
from gi.repository import GObject
from gi.repository import Gtk
from gi.repository import GLib
from gi.repository import RB
from gi.repository import Gdk
from gi.repository import Peas
from gi.repository import Gst
from coverart_utils import NaturalString
        from coverart_search_tracks import CoverArtTracks
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.





class CoverArtExport(GObject.Object):
    '''
    This class provides for various export routines
    
    '''
    TARGET_BITRATE = 128

    def __init__(self, plugin, shell, album_manager):
        self.plugin = plugin
        self.shell = shell
        self.album_manager = album_manager

        self._gstreamer_has_initialised = False

    def is_search_plugin_enabled(self):
        peas = Peas.Engine.get_default()
        loaded_plugins = peas.get_loaded_plugins()

        result = False
        if 'coverart_search_providers' in loaded_plugins:
            info = peas.get_plugin_info('coverart_search_providers')
            version = info.get_version()


# Path: coverart_utils.py
# class NaturalString(str):
#     '''
#     this class implements an object that can naturally compare
#     strings
#     i.e. "15 album" < "100 album"
#     '''
# 
#     def __init__(self, string):
#         super(NaturalString, self).__init__()
#         convert = lambda text: int(text) if text.isdigit() else text.lower()
#         alphanum_key = lambda key: [convert(c) for c in re.split('([0-9]+)',
#                                                                  key)]
# 
#         self._string_elements = alphanum_key(string)
# 
#     def __lt__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__lt__(other)
#         else:
#             return self._string_elements < other._string_elements
# 
#     def __le__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__le__(other)
#         else:
#             return self._string_elements <= other._string_elements
# 
#     def __gt__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__gt__(other)
#         else:
#             return self._string_elements > other._string_elements
# 
#     def __ge__(self, other):
#         if type(other) is str:
#             return super(NaturalString, self).__ge__(other)
#         else:
#             return self._string_elements >= other._string_elements


# Path: coverart_export.py
import shutil
import os
import sys
import subprocess
import rb
import coverart_rb3compat as rb3compat
                    import winreg
from gi.repository import GObject
from gi.repository import Gtk
from gi.repository import GLib
from gi.repository import RB
from gi.repository import Gdk
from gi.repository import Peas
from gi.repository import Gst
from coverart_utils import NaturalString
        from coverart_search_tracks import CoverArtTracks

# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA.





class CoverArtExport(GObject.Object):
    '''
    This class provides for various export routines
    
    '''
    TARGET_BITRATE = 128

    def __init__(self, plugin, shell, album_manager):
        self.plugin = plugin
        self.shell = shell
        self.album_manager = album_manager

        self._gstreamer_has_initialised = False

    def is_search_plugin_enabled(self):
        peas = Peas.Engine.get_default()
        loaded_plugins = peas.get_loaded_plugins()

        result = False
        if 'coverart_search_providers' in loaded_plugins:
            info = peas.get_plugin_info('coverart_search_providers')
            version = info.get_version()


            if NaturalString(version) >= "0.9":