aboutsummaryrefslogtreecommitdiff
path: root/_plugins
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-12-28 23:05:29 -0300
committerEuAndreh <eu@euandre.org>2020-12-28 23:05:48 -0300
commit5c7f2392b0325069fbb1ea431fbc01f0864f6f04 (patch)
treefae46da449a0961b06e9614e22a0e07c25c1733f /_plugins
parentTODOs.org: Mark 1a2f5619-5d55-449f-a401-8c87afd5bea9 as done (diff)
downloadeuandre.org-5c7f2392b0325069fbb1ea431fbc01f0864f6f04.tar.gz
euandre.org-5c7f2392b0325069fbb1ea431fbc01f0864f6f04.tar.xz
Add description per language to video files
Diffstat (limited to '_plugins')
-rw-r--r--_plugins/linter.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/_plugins/linter.rb b/_plugins/linter.rb
index aa568bb..dd51e3b 100644
--- a/_plugins/linter.rb
+++ b/_plugins/linter.rb
@@ -154,6 +154,7 @@ module Jekyll
slug = document.data['slug']
ext = MEDIA_EXTENSION[name]
file = "resources/#{name}/#{date}-#{slug}.#{ext}"
+ feed_name = site.config['t'][name]['feed']['title'][document.data['lang']]
if name == 'podcasts'
stdout = `metaflac --export-tags-to=- #{file}`.strip.split("\n")
expected = [
@@ -161,7 +162,7 @@ module Jekyll
'ARTIST=EuAndreh',
"DATE=#{date}",
"TITLE=#{document.data['title']}",
- "ALBUM=#{site.config['t']['podcasts']['feed']['title'][document.data['lang']]}"
+ "ALBUM=#{feed_name}"
]
expected.each do |metadata|
unless stdout.include? metadata
@@ -180,7 +181,7 @@ module Jekyll
end
elsif name == 'screencasts' then
stdout = `mediainfo #{file} | awk -F: '/^Movie name/ { print $2 }'`.strip
- expected = document.data['title'] + ' - EuAndreh'
+ expected = document.data['title'] + ' - ' + feed_name
unless stdout == expected then
escaped_title = expected.gsub(/'/, "'\"'\"'")
add_metadata_cmd = "mkvpropedit '#{file}' -e info -s title='#{escaped_title}'"