|
Jinzora is a online music database and streaming system. I am personally using it as an internal music delivery system for my home LAN (6 users). All modifications have been tested for Jinzora version 2.7.5. Coming SoonI am currently working on an XHTML/CSS compliance template for Jinzora. Hopefully this will provide a good basis for building future Jinzora interfaces using more modern web standards. Custom Metadata RetrievalI wasn't satisfied with the metadata retrieval of some of the backend services, so I cobbled together the existing Yahoo! Music service with a brand new Amazon Webservice XML parser. It uses Amazon for the album info, and Yahoo for the artists. We recently added Rhapsody as a backup to the Yahoo artist retrieval. DownloadThis is now a fairly mature component, and is considered "stable". If you find any bugs, feel free to let me know. Development Version 1.2.0 beta 2 (see changes below): jz_custom_metadata-1.2.0b2.zip jz_custom_metadata-1.2.0b2.tar.gz jz_custom_metadata-1.2.0b2.tar.bz2 Note: Development versions may contain significant bugs. Stable Version 1.1.2 (not currently recommended):< strong> jz_custom_metadata-1.1.2.zip jz_custom_metadata-1.1.2.tar.gz jz_custom_metadata-1.1.2.tar.bz2 Requirements PHP 5 - SimpleXML preferred, but can use XML DOM parser. PHP 4 - Requires XML DOM library to be installed. Note, PHP4 support uses a SimpleXML external library in pure PHP. This is a bit slower than the PHP5 method of using SimpleXML natively in the PHP code. Features Album Data Retrieval - Retrieves album metadata from Amazon using their webservices API and XML data retrieval.
- Tagging of albums: If you add any of the following tags to an album name inside of [square] brackets, it will modify your search criteria on the fly. The following tags are supported:
- [Soundtrack] - Changes the album artist to a common name used by soundtrack releases.
- [Various] - Assumes the album is released by various artists and will replace the album artist appropriately.
- [Compilation] - Same as Various
- [Single] - No current special matching, but may have a future feature addon
- [####] - If a year tag is used, the system will attempt to match the release year of the album and assign a higher weight. Works well for artists that release multiple albums of the same name (Killing Joke).
- [IMPORT] - Any other meta tags will be try to be matched against Amazon's own use of these tags. If they match, it will give a higher search result weighting.
- Coming Soon [UK] - Using a two letter country code will allow the retriever to modify the search for a different country's Amazon library. Supported codes will be US, CA, UK, FR, DE, and JP.
- Dynamic search lists look for album information using exact vs. fuzzy searches.
- Fuzzy search uses various methods of reducing search terms in artist and album names to facilitate better matches.
- Search result matching is weighted, giving exact matches with required data the highest priority.
- Exact searches are weighted highest.
- Cross-referenced matches further amplify the weight.
- Positive exact matches prevent further searching.
- Search through Amazon result pages automatically (3 pages deep, configurable).
- Extracts images starting with Amazon's largest image and falling back to smaller ones.
- Extracts the editorial review from Amazon's reviewers (Does not use customer reviews).
- Utilizes the Amazon client rating system to capture ratings NOTE: These ratings tend to be high as they are dependent on user based reviews.
- Can set release years. NOTE: Amazon's year listings based on publication year of that edition of the album, not the original release year of the record.
- PHP4 and PHP5 version compatible (PHP4 uses pure PHP XML parser and requires XML expat library).
- Attempts to search on various/soundtracks based on album names.
- UTF8 encoding/decoding of search results for proper DB entry. Smart searching on UTF normalized strings.
Artist Data Retrieval - Retrieves artist metadata from Yahoo! Music or Rhapsody.
- Performs an artist search and parses HTML output for results.
- Extracts Artist images in Yahoo!/Rhapsody format (300x180).
- Extracts Artist biography (often identical to AllMusic.com).
- Does not require XML parsers.
- UTF8 encoding/decoding of search results for proper DB entry. Smart searching on UTF normalized strings.
InstallationThe download package contains the correct libraries and paths needed to get the component installed. When extracted, the files will be created in a directory called "custom". Copy the package files from this extracted directory to the web directory that contains Jinzora. Everything should go where it needs to. If you are using PHP5, you probably don't actually need anything in the "lib" directory. If you need to unpackage things manually, this is where each file should go, just replace _INSTALL_PATH_ with the path to your web page area: _INSTALL_PATH_/lib/simplexml _INSTALL_PATH_/lib/utfnormal _INSTALL_PATH_/services/services/metadata/custom.php Change History1.2.0 beta 2 - FIX: Yahoo & Rhapsody fix working again.
1.2.0 beta 1 Install note: A new library (courtesy of MediaWiki) was added to support UTF normalization of search values, be sure to install it in the Jinzora "lib" directory. - NEW: Biggest change this release. Each match is provided with override selection and a submission button. Selecting an override item will force the retriever to pick the override item instead of the original match. This also allows a album to be chosen from the search results if no match met the minimum threshold. This is currently only enabled/working for the albums.
- NEW: We match metatags between our own metatags and Amazon. This is especially useful for soundtracks and import albums. We actually reduce the weighting for imports if a tag is not added because Amazon seems to favor sort output of import listings over the original work (probably sorting by year of publication).
- NEW: For albums or artist with foreign characters in the name, we add additional searches with normalized text by stripping accents off the names. This improves searches on English based Amazon servers for foreign artists and artists that use funky characters (Motley Crue, Blue Oyster Cult, etc).
- NEW: Yahoo! Music can miss alot of older matches, specifically for artist images. We have added Rhapsody as a backup for this. Eventually you will be able to override the artists like the albums.
- CHANGE: With the override functionality, we changed the display layout for album matches. Album art and a subset of the description are displayed to aid in choosing override matching and/or bad match results. This needs a major formatting overhaul as it seems cluttered.
- CHANGE: In the interface change, we now provide a link to both the Amazon page and the XML that we get from Amazon for the search result.
- CHANGE: Centralized the standard functions so we can expand the system to support multiple search engines in the future.
- CHANGE: Created a "standard" data array for the weighting logic. This is a global at the top of the script and allows easier modification of the weighting values. This also helps to standardize the max weighting value calculation.
- FIX: Yahoo! Music change to HTML format.
- FIX: Several changes to dynamic regex creation to prevent compile errors in the pattern matches.
- FIX: A logic issue in the search matching was preventing general searches from being added when specific searches failed.
1.1.2 - Added error handling wrapper to the Snoopy web requests. If an error is detected, it will retry the connection 3 times. Final errors will also provide HTML dumps of the resulting request data.
- Various artist albums from Amazon allow multiple artist assignments. Code will now check for this situation and match the search artist properly. Some additional checks were added to other data elements to check for multiples.
1.1.1 - RE-RELEASE: It appears the 1.1.0 release may have simply been a rehash of 1.0.4. I have renumbered it to prevent download confusion.
- NEW: Changed core logic for searching:
- Cross-referenced weighting to improve matching on common album names (Greatest Hits). This adds a multiplier to the weighting when the album and artist match appropriately.
- Searches lists are built dynamically as they are needed. Previously, we had a static list of searches we would try. Now, some searches are not required if we can tell that they will provide redundant results.
- Exact search matches fixed to provide most relevent results.
- Core weight key values changed to match the new logic.
- NEW: SimpleXML external library can now be used with PHP5 automatically if PHP does not have SimpleXML installed. The DOM XML library is still required to allow the external library to be used with either PHP4 or 5.
- NEW: Output of searches no longer displays debug codes for weightings. A colored chart shows the match closeness.
- BUG: The stopword filters were not working properly for some cases.
- BUG: Whitespace removal from album/artist names to help clean up the name matching.
1.0.4 - Made some small edits for Jinzora 2.5 versions.
- Fixed a small bug with artist retrieval. Now using Snoopy instead of file opens (issue with CGI based PHP).
1.0.3 - Improved cross-check matching on albums with "metadata" in their names.
- Added a meta tag for year of release: If a tag [####] is used, the system will attempt to match the release year of the album and assign a higher weight. Some artists seem to like to use identical album names, but different release years. This resolves this issue.
- Reordered and assigned different priorities to different levels of exact vs. fuzzy matching methods.
- Reassigned weighting values to match the new ordering methodology.
- When a more precise match finds a high relevance match, lower precision methods are ignored.
- Trying to fix a bug with the Snoopy library in which the library starts timing out on results and cannot recover.
- Minor fixes to non-exact search matching methods.
- Fixed an issue with Yahoo! Music changing the output end of line characters.
- Rework of the SimpleXML parser to try and resolve parsing exceptions (needs more work)
1.0.2 - Fixed UTF8 matching of artist names (Beyonc�, etc)
- Document meta tagging support of album names.
- Fixed an issue in which we may have been double UTF8 encoding album info.
1.0.1 - Fix in the hack that allows adding "tags" to album names to modify the search criteria.
Known issues/Feature Requests- If MP3 tagging is enabled, the performance of the metadata program is significantly reduced.
- Amazon now supports customer images for products. These often contain good album art when it is missing from the Amazon image library. I am working on a way to retrieve this information.
- Ability to use alternate music libraries from Amazon (US, Canada, UK, Japan).
- Ability to configure plugin from JZ interface.
Other Small Jinzora HacksResampling (LINUX)When using Jinzora on a Gentoo system, I have found many recent versions of Linux toolsets do not use the options set in Jinzora default configs. Change file: _INSTALL_PATH_ /services/services/resample/resample.php OGG, using vorbis-tools (oggdec) version 1.0 or higher on Linux Vorbis changed the way that their tool streams to standard output, so this changes how Jinzora can resample. To fix this, change line 244: $command = $path_to_oggdec. ' -Q "'. $file. '" -o - | '. $lame_cmd; And also on line 79: $command = $path_to_oggdec. ' -Q "'. $file. '" -o - '; WMA, using MPlayer on Linux MPlayer was one of the only Linux tools I found that could handle WMA conversion to PCM audio output. Getting this to work is fairly tricky, as MPlayer's standard output is a bit kludgy. However, the fix is a bit simpler: - Goto the admin interface
- Select System Tools
- Select Settings Manager
- Select Main Settings
- Select Resampling
- Set the value for path_to_wmadec: /usr/bin/mplayer -quiet -ao pcm:nowaveheader:file=/dev/stdout
Note: The WMA transcoding seems to introduce a small amount of noise into the output. I have not found a good way of dealing with this issue yet. UTF8 & JinzoraUTF8 is a method of encoding text in a general way so that foreign characters are displayed correctly. This is especially important for Asian based text encoding, but also impacts any non-English character set. I found that I had alot of non-English characters in many of my artist bios and names. This caused display problems, as the characters would appear incorrectly or would not save in the database properly. I am working on "re"documenting how I got UTF8 working with Jinzora. For now, the following are required to get it to work: - Convert the database tables to use UTF8. The following script will convert an existing Jinzora 2.3.7 database to UTF8. TBD
- Add a content header to the Jinzora output header to indicate that the page will deliver UTF8. TBD
|