Browse Source

Merge pull request #7316 from clinton-hall/imdb-8

Add Imdb 8 digit
pull/7291/head
Ruud Burger 5 years ago
committed by GitHub
parent
commit
e6e0a56c41
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      couchpotato/core/helpers/variable.py
  2. 2
      couchpotato/core/plugins/userscript/template.js_tmpl

2
couchpotato/core/helpers/variable.py

@ -194,7 +194,7 @@ def getImdb(txt, check_inside = False, multiple = False):
output.close() output.close()
try: try:
ids = re.findall('(tt\d{4,7})', txt) ids = re.findall('(tt\d{4,8})', txt)
if multiple: if multiple:
return removeDuplicate(['tt%07d' % tryInt(x[2:]) for x in ids]) if len(ids) > 0 else [] return removeDuplicate(['tt%07d' % tryInt(x[2:]) for x in ids]) if len(ids) > 0 else []

2
couchpotato/core/plugins/userscript/template.js_tmpl

@ -100,7 +100,7 @@ var osd = function(){
// Try and get imdb url // Try and get imdb url
try { try {
var regex = new RegExp(/tt(\d{7})/); var regex = new RegExp(/tt(\d{8})/);
var imdb_id = document.body.innerHTML.match(regex)[0]; var imdb_id = document.body.innerHTML.match(regex)[0];
if (imdb_id) if (imdb_id)
iframe.setAttribute('src', createApiUrl('http://imdb.com/title/'+imdb_id+'/')) iframe.setAttribute('src', createApiUrl('http://imdb.com/title/'+imdb_id+'/'))

Loading…
Cancel
Save