Skip to content

Commit

Permalink
Release v0.5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
rembo10 committed Jun 8, 2015
2 parents c5dd1a9 + 4b8222d commit c5ad7c9
Show file tree
Hide file tree
Showing 27 changed files with 786 additions and 296 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Changelog

## v0.5.6
Released 08 June 2015

Highlights:
* Added: Metacritic scores
* Added: Series support (e.g. Cafe Del Mar, Now That's What I Call Music, etc)
* Added: Filter out clean/edited/censored releases (#2198)
* Added: Button on the log page to toggle verbose/debug logging
* Fixed: Connecting to SABnzbd over https with python >= 2.7.9
* Fixed: Email Notifications with SSL
* Fixed: Don't limit musicbrainz results to first 100
* Fixed: nzbget url fix
* Fixed: OSX Notifications
* Improved: Cuesplit, allow wav, ape to be split
* Improved: Moved the 'freeze db' option to the advanced->misc. tab
* Improved: Moved kickass searching to json api, so it doesn't throw 404 errors anymore when there are no results
* Improved: SSL for headphones indexer
* Improved: Disable update dialog box if check_github is diabled

The full list of commits can be found [here](https://github.com/rembo10/headphones/compare/v0.5.5...v0.5.6).

## v0.5.5
Released 04 May 2015

Expand Down
5 changes: 4 additions & 1 deletion data/interfaces/default/artist.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ <h1 id="artistname">
<th id="albumname">Name</th>
<th id="reldate">Date</th>
<th id="type">Type</th>
<th id="score">Metacritic</th>
<th id="status">Status</th>
<th id="have">Have</th>
<th id="bitrate">Bitrate</th>
Expand Down Expand Up @@ -125,6 +126,7 @@ <h1 id="artistname">
<td id="albumname"><a href="albumPage?AlbumID=${album['AlbumID']}">${album['AlbumTitle']}</a></td>
<td id="reldate">${album['ReleaseDate']}</td>
<td id="type">${album['Type']}</td>
<td id="score">${album['CriticScore']}/${album['UserScore']}</td>
<td id="status">${album['Status']}
%if album['Status'] == 'Skipped' or album['Status'] == 'Ignored':
[<a href="#" onclick="doAjaxCall('queueAlbum?AlbumID=${album['AlbumID']}&ArtistID=${album['ArtistID']}',$(this),'table')" data-success="'${album['AlbumTitle']}' added to Wanted list">want</a>]
Expand Down Expand Up @@ -218,7 +220,7 @@ <h1 id="artistname">
$("li:gt(4)", this).hide(); /* :gt() is zero-indexed */
$("li:nth-child(5)", this).after("<br><li class='more'><a href='#'>More...</a></li>"); /* :nth-child() is one-indexed */
});
$("li.more a").live("click", function() {
$("li.more").on("click", 'a', function() {
var li = $(this).parents("li:first");
li.parent().children().show();
li.remove();
Expand Down Expand Up @@ -283,6 +285,7 @@ <h1 id="artistname">
{ "sType": "date" },
null,
null,
null,
{ "sType": "title-numeric"},
null,
null
Expand Down
5 changes: 3 additions & 2 deletions data/interfaces/default/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
<body>
<div id="container">
<div id="ajaxMsg" class="ajaxMsg"></div>
% if not headphones.CURRENT_VERSION:
% if headphones.CONFIG.CHECK_GITHUB and not headphones.CURRENT_VERSION:
<div id="updatebar">
You're running an unknown version of Headphones. <a href="update">Update</a> or
<a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
</div>
% elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.COMMITS_BEHIND > 0 and headphones.INSTALL_TYPE != 'win':
% elif headphones.CONFIG.CHECK_GITHUB and headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.COMMITS_BEHIND > 0 and headphones.INSTALL_TYPE != 'win':
<div id="updatebar">
A <a href="https://github.com/${headphones.CONFIG.GIT_USER}/headphones/compare/${headphones.CURRENT_VERSION}...${headphones.LATEST_VERSION}"> newer version</a> is available. You're ${headphones.COMMITS_BEHIND} commits behind. <a href="update">Update</a> or <a href="#" onclick="$('#updatebar').slideUp('slow');">Close</a>
</div>
Expand All @@ -62,6 +62,7 @@
<select name="type" id="search_type">
<option value="artist">Artist</option>
<option value="album">Album</option>
<option value="series">Series</option>
</select>
<input type="submit" value="Search"/>
</form>
Expand Down
23 changes: 17 additions & 6 deletions data/interfaces/default/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ <h1 class="clearfix"><i class="fa fa-gear"></i> Settings</h1>
<input class="hppass" type="password" value="${config['hppass']}" size="20">
</div>
<div class="row">
<a href="http://headphones.codeshy.com/vip" id="vipserver" target="_blank">Don't have an account? Sign up!</a>
<a href="https://headphones.codeshy.com/vip" id="vipserver" target="_blank">Don't have an account? Sign up!</a>
</div>
</div>
</fieldset>
Expand Down Expand Up @@ -724,6 +724,12 @@ <h1 class="clearfix"><i class="fa fa-gear"></i> Settings</h1>
<input type="text" name="required_words" value="${config['required_words']}" size="50">
<small>Results without these words in the title will be filtered out. You can use OR: 'flac OR lossless OR alac, vinyl'</small>
</div>
<div class="row checkbox left clearfix">
<label title="Filter out releases that contain the words 'clean','edited' or 'censored', as long as those words aren't in the search term">
Ignore clean/censored releases
<input type="checkbox" name="ignore_clean_releases" id="ignore_clean_releases" value="1" ${config['ignore_clean_releases']} />
</label>
</div>
</fieldset>
</td>
<td>
Expand All @@ -736,10 +742,6 @@ <h1 class="clearfix"><i class="fa fa-gear"></i> Settings</h1>
</label>
</div>
<div class="row checkbox left clearfix">
<label title="Freeze the database, so new artists won't be added automatically. Use this if Headphones adds artists because due to wrong snatches. This check is skipped when the folder name is appended with release group ID.">
Freeze database for adding new artist
<input type="checkbox" name="freeze_db" id="freeze_db" value="1" ${config['freeze_db']} />
</label>
<label>
Move downloads to Destination Folder
<input type="checkbox" name="move_files" id="move_files" value="1" ${config['move_files']} />
Expand Down Expand Up @@ -1132,6 +1134,9 @@ <h3>Email</h3>
<div class="row checkbox">
<input type="text" class="override-float" name="email_smtp_port" value="${config['email_smtp_port']}" size="4"><label>SMTP Port</label>
</div>
<div class="row checkbox">
<input type="checkbox" name="email_ssl" value="1" ${config['email_ssl']} /><label>SSL</label>
</div>
<div class="row checkbox">
<input type="checkbox" name="email_tls" value="1" ${config['email_tls']} /><label>TLS</label>
</div>
Expand Down Expand Up @@ -1368,6 +1373,12 @@ <h3>Email</h3>
name="autowant_manually_added" value="1" ${config['autowant_manually_added']} />
<label>Automatically mark manually added albums as wanted</label>
</div>
<div class="row left checkbox">
<label title="Freeze the database, so new artists won't be added automatically. Use this if Headphones adds artists because due to wrong snatches. This check is skipped when the folder name is appended with release group ID.">
Don't add new artists when post-processing albums
<input type="checkbox" name="freeze_db" id="freeze_db" value="1" ${config['freeze_db']} />
</label>
</div>
<div class="row">
<label>Folder Permissions</label>
<input type="text" name="folder_permissions" value="${config['folder_permissions']}" size="7">
Expand Down Expand Up @@ -1475,7 +1486,7 @@ <h3>Email</h3>
</div>
<div class="row">
<label>Password</label><input type="password" class="hppass" name="hppass" value="${config['hppass']}" size="15"><br>
<a href="http://headphones.codeshy.com/vip" id="vipserver" target="_blank">Get an Account!</a>
<a href="https://headphones.codeshy.com/vip" id="vipserver" target="_blank">Get an Account!</a>
</div>
</div>
</fieldset>
Expand Down
2 changes: 2 additions & 0 deletions data/interfaces/default/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,7 @@ div#artistheader h2 a {
#album_table td#albumname,
#album_table td#reldate,
#album_table td#type,
#album_table td#score,
#track_table td#duration,
#upcoming_table td#select,
#upcoming_table td#status,
Expand All @@ -1455,6 +1456,7 @@ div#artistheader h2 a {
}
#album_table td#status,
#album_table td#bitrate,
#album_table td#score,
#album_table td#albumformat,
#album_table td#wantlossless {
font-size: 13px;
Expand Down
45 changes: 24 additions & 21 deletions data/interfaces/default/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,35 @@ <h1 class="clearfix"><i class="fa fa-calendar"></i> History</h1>
</tr>
</thead>
<tbody>
%for item in history:
<%
if item['Status'] == 'Processed':
grade = 'A'
elif item['Status'] == 'Snatched':
grade = 'C'
elif item['Status'] == 'Unprocessed':
grade = 'X'
elif item['Status'] == 'Frozen':
grade = 'X'
else:
grade = 'U'
%for item in history:
<%
if item['Status'] == 'Processed':
grade = 'A'
elif item['Status'] == 'Snatched':
grade = 'C'
elif item['Status'] == 'Unprocessed':
grade = 'X'
elif item['Status'] == 'Frozen':
grade = 'X'
else:
grade = 'U'

fileid = 'unknown'
if item['URL'].find('nzb') != -1:
fileid = 'nzb'
if item['URL'].find('torrent') != -1:
fileid = 'torrent'
if item['URL'].find('rutracker') != -1:
fileid = 'torrent'
%>
fileid = 'unknown'
if item['URL'].find('nzb') != -1:
fileid = 'nzb'
if item['URL'].find('torrent') != -1:
fileid = 'torrent'
if item['URL'].find('rutracker') != -1:
fileid = 'torrent'

folder = 'Folder: ' + item['FolderName']

%>
<tr class="grade${grade}">
<td id="dateadded">${item['DateAdded']}</td>
<td id="filename">${cgi.escape(item['Title'], quote=True)} [<a href="${item['URL']}">${fileid}</a>]<a href="albumPage?AlbumID=${item['AlbumID']}">[album page]</a></td>
<td id="size">${helpers.bytes_to_mb(item['Size'])}</td>
<td id="status">${item['Status']}</td>
<td title="${folder}" id="status">${item['Status']}</td>
<td id="action">[<a href="#" onclick="doAjaxCall('queueAlbum?AlbumID=${item['AlbumID']}&redirect=history', $(this),'table')" data-success="Retrying download of '${cgi.escape(item['Title'], quote=True)}'">retry</a>][<a href="#" onclick="doAjaxCall('queueAlbum?AlbumID=${item['AlbumID']}&new=True&redirect=history',$(this),'table')" data-success="Looking for a new version of '${cgi.escape(item['Title'], quote=True)}'">new</a>]</td>
<td id="delete"><a href="#" onclick="doAjaxCall('clearhistory?date_added=${item['DateAdded']}&title=${cgi.escape(item['Title'], quote=True)}',$(this),'table')" data-success="${cgi.escape(item['Title'], quote=True)} cleared from history"><img src="interfaces/default/images/trashcan.png" height="18" width="18" id="trashcan" title="Clear this item from the history"></a>
</tr>
Expand Down
1 change: 1 addition & 0 deletions data/interfaces/default/logs.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<div id="subhead_container">
<div id="subhead_menu">
<a class="menu_link_edit" href="clearLogs"><i class="fa fa-trash-o"></i> Clear log</a>
<a class="menu_link_edit" href="toggleVerbose"><i class="fa fa-pencil"></i> Toggle Debug Log</a>
</div>
</div>
</%def>
Expand Down
17 changes: 14 additions & 3 deletions data/interfaces/default/searchresults.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ <h1 class="clearfix"><i class="fa fa-search"></i> Search Result</h1>
<th id="reldate">Date</th>
<th id="scoresmall">Score</th>
<th id="mbrelid" style="display:none;"</th>
%else:
%elif type == 'artist':
<th id="artistname">Artist Name</th>
<th id="score">Score</th>
%else:
<th id="seriesname">Series Name</th>
<th id="type">Type</th>
<th id="score">Score</th>
%endif
<th id="mb"></th>
Expand All @@ -40,8 +44,10 @@ <h1 class="clearfix"><i class="fa fa-search"></i> Search Result</h1>
<tr class="grade${grade}">
%if type == 'album':
<td id="albumart" style=" text-align: center; vertical-align: middle;"><div id="artistImg"><img title="${result['albumid']}" class="albumArt" height="50" width="50" onerror="tryCCA(this, '${caa_group_url}')"></div></td>
%else:
%elif type == 'artist':
<td id="albumart"><div id="artistImg"><img title="${result['id']}" class="albumArt" height="50" width="50"></div></td>
%else:
<td id="albumart"></td>
%endif
%if type == 'album':
<td id="albumname"><a href="addReleaseById?rid=${result['albumid']}&rgid=${result['rgid']}" title="${albuminfo}">${result['title']}</a></td>
Expand All @@ -52,9 +58,14 @@ <h1 class="clearfix"><i class="fa fa-search"></i> Search Result</h1>
<td id="score"><a href="${result['albumurl']} "title="View on MusicBrainz"><div class="bar"><div class="score" style="width: ${result['score']}px">${result['score']}</div></div></a></td>
<td id="musicbrainz" style=" text-align: center; line-height: 0; vertical-align: middle;"><a href="${result['albumurl']}"><img src="interfaces/default/images/MusicBrainz_Album_Icon.png" title="View on MusicBrainz" height="20" width="20"></a></td>
<td id="mbrelid" style="display:none;">${result['albumid']}</td>
%else:
%elif type == 'artist':
<td id="artistname"><a href="addArtist?artistid=${result['id']}" title="${result['uniquename']}">${result['uniquename']}</a></td>
<td id="score"><a href="${result['url']} "title="View on MusicBrainz"><div class="bar"><div class="score" style="width: ${result['score']}px">${result['score']}</div></div></a></td>
<td id="musicbrainz" style=" text-align: center; line-height: 0; vertical-align: middle;"><a href="${result['url']}"><img src="interfaces/default/images/MusicBrainz_Artist_Icon.png" title="View on MusicBrainz" height="20" width="20"></a></td>
%else:
<td id="seriesname"><a href="addSeries?seriesid=${result['id']}" title="${result['uniquename']}">${result['uniquename']}</a></td>
<td id="type">${result['type']}</td>
<td id="score"><a href="${result['url']} "title="View on MusicBrainz"><div class="bar"><div class="score" style="width: ${result['score']}px">${result['score']}</div></div></a></td>
<td id="musicbrainz" style=" text-align: center; line-height: 0; vertical-align: middle;"><a href="${result['url']}"><img src="interfaces/default/images/MusicBrainz_Artist_Icon.png" title="View on MusicBrainz" height="20" width="20"></a></td>
%endif
</tr>
Expand Down
32 changes: 24 additions & 8 deletions headphones/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def initialize(config_file):
version_lock_file, e)

# Check for new versions
if CONFIG.CHECK_GITHUB_ON_STARTUP:
if CONFIG.CHECK_GITHUB and CONFIG.CHECK_GITHUB_ON_STARTUP:
try:
LATEST_VERSION = versioncheck.checkGithub()
except:
Expand Down Expand Up @@ -288,11 +288,12 @@ def initialize_scheduler():
schedule_job(updater.dbUpdate, 'MusicBrainz Update', hours=hours, minutes=0)

#Update check
if CONFIG.CHECK_GITHUB_INTERVAL:
minutes = CONFIG.CHECK_GITHUB_INTERVAL
else:
minutes = 0
schedule_job(versioncheck.checkGithub, 'Check GitHub for updates', hours=0, minutes=minutes)
if CONFIG.CHECK_GITHUB:
if CONFIG.CHECK_GITHUB_INTERVAL:
minutes = CONFIG.CHECK_GITHUB_INTERVAL
else:
minutes = 0
schedule_job(versioncheck.checkGithub, 'Check GitHub for updates', hours=0, minutes=minutes)

# Remove Torrent + data if Post Processed and finished Seeding
minutes = CONFIG.TORRENT_REMOVAL_INTERVAL
Expand Down Expand Up @@ -352,12 +353,12 @@ def dbcheck():
conn = sqlite3.connect(DB_FILE)
c = conn.cursor()
c.execute(
'CREATE TABLE IF NOT EXISTS artists (ArtistID TEXT UNIQUE, ArtistName TEXT, ArtistSortName TEXT, DateAdded TEXT, Status TEXT, IncludeExtras INTEGER, LatestAlbum TEXT, ReleaseDate TEXT, AlbumID TEXT, HaveTracks INTEGER, TotalTracks INTEGER, LastUpdated TEXT, ArtworkURL TEXT, ThumbURL TEXT, Extras TEXT)')
'CREATE TABLE IF NOT EXISTS artists (ArtistID TEXT UNIQUE, ArtistName TEXT, ArtistSortName TEXT, DateAdded TEXT, Status TEXT, IncludeExtras INTEGER, LatestAlbum TEXT, ReleaseDate TEXT, AlbumID TEXT, HaveTracks INTEGER, TotalTracks INTEGER, LastUpdated TEXT, ArtworkURL TEXT, ThumbURL TEXT, Extras TEXT, Type TEXT)')
# ReleaseFormat here means CD,Digital,Vinyl, etc. If using the default
# Headphones hybrid release, ReleaseID will equal AlbumID (AlbumID is
# releasegroup id)
c.execute(
'CREATE TABLE IF NOT EXISTS albums (ArtistID TEXT, ArtistName TEXT, AlbumTitle TEXT, AlbumASIN TEXT, ReleaseDate TEXT, DateAdded TEXT, AlbumID TEXT UNIQUE, Status TEXT, Type TEXT, ArtworkURL TEXT, ThumbURL TEXT, ReleaseID TEXT, ReleaseCountry TEXT, ReleaseFormat TEXT, SearchTerm TEXT)')
'CREATE TABLE IF NOT EXISTS albums (ArtistID TEXT, ArtistName TEXT, AlbumTitle TEXT, AlbumASIN TEXT, ReleaseDate TEXT, DateAdded TEXT, AlbumID TEXT UNIQUE, Status TEXT, Type TEXT, ArtworkURL TEXT, ThumbURL TEXT, ReleaseID TEXT, ReleaseCountry TEXT, ReleaseFormat TEXT, SearchTerm TEXT, CriticScore TEXT, UserScore TEXT)')
# Format here means mp3, flac, etc.
c.execute(
'CREATE TABLE IF NOT EXISTS tracks (ArtistID TEXT, ArtistName TEXT, AlbumTitle TEXT, AlbumASIN TEXT, AlbumID TEXT, TrackTitle TEXT, TrackDuration, TrackID TEXT, TrackNumber INTEGER, Location TEXT, BitRate INTEGER, CleanName TEXT, Format TEXT, ReleaseID TEXT)')
Expand Down Expand Up @@ -583,6 +584,21 @@ def dbcheck():
except sqlite3.OperationalError:
c.execute('ALTER TABLE albums ADD COLUMN SearchTerm TEXT DEFAULT NULL')

try:
c.execute('SELECT CriticScore from albums')
except sqlite3.OperationalError:
c.execute('ALTER TABLE albums ADD COLUMN CriticScore TEXT DEFAULT NULL')

try:
c.execute('SELECT UserScore from albums')
except sqlite3.OperationalError:
c.execute('ALTER TABLE albums ADD COLUMN UserScore TEXT DEFAULT NULL')

try:
c.execute('SELECT Type from artists')
except sqlite3.OperationalError:
c.execute('ALTER TABLE artists ADD COLUMN Type TEXT DEFAULT NULL')

conn.commit()
c.close()

Expand Down
Loading

0 comments on commit c5ad7c9

Please sign in to comment.