Skip to content

Commit

Permalink
Updates to Music Support
Browse files Browse the repository at this point in the history
Header fields for the track list is now customizable.
  • Loading branch information
jakewaldron committed Feb 26, 2016
1 parent b2cf931 commit c8532c4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,18 @@ The config file is in the scripts folder. Before first run of the script, pleas
* filter_show_episodes - True to show recently added TV episodes
* filter_episodes_include - List of episodes to include (Anything that does not match perfectly will not be included)
* filter_episodes_excluse - List of episodes to exclude (Only titles that match perfectly will be excluded)
* filter_show_artists - True to show recently added TV artists
* filter_artists_include - List of artists to include (Anything that does not match perfectly will not be included)
* filter_artists_excluse - List of artists to exclude (Only titles that match perfectly will be excluded)
* filter_show_albums - True to show recently added albums
* filter_albums_include - List of albums to include (Anything that does not match perfectly will not be included)
* filter_albums_excluse - List of albums to exclude (Only titles that match perfectly will be excluded)
* filter_show_email_images - True to show images in the email
* filter_episode_thumbnail_type - Type of image to show for new TV Episodes - "episode", "season" or "show" (Defaults to episode)
* filter_libraries - A list of library names to filter out - ['Home Videos', 'Private']
* filter_sections_movies - Movie specific filters
* filter_sections_TV - TV specific filters
* filter_sections_Music - Music specific filters
* Possible fields: tagline, summary, content_rating, duration, year, rating, studio, tags_genre, tags_director, tags_star
* order - The order this field should appear for each title
* show - Whether or not this field should be shown for each title
Expand All @@ -170,10 +178,14 @@ The config file is in the scripts folder. Before first run of the script, pleas
* msg_shows_link - Header link text to go to new shows
* msg_seasons_link - Header link text to go to new seasons
* msg_episodes_link - Header link text to go to new episodes
* msg_artists_link - Header link text to go to new artists
* msg_albums_link - Header link text to go to new albums
* msg_new_movies_header - Section header text for new movies
* msg_new_shows_header - Section header text for new shows
* msg_new_seasons_header - Section header text for new seasons
* msg_new_episodes_header - Section header text for new episodes
* msg_new_artists_header - Section header text for new artists
* msg_new_albums_header - Section header text for new albums
* msg_footer - Footer text at the bottom of the page
* msg_no_new_content - Message to be displayed if no new content has been added

Expand All @@ -199,6 +211,20 @@ The config file is in the scripts folder. Before first run of the script, pleas
* season_sort_3 - Third Priority sort
* season_sort_3_reverse - Reverse the default sort

* artist_sort_1 - Highest priority sort
* artist_sort_1_reverse - Reverse the default sort
* artist_sort_2 - Second priority sort
* artist_sort_2_reverse - Reverse the default sort
* artist_sort_3 - Third Priority sort
* artist_sort_3_reverse - Reverse the default sort

* album_sort_1 - Highest priority sort
* album_sort_1_reverse - Reverse the default sort
* album_sort_2 - Second priority sort
* album_sort_2_reverse - Reverse the default sort
* album_sort_3 - Third Priority sort
* album_sort_3_reverse - Reverse the default sort

* episode_sort_1 - Highest priority sort
* episode_sort_1_reverse - Reverse the default sort
* episode_sort_2 - Second priority sort
Expand Down
8 changes: 7 additions & 1 deletion scripts/config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,13 @@ filter_sections_Music = {
},
'track_list':{
'order':12,
'show': True
'show': True,
'headerText':{
'trackNumber':'Track#',
'songName':'Song Name',
'artistName':'Artist(s)',
'duration':'Duration'
}
}

##Messages
Expand Down
4 changes: 2 additions & 2 deletions scripts/plexEmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,8 @@ def createWebHTML():
for section in sorted(sections.iteritems(), key=lambda t: t[1]['order']):
if (section[0] == 'track_list'):
if (sections[section[0]]['show']):
tracklistEmailText += '<br/><table width="100%" style="width: 100% !important"><tr><th align="left" style="text-align: left;">Track#</th><th align="left" style="text-align: left;">Song Name</th><th align="left" style="text-align: left;">Artists</th><th align="right" style="text-align: right;">Duration</th></tr><tr><td colspan="5"><hr></td></tr>'
tracklistHTMLText += '<br/><table width="100%" style="width: 100% !important"><tr><th align="left" style="text-align: left;">Track#</th><th align="left" style="text-align: left;">Song Name</th><th align="left" style="text-align: left;">Artists</th><th align="right" style="text-align: right;">Duration</th></tr><tr><td colspan="5"><hr></td></tr>'
tracklistEmailText += '<br/><table width="100%" style="width: 100% !important"><tr><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['trackNumber'] + '</th><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['songName'] + '</th><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['artistName'] + '</th><th align="right" style="text-align: right;">' + sections[section[0]]['headerText']['duration'] + '</th></tr><tr><td colspan="5"><hr></td></tr>'
tracklistHTMLText += '<br/><table width="100%" style="width: 100% !important"><tr><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['trackNumber'] + '</th><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['songName'] + '</th><th align="left" style="text-align: left;">' + sections[section[0]]['headerText']['artistName'] + '</th><th align="right" style="text-align: right;">' + sections[section[0]]['headerText']['duration'] + '</th></tr><tr><td colspan="5"><hr></td></tr>'
for track in albums[album]['tracks']:
tracklistEmailText += '<tr width="100%" style="width: 100% !important"><td width="5%" style="width: 5% !important" class="track_index">' + str(albums[album]['tracks'][track]['index']).decode('utf-8') + '</td><td width="35%" style="width: 50% !important" class="track_title">' + albums[album]['tracks'][track]['title'].decode('utf-8') + '</td><td width="30%" style="width: 35% !important" class="track_original_title">' + albums[album]['tracks'][track]['original_title'].decode('utf-8') + '</td><td width="15%" align="right" style="width: 15% !important; text-align: right;" class="track_duration">' + str(albums[album]['tracks'][track]['duration']).decode('utf-8') + '</td></tr>'
tracklistHTMLText += '<tr width="100%" style="width: 100% !important"><td width="5%" style="width: 5% !important" class="track_index">' + str(albums[album]['tracks'][track]['index']).decode('utf-8') + '</td><td width="35%" style="width: 50% !important" class="track_title">' + albums[album]['tracks'][track]['title'].decode('utf-8') + '</td><td width="35%" style="width: 30% !important" class="track_original_title">' + albums[album]['tracks'][track]['original_title'].decode('utf-8') + '</td><td width="15%" align="right" style="width: 15% !important; text-align: right;" class="track_duration">' + str(albums[album]['tracks'][track]['duration']).decode('utf-8') + '</td></tr>'
Expand Down

0 comments on commit c8532c4

Please sign in to comment.