Пример #1
0
    def __make_genre(self, genre):

        f = File(self)
        f.path = File.pack_path("/genres", genre)
        f.name = genre
        f.acoustic_name = genre
        f.mimetype = f.DIRECTORY
        f.icon = theme.mb_folder_genre.get_path()
        f.folder_flags = f.ITEMS_ENQUEUEABLE | \
                         f.ITEMS_COMPACT
        return f
Пример #2
0
 def __make_artist(self, artist):
 
     f = File(self)
     f.path = File.pack_path("/artists", artist)
     f.name = artist
     f.acoustic_name = f.name
     f.mimetype = f.DIRECTORY
     f.icon = theme.mb_folder_artist.get_path()
     f.folder_flags = f.ITEMS_ENQUEUEABLE | \
                         f.ITEMS_COMPACT
     return f
Пример #3
0
    def __make_folder(self, folder_name):

        f = File(self)
        f.is_local = True
        f.path = "/" + urlquote.quote(folder_name, "")
        f.mimetype = f.DIRECTORY
        f.resource = ""
        f.name = folder_name
        f.acoustic_name = "Folder: " + f.name
        f.icon = theme.mb_folder_audioclips.get_path()
        #f.info = "%d items" % len(self.__folders.get(folder_name, []))
        f.folder_flags = f.ITEMS_ENQUEUEABLE

        return f
Пример #4
0
    def __make_folder(self, folder_name):

        f = File(self)
        f.is_local = True
        f.path = "/" + urlquote.quote(folder_name, "")
        f.mimetype = "application/x-image-folder"
        f.resource = ""
        f.name = folder_name
        f.acoustic_name = "Folder: " + f.name
        #f.info = "%d items" % len(self.__folders.get(folder_name, []))
        f.folder_flags = f.ITEMS_ENQUEUEABLE | \
                            f.ITEMS_COMPACT

        return f
Пример #5
0
    def __make_folder(self, month, year):

        f = File(self)
        f.is_local = True
        f.path = File.pack_path("/months", str(month), str(year))
        f.mimetype = "application/x-image-folder"
        f.resource = ""
        f.name = "%s %d" % (_MONTHS[month - 1], year)
        f.acoustic_name = "Folder: " + f.name
        f.comparable = 0 - ((year * 100) + month)
        #f.info = "%d items" % len(self.__folders.get(folder_name, []))
        f.folder_flags = f.ITEMS_ENQUEUEABLE | \
                            f.ITEMS_COMPACT

        return f
Пример #6
0
    def __make_album(self, ffolder, album):

        f = File(self)
        f.is_local = True
        f.path = File.pack_path("/albums", ffolder, album)
        f.name = album
        f.acoustic_name = f.name
        #f.info = artist
        f.mimetype = "application/x-music-folder"
        f.folder_flags = f.ITEMS_ENQUEUEABLE
        f.comparable = f.name

        if (album == "All Tracks"):
            f.icon = theme.mb_folder_audio.get_path()

        return f
Пример #7
0
    def __make_track(self, artist, album, title, trackno, resource, mimetype):

        #f = self.call_service(msgs.CORE_SVC_GET_FILE, resource)
        #if (not f): return None

        path = File.pack_path("/tracks", artist, album, title, trackno,
                              resource, mimetype)

        f = File(self)
        f.path = path
        f.is_local = True
        f.resource = resource
        f.name = title
        f.info = artist or "unknown"
        f.mimetype = mimetype
        f.acoustic_name = f.name + ", by " + f.info

        if (album == "All Tracks"):
            f.comparable = f.name.upper()
        else:
            f.comparable = trackno

        return f