コード例 #1
0
ファイル: base_controls.py プロジェクト: sitexa/foobnix
        def search_top_albums_task(query):
            analytics.action("SEARCH_search_top_albums")
            results = self.lastfm_service.search_top_albums(query)
            if not results:
                results = []
            self.notetabs.append_tab(query, None)
            albums_already_inserted = []
            for album in results[:15]:
                all = []
                if album.album.lower() in albums_already_inserted:
                    continue
                album.is_file = False
                tracks = self.lastfm_service.search_album_tracks(
                    album.artist, album.album)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.album = album.album
                    track.parent(album).add_is_file(True)
                    all.append(track)
                if len(all) > 0:
                    all = [album] + all
                    albums_already_inserted.append(album.album.lower())
                    self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
                self.notetabs.append_all(all)
コード例 #2
0
ファイル: base_controls.py プロジェクト: Cgruppo/foobnix
        def search_top_albums_task(query):
            analytics.action("SEARCH_search_top_albums")
            results = self.lastfm_service.search_top_albums(query)
            if not results:
                results = []
            self.notetabs.append_tab(query, None)
            albums_already_inserted = []
            for album in results[:15]:
                all = []
                if album.album.lower() in albums_already_inserted:
                    continue
                album.is_file = False
                tracks = self.lastfm_service.search_album_tracks(album.artist, album.album)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.album = album.album
                    track.parent(album).add_is_file(True)
                    all.append(track)
                if len(all) > 0:
                    all = [album] + all
                    albums_already_inserted.append(album.album.lower())
                    self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
                self.notetabs.append_all(all)
コード例 #3
0
ファイル: base_controls.py プロジェクト: Cgruppo/foobnix
        def search_top_tracks_task(query):
            analytics.action("SEARCH_search_top_tracks")
            results = self.lastfm_service.search_top_tracks(query)
            if not results:
                results = []
            all = []
            parent_bean = FModel(query)
            all.append(parent_bean)
            for i, bean in enumerate(results):
                bean.tracknumber = i + 1
                bean.parent(parent_bean).add_is_file(True)
                all.append(bean)

            if not results:
                all = self.show_google_results(query)

            self.notetabs.append_tab(query, all)
コード例 #4
0
ファイル: base_controls.py プロジェクト: Cgruppo/foobnix
        def search_all_tracks_task():
            analytics.action("SEARCH_search_all_tracks")
            results = self.vk_service.find_tracks_by_query(query)
            if not results:
                results = []
            all = []
            p_bean = FModel(query).add_font("bold")
            all.append(p_bean)
            for i, bean in enumerate(results):
                bean.tracknumber = i + 1
                bean.parent(p_bean).add_is_file(True)
                all.append(bean)

            if not results:
                all = self.show_google_results(query)

            self.notetabs.append_tab(query, all)
コード例 #5
0
 def activate_perspective(self, perspective_id):
     if self.is_activated(perspective_id):
         return
     perspective = self.get_perspective(perspective_id)
     assert perspective
     for _id in self.perspectives.keys():
         if self.is_activated(_id):
             self.get_perspective(_id).emit("deactivated")
     self.perspectives_container.set_active_by_index(perspective.widget_id)
     perspective.button.set_active(True)
     if isinstance(perspective, Filterable):
         self.filter.show()
     else:
         self.filter.hide()
     perspective.emit("activated")
     analytics.action("PERSPECTIVE_" + perspective.get_id())
     self.check_availability()
コード例 #6
0
ファイル: controller.py プロジェクト: Andresteve07/foobnix
 def activate_perspective(self, perspective_id):
     if self.is_activated(perspective_id):
         return
     perspective = self.get_perspective(perspective_id)
     assert perspective
     for _id in self.perspectives.keys():
         if self.is_activated(_id):
             self.get_perspective(_id).emit("deactivated")
     self.perspectives_container.set_active_by_index(perspective.widget_id)
     perspective.button.set_active(True)
     if isinstance(perspective, Filterable):
         self.filter.show()
     else:
         self.filter.hide()
     perspective.emit("activated")
     analytics.action("PERSPECTIVE_" + perspective.get_id())
     self.check_availability()
コード例 #7
0
ファイル: base_controls.py プロジェクト: sitexa/foobnix
        def search_all_tracks_task():
            analytics.action("SEARCH_search_all_tracks")
            results = self.vk_service.find_tracks_by_query(query)
            if not results:
                results = []
            all = []
            p_bean = FModel(query).add_font("bold")
            all.append(p_bean)
            for i, bean in enumerate(results):
                bean.tracknumber = i + 1
                bean.parent(p_bean).add_is_file(True)
                all.append(bean)

            if not results:
                all = self.show_google_results(query)

            self.notetabs.append_tab(query, all)
コード例 #8
0
ファイル: base_controls.py プロジェクト: sitexa/foobnix
        def search_top_tracks_task(query):
            analytics.action("SEARCH_search_top_tracks")
            results = self.lastfm_service.search_top_tracks(query)
            if not results:
                results = []
            all = []
            parent_bean = FModel(query)
            all.append(parent_bean)
            for i, bean in enumerate(results):
                bean.tracknumber = i + 1
                bean.parent(parent_bean).add_is_file(True)
                all.append(bean)

            if not results:
                all = self.show_google_results(query)

            self.notetabs.append_tab(query, all)
コード例 #9
0
ファイル: perspectives.py プロジェクト: cyberbolt/foobnix
    def activate_perspective(self, name):
        for widget in self.perspectivs.values():
            widget.hide()
        FC().left_perspective = name
        self.perspectivs[name].show()
        
        if name in (LEFT_PERSPECTIVE_INFO,LEFT_PERSPECTIVE_LASTFM):
            self.controls.filter.hide()
        else:
            self.controls.filter.show()

        if name in (LEFT_PERSPECTIVE_RADIO,LEFT_PERSPECTIVE_MY_RADIO):
            self.switch_radio_button.set_label(self.perspectivs[name]
                                               .get_child().switcher_label)
            self.switch_radio_button.show()
        else:
            self.switch_radio_button.hide()
        
        analytics.action("PERSPECTIVE_"+name);
コード例 #10
0
ファイル: base_controls.py プロジェクト: Cgruppo/foobnix
        def search_top_similar_task(query):
            analytics.action("SEARCH_search_top_similar")
            results = self.lastfm_service.search_top_similar_artist(query)
            if not results:
                results = []
            self.notetabs.append_tab(query, None)
            for artist in results[:15]:
                all = []
                artist.is_file = False
                all.append(artist)
                tracks = self.lastfm_service.search_top_tracks(artist.artist)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.parent(artist).add_is_file(True)
                    all.append(track)

                self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
コード例 #11
0
ファイル: base_controls.py プロジェクト: sitexa/foobnix
        def search_top_similar_task(query):
            analytics.action("SEARCH_search_top_similar")
            results = self.lastfm_service.search_top_similar_artist(query)
            if not results:
                results = []
            self.notetabs.append_tab(query, None)
            for artist in results[:15]:
                all = []
                artist.is_file = False
                all.append(artist)
                tracks = self.lastfm_service.search_top_tracks(artist.artist)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.parent(artist).add_is_file(True)
                    all.append(track)

                self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
コード例 #12
0
ファイル: base_controls.py プロジェクト: sitexa/foobnix
        def search_top_tags_task(query):
            analytics.action("SEARCH_search_top_tags")
            results = self.lastfm_service.search_top_tags(query)
            if not results:
                logging.debug("tag result not found")
                results = []
            self.notetabs.append_tab(query, None)
            for tag in results[:15]:
                all = []
                tag.is_file = False
                all.append(tag)
                tracks = self.lastfm_service.search_top_tag_tracks(tag.text)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.parent(tag).add_is_file(True)
                    all.append(track)

                self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
                self.notetabs.append_all(all)
コード例 #13
0
ファイル: base_controls.py プロジェクト: Cgruppo/foobnix
        def search_top_tags_task(query):
            analytics.action("SEARCH_search_top_tags")
            results = self.lastfm_service.search_top_tags(query)
            if not results:
                logging.debug("tag result not found")
                results = []
            self.notetabs.append_tab(query, None)
            for tag in results[:15]:
                all = []
                tag.is_file = False
                all.append(tag)
                tracks = self.lastfm_service.search_top_tag_tracks(tag.text)
                for i, track in enumerate(tracks):
                    track.tracknumber = i + 1
                    track.parent(tag).add_is_file(True)
                    all.append(track)

                self.notetabs.append_all(all)

            if not results:
                all = self.show_google_results(query)
                self.notetabs.append_all(all)
コード例 #14
0
ファイル: preferences_window.py プロジェクト: foobnix/foobnix
 def show(self, current=CONFIG_MUSIC_LIBRARY):
     self.show_all()
     self.populate_config_category(current)
     self.on_load()
     analytics.action("PreferencesWindow")
コード例 #15
0
 def show(self, current=CONFIG_MUSIC_LIBRARY):
     self.show_all()
     self.populate_config_category(current)
     self.on_load()
     analytics.action("PreferencesWindow")
コード例 #16
0
ファイル: dm.py プロジェクト: n0nvme/foobnix
 def show(self):
     self.show_all()
     analytics.action("DM")
コード例 #17
0
ファイル: dm.py プロジェクト: zavlab1/foobnix
 def show(self):
     self.show_all()
     analytics.action("DM")
コード例 #18
0
ファイル: movie_area.py プロジェクト: foobnix/foobnix
 def on_full_screen(self):
     self.controls.state_stop(True)
     self.fullscrean_area.show_window()
     self.set_output(self.fullscrean_area.get_draw())
     self.controls.state_play(under_pointer_icon=True)
     analytics.action("FullScreanArea")
コード例 #19
0
 def show(self):
     self.eq_view.show_all()
     analytics.action("EqController")
コード例 #20
0
ファイル: eq_controller.py プロジェクト: cyberbolt/foobnix
 def show(self):
     self.eq_view.show_all()
     analytics.action("EqController");
コード例 #21
0
ファイル: movie_area.py プロジェクト: sitexa/foobnix
 def on_full_screen(self):
     self.controls.state_stop(True)
     self.fullscrean_area.show_window()
     self.set_output(self.fullscrean_area.get_draw())
     self.controls.state_play(under_pointer_icon=True)
     analytics.action("FullScreanArea")