From 1e0753c9e4e2dfd6ed7ccee1510c066a8777825c Mon Sep 17 00:00:00 2001 From: Rasmus Eeg Date: Thu, 8 Mar 2012 11:09:47 +0100 Subject: [PATCH] So much --- data/interfaces/default - Kopi/album.html | 128 ----- data/interfaces/default - Kopi/artist.html | 146 ----- data/interfaces/default - Kopi/base.html | 107 ---- data/interfaces/default - Kopi/config.html | 503 ------------------ data/interfaces/default - Kopi/extras.html | 13 - data/interfaces/default - Kopi/history.html | 85 --- data/interfaces/default - Kopi/index.html | 86 --- data/interfaces/default - Kopi/logs.html | 60 --- data/interfaces/default - Kopi/manage.html | 74 --- .../default - Kopi/manageartists.html | 82 --- data/interfaces/default - Kopi/managenew.html | 52 -- .../default - Kopi/searchresults.html | 70 --- data/interfaces/default - Kopi/shutdown.html | 13 - data/interfaces/default - Kopi/upcoming.html | 86 --- 14 files changed, 1505 deletions(-) delete mode 100644 data/interfaces/default - Kopi/album.html delete mode 100644 data/interfaces/default - Kopi/artist.html delete mode 100644 data/interfaces/default - Kopi/base.html delete mode 100644 data/interfaces/default - Kopi/config.html delete mode 100644 data/interfaces/default - Kopi/extras.html delete mode 100644 data/interfaces/default - Kopi/history.html delete mode 100644 data/interfaces/default - Kopi/index.html delete mode 100644 data/interfaces/default - Kopi/logs.html delete mode 100644 data/interfaces/default - Kopi/manage.html delete mode 100644 data/interfaces/default - Kopi/manageartists.html delete mode 100644 data/interfaces/default - Kopi/managenew.html delete mode 100644 data/interfaces/default - Kopi/searchresults.html delete mode 100644 data/interfaces/default - Kopi/shutdown.html delete mode 100644 data/interfaces/default - Kopi/upcoming.html diff --git a/data/interfaces/default - Kopi/album.html b/data/interfaces/default - Kopi/album.html deleted file mode 100644 index 1e38f419..00000000 --- a/data/interfaces/default - Kopi/album.html +++ /dev/null @@ -1,128 +0,0 @@ -<%inherit file="base.html" /> -<%! - from headphones import db, helpers - myDB = db.DBConnection() -%> - -<%def name="headerIncludes()"> -
- -
- - -<%def name="body()"> -
-

<- Back to ${album['ArtistName']}

-
- albumart -

${album['AlbumTitle']}

-

${album['ArtistName']}

-
- <% - totalduration = myDB.action("SELECT SUM(TrackDuration) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0] - totaltracks = len(myDB.select("SELECT TrackTitle from tracks WHERE AlbumID=?", [album['AlbumID']])) - try: - albumduration = helpers.convert_milliseconds(totalduration) - except: - albumduration = 'n/a' - - %> -

Tracks: ${totaltracks}

-

Duration: ${albumduration}

- %if description: -

Description:

- ${description['Summary']} - %endif -
-
- - - - - - - - - - - - %for track in tracks: - <% - if track['Location']: - grade = 'A' - location = track['Location'] - else: - grade = 'X' - location = '' - - if track['BitRate']: - bitrate = str(track['BitRate']/1000) + ' kbps' - else: - bitrate = '' - - try: - trackduration = helpers.convert_milliseconds(track['TrackDuration']) - except: - trackduration = 'n/a' - %> - - - - - - - - %endfor - <% - unmatched = myDB.select('SELECT * from have WHERE ArtistName LIKE ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']]) - %> - %if unmatched: - %for track in unmatched: - <% - duration = helpers.convert_seconds(float(track['TrackLength'])) - %> - - - - - - - - %endfor - %endif - -
#Track TitleDurationLocal FileBit Rate
${track['TrackNumber']}${track['TrackTitle']}${trackduration}${location}${bitrate}
${track['TrackNumber']}${track['TrackTitle']}${duration}${track['Location']}${int(track['BitRate'])/1000} kbps
-
-
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/artist.html b/data/interfaces/default - Kopi/artist.html deleted file mode 100644 index 164658a2..00000000 --- a/data/interfaces/default - Kopi/artist.html +++ /dev/null @@ -1,146 +0,0 @@ -<%inherit file="base.html"/> -<%! - from headphones import db -%> - -<%def name="headerIncludes()"> -
- -
- - -<%def name="body()"> -
-

${artist['ArtistName']}

- %if artist['Status'] == 'Loading': -

(Album information for this artist is currently being loaded)

- %endif -
-
-

Mark selected albums as - - -

- - - - - - - - - - - - - - - %for album in albums: - <% - if album['Status'] == 'Skipped': - grade = 'Z' - elif album['Status'] == 'Wanted': - grade = 'X' - elif album['Status'] == 'Snatched': - grade = 'C' - else: - grade = 'A' - - myDB = db.DBConnection() - totaltracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=?', [album['AlbumID']])) - havetracks = len(myDB.select('SELECT TrackTitle from tracks WHERE AlbumID=? AND Location IS NOT NULL', [album['AlbumID']])) + len(myDB.select('SELECT TrackTitle from have WHERE ArtistName like ? AND AlbumTitle LIKE ?', [album['ArtistName'], album['AlbumTitle']])) - - try: - percent = (havetracks*100.0)/totaltracks - if percent > 100: - percent = 100 - except (ZeroDivisionError, TypeError): - percent = 0 - totaltracks = '?' - - avgbitrate = myDB.action("SELECT AVG(BitRate) FROM tracks WHERE AlbumID=?", [album['AlbumID']]).fetchone()[0] - if avgbitrate: - bitrate = str(int(avgbitrate)/1000) + ' kbps' - else: - bitrate = '' - - %> - - - - - - - - - - - %endfor - -
NameDateTypeStatusHaveBitrate
${album['AlbumTitle']}${album['ReleaseDate']}${album['Type']}${album['Status']} - %if album['Status'] == 'Skipped': - [want] - %elif album['Status'] == 'Wanted': - [skip] - %else: - [retry][new] - %endif -
${havetracks}/${totaltracks}
${bitrate}
-
- - -<%def name="headIncludes()"> - - %if artist['Status'] == 'Loading': - - %endif - - -<%def name="javascriptIncludes()"> - - - diff --git a/data/interfaces/default - Kopi/base.html b/data/interfaces/default - Kopi/base.html deleted file mode 100644 index 7053f803..00000000 --- a/data/interfaces/default - Kopi/base.html +++ /dev/null @@ -1,107 +0,0 @@ -<% - import headphones - from headphones import version -%> - - - - - - - - - - - Headphones - ${title} - - - - - - - - - ${next.headIncludes()} - - - - -
-
- % if not headphones.CURRENT_VERSION: -
- You're running an unknown version of Headphones. Click here to update -
- % elif headphones.CURRENT_VERSION != headphones.LATEST_VERSION and headphones.INSTALL_TYPE != 'win': -
- A newer version is available. You're ${headphones.COMMITS_BEHIND} commits behind. Click here to update -
- % endif - - - -
- ${next.headerIncludes()} -
-
- -
- ${next.body()} -
- -
-
- Version: ${headphones.CURRENT_VERSION} - %if version.HEADPHONES_VERSION != 'master': - (${version.HEADPHONES_VERSION}) - %endif -
- -
-
- - - - ${next.javascriptIncludes()} - - - - - - - - -<%def name="javascriptIncludes()"> -<%def name="headIncludes()"> -<%def name="headerIncludes()"> diff --git a/data/interfaces/default - Kopi/config.html b/data/interfaces/default - Kopi/config.html deleted file mode 100644 index 09b3e014..00000000 --- a/data/interfaces/default - Kopi/config.html +++ /dev/null @@ -1,503 +0,0 @@ -<%inherit file="base.html"/> -<%! - import headphones -%> - -<%def name="headerIncludes()"> -
- -
- -<%def name="body()"> -
-

-

-
-
-

Web Interface

- - - - - - - - - - - - - - - - -
-

HTTP Host:

-
- i.e. localhost or 0.0.0.0 -
-

HTTP Username:

- -
-

HTTP Port:

- -
-

HTTP Password:

- -
-

Launch Browser on Startup:

-
-
-
-

Download Settings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

SABnzbd:

-
-

SABnzbd Host:


- - usually http://localhost:8080 -
-

SABnzbd Username:

-
-

SABnzbd API:

-
-

SABnzbd Password:

-
-

SABnzbd Category:

-
-

Music Download Directory:


- - Full path to the directory where SAB downloads your music
- i.e. /Users/name/Downloads/music
-
-

Use Black Hole:

-
-

Black Hole Directory:


- - Folder your Download program watches for NZBs -
-

Usenet Retention:

-
-



Torrent:

-
-

Black Hole Directory:


- - Folder your Download program watches for Torrents -
-

Minimum seeders:


- - Number of minimum seeders a torrent must have to be accepted -
-

Music Download Directory:


- - Full path to the directory where your torrent client downloads your music
- i.e. /Users/name/Downloads/music
-
-
-
-

Search Providers

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

SABnzbd:

-
-

NZBMatrix:

-
-

NZBMatrix Username:

- -
-

NZBMatrix API:

- -
-

Newznab:

-
-

Newznab Host:

-
- i.e. http://nzb.su -
-

Newznab API:

- -
-

NZBs.org:

-
- -

NZBs.org UID:

- - -
- -

NZBs.org Hash:

- - -
-

Newzbin:

-
-

Newzbin UID:

- - -
-

Newzbin Password:

- -
-

Torrent:


-
-

Isohunt:


-
-

Mininova:


-
-

Kick Ass Torrents:

-
-
-
-

Quality & Post Processing

- - - - - - - - - - -
-

Album Quality:


-

Highest Quality excluding Lossless

-

Highest Quality including Lossless

-

Lossless Only

-

Preferred Bitrate: - kbps

- Auto-Detect Preferred Bitrate -
-

Post-Processing:

-

Move downloads to Destination Folder

-

Rename files

-

Correct metadata

-

Delete leftover files (.m3u, .nfo, .sfv, .nzb, etc.)

-

Add album art as 'folder.jpg' to album folder

-

Embed album art in each file

-

Embed lyrics

-
-
- -

Path to Destination folder:

-
- i.e. /Users/name/Music/iTunes or /Volumes/share/music -
-
-
-

Advanced Settings

- - - - - - - - - - - -
-

Renaming Options:

-
-

Folder Format:


- Use: artist, album, year, releasetype and first (first letter in artist name)
- E.g.: first/artist/album [year] = G/Girl Talk/All Day [2010]
-

-

File Format:

-
- Use: tracknumber, title, artist, album and year -
-

Miscellaneous:

-
-

Automatically Include Extras When Adding an Artist

- (EPs, Compilations, Live Albums, Remix Albums and Singles) -

-

Interface: -

-

Log Directory:

-
-

Re-Encoding Options:

- Note: this option requires the lame or ffmpeg encoder -

-

Re-encode downloads during postprocessing

-
-
-

Only re-encode lossless files (.flac)

-
- <% - if config['encoder'] == 'lame': - lameselect = 'selected="selected"' - ffmpegselect = '' - else: - lameselect = '' - ffmpegselect = 'selected="selected"' - %> -

Encoder: - - Format:

-
- -

Audio Properties:

-
-

VBR/CBR: - - Quality:

- -
-

Bitrate: - - <% - if config["samplingfrequency"] == 44100: - freq44100 = 'selected="selected"' - freq48000 = '' - else: - freq44100 = '' - freq48000 = 'selected="selected"' - %> - Sampling:

-
-
-

Advanced Encoding Options:

-

- (ignores audio properties) -

- -
-

Path to Encoder:

-
-
-

Prowl Notification:


-

Enable Prowl Notifications


-
-

API key:



-

Notify on snatch?


-

Priority (-2,-1,0,1 or 2):

-
-
-

Muscbrainz Mirror: -

-
- -


- (Web Interface changes require a restart to take effect) - - - -<%def name="javascriptIncludes()"> - - diff --git a/data/interfaces/default - Kopi/extras.html b/data/interfaces/default - Kopi/extras.html deleted file mode 100644 index d9dbbe2f..00000000 --- a/data/interfaces/default - Kopi/extras.html +++ /dev/null @@ -1,13 +0,0 @@ -<%inherit file="base.html" /> -<%def name="body()"> -

-

Artists You Might Like

-
- -
-
- diff --git a/data/interfaces/default - Kopi/history.html b/data/interfaces/default - Kopi/history.html deleted file mode 100644 index ac7c4f6d..00000000 --- a/data/interfaces/default - Kopi/history.html +++ /dev/null @@ -1,85 +0,0 @@ -<%inherit file="base.html"/> -<%! - from headphones import helpers -%> - -<%def name="headerIncludes()"> -
- -
- - -<%def name="body()"> -
- History -
- - - - - - - - - - - - %for item in history: - <% - if item['Status'] == 'Processed': - grade = 'A' - elif item['Status'] == 'Snatched': - grade = 'C' - elif item['Status'] == 'Unprocessed': - grade = 'X' - else: - grade = 'U' - - fileid = 'unknown' - if item['URL'].find('nzb') != -1: - fileid = 'nzb' - if item['URL'].find('torrent') != -1: - fileid = 'torrent' - %> - - - - - - - - %endfor - -
Date AddedFile NameSizeStatus
${item['DateAdded']}${item['Title']} [${fileid}][album page]${helpers.bytes_to_mb(item['Size'])}${item['Status']}[retry][new]
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/index.html b/data/interfaces/default - Kopi/index.html deleted file mode 100644 index 83a594b6..00000000 --- a/data/interfaces/default - Kopi/index.html +++ /dev/null @@ -1,86 +0,0 @@ -<%inherit file="base.html"/> -<%! - from headphones import helpers -%> - -<%def name="body()"> - - - - - - - - - - - %for artist in artists: - <% - totaltracks = artist['TotalTracks'] - havetracks = artist['HaveTracks'] - if not havetracks: - havetracks = 0 - try: - percent = (havetracks*100.0)/totaltracks - if percent > 100: - percent = 100 - except (ZeroDivisionError, TypeError): - percent = 0 - totaltracks = '?' - - if artist['ReleaseDate'] and artist['LatestAlbum']: - releasedate = artist['ReleaseDate'] - albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate']) - if releasedate > helpers.today(): - grade = 'A' - else: - grade = 'Z' - elif artist['LatestAlbum']: - releasedate = '' - grade = 'Z' - albumdisplay = '%s' % artist['LatestAlbum'] - else: - releasedate = '' - grade = 'Z' - albumdisplay = 'None' - - if artist['Status'] == 'Paused': - grade = 'X' - - %> - - - - - - - %endfor - -
Artist NameStatusLatest AlbumHave
${artist['ArtistName']}${artist['Status']}${albumdisplay}
${havetracks}/${totaltracks}
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/logs.html b/data/interfaces/default - Kopi/logs.html deleted file mode 100644 index 98004034..00000000 --- a/data/interfaces/default - Kopi/logs.html +++ /dev/null @@ -1,60 +0,0 @@ -<%inherit file="base.html"/> -<%! - from headphones import helpers -%> - -<%def name="body()"> - - - - - - - - - - %for line in lineList: - <% - timestamp, message, level, threadname = line - - if level == 'WARNING' or level == 'ERROR': - grade = 'X' - else: - grade = 'Z' - %> - - - - - - %endfor - -
TimestampLevelMessage
${timestamp}${level}${message}
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/manage.html b/data/interfaces/default - Kopi/manage.html deleted file mode 100644 index cf5a476a..00000000 --- a/data/interfaces/default - Kopi/manage.html +++ /dev/null @@ -1,74 +0,0 @@ -<%inherit file="base.html" /> -<%! - import headphones - from headphones.helpers import checked -%> -<%def name="headerIncludes()"> -
- -
- - -<%def name="body()"> -
-

-

-
-

Scan Music Library


- Where do you keep your music?

- You can put in any directory, and it will scan for audio files in that folder - (including all subdirectories)

For example: '/Users/name/Music' -

- It may take a while depending on how many files you have. You can navigate away from the page
- as soon as you click 'Submit' -

-
- %if headphones.MUSIC_DIR: - - %else: - - %endif -
-

Automatically add new artists

-

-
-
- -
-

Import Last.FM Artists


- Enter the username whose artists you want to import:

-
- <% - if headphones.LASTFM_USERNAME: - lastfmvalue = headphones.LASTFM_USERNAME - else: - lastfmvalue = 'Last.fm Username' - %> - -


-
- -
-

Placeholder :-)


-

-
- -


-
- -
-

Force Search


-

Force Check for Wanted Albums

-

Force Update Active Artists

-

Force Post-Process Albums in Download Folder



-

Check for Headphones Updates

-
- \ No newline at end of file diff --git a/data/interfaces/default - Kopi/manageartists.html b/data/interfaces/default - Kopi/manageartists.html deleted file mode 100644 index 368d653c..00000000 --- a/data/interfaces/default - Kopi/manageartists.html +++ /dev/null @@ -1,82 +0,0 @@ -<%inherit file="base.html" /> - -<%def name="body()"> -
-

Manage Artists

-

-
-

- - selected artists - -

- - - - - - - - - - - %for artist in artists: - <% - if artist['Status'] == 'Paused': - grade = 'X' - elif artist['Status'] == 'Loading': - grade = 'C' - else: - grade = 'Z' - - if artist['ReleaseDate'] and artist['LatestAlbum']: - releasedate = artist['ReleaseDate'] - albumdisplay = '%s (%s)' % (artist['LatestAlbum'], artist['ReleaseDate']) - elif artist['LatestAlbum']: - releasedate = '' - albumdisplay = '%s' % artist['LatestAlbum'] - else: - releasedate = '' - albumdisplay = 'None' - %> - - - - - - - %endfor - -
Artist NameStatusLatest Album
${artist['ArtistName']}${artist['Status']}${albumdisplay}
-
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/managenew.html b/data/interfaces/default - Kopi/managenew.html deleted file mode 100644 index bea493b2..00000000 --- a/data/interfaces/default - Kopi/managenew.html +++ /dev/null @@ -1,52 +0,0 @@ -<%inherit file="base.html" /> -<%! - import headphones -%> -<%def name="body()"> -
-

Manage New Artists

-

Scan Music Library

-
-
-

- Add selected artists - -

- - - - - - - - - %for artist in headphones.NEW_ARTISTS: - - - - - %endfor - -
Artist Name
${artist}
-
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/searchresults.html b/data/interfaces/default - Kopi/searchresults.html deleted file mode 100644 index b02fedd6..00000000 --- a/data/interfaces/default - Kopi/searchresults.html +++ /dev/null @@ -1,70 +0,0 @@ -<%inherit file="base.html" /> - -<%def name="body()"> - -
-

Search Results

-

- - - - %if type == 'album': - - %endif - - - - - - - %if searchresults: - %for result in searchresults: - <% - if result['score'] == 100: - grade = 'A' - else: - grade = 'Z' - %> - - %if type == 'album': - - %endif - - - %if type == 'album': - - %else: - - %endif - - %endfor - %endif - -
Album NameArtist NameScore
${result['title']}${result['uniquename']}${result['score']}Add this albumAdd this artist
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file diff --git a/data/interfaces/default - Kopi/shutdown.html b/data/interfaces/default - Kopi/shutdown.html deleted file mode 100644 index be7ca21d..00000000 --- a/data/interfaces/default - Kopi/shutdown.html +++ /dev/null @@ -1,13 +0,0 @@ -<%inherit file="base.html"/> - -<%def name="headIncludes()"> - - - -<%def name="body()"> -
-
-

Headphones is ${message}

-
-
- \ No newline at end of file diff --git a/data/interfaces/default - Kopi/upcoming.html b/data/interfaces/default - Kopi/upcoming.html deleted file mode 100644 index 5c209056..00000000 --- a/data/interfaces/default - Kopi/upcoming.html +++ /dev/null @@ -1,86 +0,0 @@ -<%inherit file="base.html" /> -<%def name="body()"> -
-

Upcoming Albums

- - - - - - - - - - - - - %for album in upcoming: - - - - - - - - - %endfor - -
ArtistAlbum NameRelease DateTypeStatus
${album['ArtistName']}${album['AlbumTitle']}${album['ReleaseDate']}${album['Type']}${album['Status']}
-
- -
-

Mark selected albums as - - -

-
-

Wanted Albums

- - - - - - - - - - - - - %for album in wanted: - - - - - - - - %endfor - -
ArtistAlbum NameRelease DateType
- ${album['ArtistName']}${album['AlbumTitle']}${album['ReleaseDate']}${album['Type']}
- -
- - -<%def name="headIncludes()"> - - - -<%def name="javascriptIncludes()"> - - - \ No newline at end of file