SHA256
1
0
forked from pool/picard
picard/SearchAmazon3.py
Stephan Kulow 6beefab6df Accepting request 76928 from home:olh:branches:multimedia:apps
- Update name of dlopen libdiscid object during build

- Update additional python plugins to report compatibility for 0.15

- Run dos2unix on additional python plugins

- Update to version 0.15 - 2011-07-17
  - Added options for using standardized track, release, and artist metadata.
  - Added preferred release format support.
  - Expanded preferred release country support to allow multiple countries.
  - Added support for tagging non-album tracks (standalone recordings).
  - Plugins can now be installed via drag and drop, or a file browser.
  - Added several new tags: %%_originaldate%%, %%_recordingcomment%%, and %%_releasecomment%%
  - Changes to request queuing: added separate high and low priority queues for each host.
  - Tagger scripts now run after metadata plugins finish (#5850)
  - The "compilation" tag can now be $unset or modified via tagger script.
  - Added a shortcut (Ctrl+I) for Edit->Details.
  - Miscellaneous bug fixes.
  - Support for the NGS web service
 
 Version 0.14 - 2011-05-15
  - Fixed a problem with network operations hanging after a network error (#5794, #5884)
  - ID3v2.3 with UTF-16 is now the default ID3 version
  - Option to set preferred release types for improved album matching
  - Added support for sorting the album/file lists (#75)
  - Fixed OptimFROG tag reading (#5859)
  - Fixed colors for a white-on-black color scheme (#5846)
  - Added an option to replace non-ASCII punctuation (#5834)
  - Support for writing release group and work IDs, currently unused (#5805)
  - Fixed saving of the release event format tag (#5250)

OBS-URL: https://build.opensuse.org/request/show/76928
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/picard?expand=0&rev=14
2011-07-25 10:17:02 +00:00

87 lines
3.3 KiB
Python

# -*- coding: utf-8 -*-
PLUGIN_NAME = u"Search Amazon for Release (codebase 4.1)"
PLUGIN_AUTHOR = u"Brian Schweitzer"
PLUGIN_DESCRIPTION = "Search Amazon"
PLUGIN_VERSION = "0.1"
PLUGIN_API_VERSIONS = ["0.9.0", "0.10", "0.15"]
from PyQt4 import QtCore
from picard.cluster import Cluster
from picard.util import webbrowser2
from picard.ui.itemviews import BaseAction, register_album_action
from picard.ui.itemviews import BaseAction, register_cluster_action
class SearchAmazonCA(BaseAction):
NAME = "Search Amazon.ca"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.ca/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonCA())
register_album_action(SearchAmazonCA())
class SearchAmazonCOM(BaseAction):
NAME = "Search Amazon.com"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.com/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonCOM())
register_album_action(SearchAmazonCOM())
class SearchAmazonDE(BaseAction):
NAME = "Search Amazon.de"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.de/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonDE())
register_album_action(SearchAmazonDE())
class SearchAmazonFR(BaseAction):
NAME = "Search Amazon.fr"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.fr/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonFR())
register_album_action(SearchAmazonFR())
class SearchAmazonJP(BaseAction):
NAME = "Search Amazon.jp"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.jp/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonJP())
register_album_action(SearchAmazonJP())
class SearchAmazonUK(BaseAction):
NAME = "Search Amazon.co.uk"
def callback(self, objs):
cluster = objs[0]
url = "http://www.amazon.co.uk/s/?url=search-alias%3Dpopular&field-keywords="
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["artist"])
url += " "
url += QtCore.QUrl.toPercentEncoding(cluster.metadata["album"])
webbrowser2.open(url)
register_cluster_action(SearchAmazonUK())
register_album_action(SearchAmazonUK())