Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:ARM
picard
SearchGoogle3.py
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File SearchGoogle3.py of Package picard
# -*- coding: utf-8 -*- PLUGIN_NAME = u"Search with Google for Release (codebase 4.1)" PLUGIN_AUTHOR = u"Brian Schweitzer" PLUGIN_DESCRIPTION = "Search Google. Thanks to Lukas Lalinsky for bug-fix!" PLUGIN_VERSION = "0.1.1" PLUGIN_API_VERSIONS = ["0.9.0", "0.10", "0.15"] from PyQt4 import QtCore from picard.util import webbrowser2 from picard.ui.itemviews import BaseAction, register_cluster_action from picard.ui.itemviews import BaseAction, register_album_action from picard.ui.itemviews import BaseAction, register_file_action from picard.metadata import register_track_metadata_processor class SearchGoogle(BaseAction): NAME = "Search with Google" def callback(self, objs): cluster = objs[0] url = "http://www.google.com/search?hl=en&q=" url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"]) url += " " url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"]) webbrowser2.open(url) register_cluster_action(SearchGoogle()) register_album_action(SearchGoogle()) class SearchGoogleTrack(BaseAction): NAME = "Search with Google" def callback(self, objs): file = objs[0] url = "http://www.google.com/search?hl=en&q=" url += QtCore.QUrl.toPercentEncoding(file.metadata["artist"]) url += " " url += QtCore.QUrl.toPercentEncoding(file.metadata["album"]) url += " " url += QtCore.QUrl.toPercentEncoding(file.metadata["title"]) webbrowser2.open(url) register_file_action(SearchGoogleTrack())
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor