Commit Graph

45 Commits

Author SHA1 Message Date
Jamie Magee 327585327f pep8, pyflakes, and pylint suggested fixes 2015-11-27 13:55:11 +01:00
Bas Stottelaar 7920f9ef2a Change file permissions according to file permission settings for artwork files. Fixes #2102 2015-01-27 21:32:14 +01:00
Jesse Mullan 6952505368 Fix all pyflakes complaints 2014-11-01 17:50:30 -07:00
Jesse Mullan 7726044c61 Fix whitespace around arithmetic operator 2014-11-01 16:28:44 -07:00
Jesse Mullan b7abdf1973 Fix E201,E202,E211,E241,E303 whitespace issues 2014-11-01 16:23:38 -07:00
Jesse Mullan 5a4bff5be8 autopep8 E301,E302,E303 too many / too few blank lines 2014-10-27 10:56:43 -07:00
Jesse Mullan a040f38a3f autopep8 E203 whitespace before colon 2014-10-27 10:54:57 -07:00
Jesse Mullan 3ff09aeb46 autopep8 E231 whitespace after some punctuation 2014-10-27 10:53:47 -07:00
Jesse Mullan 48ef8a93a9 Merge remote-tracking branch 'upstream/develop' into feature/refactor_config
Conflicts:
	headphones/postprocessor.py
2014-10-25 19:14:14 -07:00
Jesse Mullan 80d0c6d430 Rename headphones.CFG to headphones CONFIG 2014-10-25 11:40:56 -07:00
Ade ce73883ba2 Auto cue split
- Attempt to split audio files by cue sheet during post processing,
requires shntools with flac or xld. If the split fails then the
directory is set as unprocessed.
https://github.com/rembo10/headphones/issues/1938

- last.fm album art/info - try with release id if adding album
manually. https://github.com/rembo10/headphones/issues/1923,
https://github.com/rembo10/headphones/issues/1871
2014-10-25 16:32:53 +13:00
Jesse Mullan 0ffbd7824d Saving the config appears to work again 2014-10-09 10:51:03 -07:00
Bas Stottelaar 2e6c8e6537 Code improvements to the cache
* Catch the right exceptions where possible
* Move class vars to instance vars
* Prefer 'with' statement for files
2014-09-14 22:26:20 +02:00
Bas Stottelaar 922cca9652 Constants should be in caps 2014-08-13 18:21:51 +00:00
Ade 66b9da36dd Album Search Results Changes
- mb findRelease
get additional info incl Date, Formats, Tracks, Rgid etc, pass to
searchresults
added optional artist to findrelease, if searching by album can now
enter album:artist in the search bar, went for this for now as I didn’t
want to change the design too much but maybe in the future we could
have 2 boxes, artist album and then there’s no need for the dropdown
artist, album

- base
position at search box and persist selected option (uses local storage)
when refreshing, useful if entering multiple albums
increased the search box size a little

- searchresults
album results - new fields from mb, fall back to cover art archive rgid
url if last.fm not found (should get more results), musicbrainz album
icon link, pass mb rgid to addReleaseById to redirect to album page
artist results - musicbrainz artist icon

- importer
addreleaseById - added rgid param to create the album record upfront
with status Loading if from searchresults

- webserve
redirect to album page using rgid from searchresults

- album
spinner while album is loading
2014-06-28 08:18:54 +12:00
Bas Stottelaar 22151ff4b0 Moved all request methods to seperate file, since it is getting a core function 2014-04-07 00:32:43 +02:00
Bas Stottelaar 21e1c100e7 Refactored Last.FM code 2014-04-06 23:30:04 +02:00
Bas Stottelaar a717594950 Replaced urllib2 in albumart and cache 2014-04-06 16:15:11 +02:00
Bas Stottelaar 2add9fa264 First attempt to replace logger methods with lazy evaluating version
Forgot to format the message
2014-04-04 15:06:04 +02:00
Patrick Speiser 5695c8196a Calling _findfilesstartingwith with a non-existing folder would raise an exception, will return an empty list now 2012-10-07 05:51:55 +02:00
Patrick Speiser 2dbfde29ce Faster checking if something is in the cache 2012-09-30 23:09:39 +02:00
rembo10 dfcffe1671 Another possible fix for fetching album art from last.fm during post-processing. hit or miss. needs for testing 2012-08-17 19:51:09 +05:30
rembo10 de10357a9d Fix for windows cache path 2012-06-27 16:45:48 +05:30
rembo10 77a887c09b New function: getImageLinks(ArtistID/AlbumID). Just queries last fm to grab the artwork/thumbnail links without saving them to the cache. Useful for search results, etc 2012-06-25 18:47:21 +05:30
rembo10 7e9a1d11c2 Put some timeouts on the urlopens 2012-06-24 18:20:04 +05:30
rembo10 b1ed2da114 No more caching bios/decriptions to file. Store them in the descriptions db table instead. can be accessed the by getInfo still, which returns a dict with Content and Summary. API updated 2012-06-23 17:46:29 +05:30
rembo10 171faf824c Update the cache (with thumbnails & info only, not large image) when adding an artist/doing an artist update. Add album/artist descriptions to the database as well - removed last.fm getDescriptions function from the importer (replaced with the cache.getThumb), changed the thumbnail size from large to medium (~64px). Updated api_reference 2012-06-23 15:25:41 +05:30
rembo10 5eddfbbc30 Added ThumbURLs to the artist & album tables in the DB, modfied API_REFERENCE to reflect 2012-06-23 13:24:26 +05:30
rembo10 6f2640f558 Fixed the if/else block when writing info files - before it was writing the info file even if it existed and was current 2012-06-23 13:05:28 +05:30
rembo10 c2b3270eed A couple of fixes for when we grab different items. Grab info no matter what the query_type, as long as its either outdated or missing. Grab the thumbnail if were grabbing artwork and it's outdated or missing. But only grab the big image if that's specifically what we're looking for - not with any other query types 2012-06-23 13:05:09 +05:30
rembo10 0f862ccad1 Added thumbnails to the caching - called through getThumb(ArtistID/AlbumID) 2012-06-22 21:55:54 +05:30
rembo10 d34ef512ea Just get the summary rather than the full content for now 2012-06-22 20:52:59 +05:30
rembo10 fe472ecd08 Modified getArtwork to return a relative path to the cached image 2012-06-22 17:21:44 +05:30
rembo10 95cadfac93 Return properly formatted local image path 2012-06-22 16:25:31 +05:30
rembo10 2c208ea15b Fix for getArtwork if no path (either file path or url) could be retrieved 2012-06-22 14:31:55 +05:30
rembo10 1c8699f6c2 Write an empty txt file if the link doesn't have any bio/description so we don't keep checking every time 2012-06-22 14:17:09 +05:30
rembo10 0cfaf27b0f Get a list of all artwork and info files no matter if it's an artwork or info check 2012-06-22 13:49:18 +05:30
rembo10 20cf3930b2 Covert unicode artist/album strings to utf-8 before urlencoding 2012-06-22 11:37:25 +05:30
rembo10 a2563458f1 Catch KeyErrors if the data doesn't exist, urlencode the parameters 2012-06-22 11:32:15 +05:30
rembo10 4a12307cb8 Modifieded the getArtwork and getInfo functions so you can now just pass an ArtistID or AlbumID without having to specify the type as well. Also - changed the error catching when opening the url & parsing the data 2012-06-22 11:04:39 +05:30
rembo10 8a64187c6b getArtwork now returns a file:///path-to-file or a http://image-url (the latter if, for example, the artwork cache dir can't be created. getInfo will return the description/info as well, even if the file can't be created 2012-06-21 22:09:07 +05:30
rembo10 7df4c6d9e4 Fixed the info and image_url variables. Removed url from filenames 2012-06-21 20:36:13 +05:30
rembo10 4809562674 MoNow storing ImageURL to the database so it can be served through the api. Files are writen as UTF-8 2012-06-21 16:52:02 +05:30
rembo10 cd2bec3fe4 A few changes to get the getArtistURL function working properly 2012-06-21 15:50:27 +05:30
rembo10 b4de7fe22f First commit for the caching mechanism 2012-06-21 15:44:15 +05:30