Removed the exit status
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
# @Author: KevinMidboe
|
# @Author: KevinMidboe
|
||||||
# @Date: 2017-04-05 18:40:11
|
# @Date: 2017-04-05 18:40:11
|
||||||
# @Last Modified by: KevinMidboe
|
# @Last Modified by: KevinMidboe
|
||||||
# @Last Modified time: 2017-05-15 11:55:52
|
# @Last Modified time: 2017-06-01 19:02:04
|
||||||
import os.path, hashlib, time, glob, sqlite3, re, json, tweepy
|
import os.path, hashlib, time, glob, sqlite3, re, json, tweepy
|
||||||
import logging
|
import logging
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
@@ -90,7 +90,8 @@ class strayEpisode(object):
|
|||||||
return file
|
return file
|
||||||
|
|
||||||
def analyseSubtitles(self, subFile):
|
def analyseSubtitles(self, subFile):
|
||||||
f = open('/'.join([env.show_dir, self.parent, subFile]), 'r', encoding='ISO-8859-15')
|
# TODO verify that it is a file
|
||||||
|
f = open(os.path.join([env.show_dir, self.parent, subFile]), 'r', encoding='ISO-8859-15')
|
||||||
language = detect(f.read())
|
language = detect(f.read())
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
@@ -112,6 +113,9 @@ class strayEpisode(object):
|
|||||||
def notifyInsert(self):
|
def notifyInsert(self):
|
||||||
# Send unique id. (time)
|
# Send unique id. (time)
|
||||||
tweetObj = twitter()
|
tweetObj = twitter()
|
||||||
|
if self.showName is None:
|
||||||
|
message = 'Error adding ep: ' + self._id
|
||||||
|
else:
|
||||||
message = 'Added episode:\n' + self.showName + ' S' + self.season\
|
message = 'Added episode:\n' + self.showName + ' S' + self.season\
|
||||||
+ 'E' + self.episode + '\nDetails: \n https://kevinmidboe.com/seasoned/verified.html?id=' + self._id
|
+ 'E' + self.episode + '\nDetails: \n https://kevinmidboe.com/seasoned/verified.html?id=' + self._id
|
||||||
tweetObj.dm(message)
|
tweetObj.dm(message)
|
||||||
@@ -141,13 +145,12 @@ class strayEpisode(object):
|
|||||||
|
|
||||||
|
|
||||||
def getDirContent(dir=env.show_dir):
|
def getDirContent(dir=env.show_dir):
|
||||||
|
# TODO What if item in db is not in this list?
|
||||||
try:
|
try:
|
||||||
return [d for d in os.listdir(dir) if d[0] != '.']
|
return [d for d in os.listdir(dir) if d[0] != '.']
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
# TODO Log to error file
|
# TODO Log to error file
|
||||||
logging.info('Error: "' + dir + '" is not a directory.')
|
logging.info('Error: "' + dir + '" is not a directory.')
|
||||||
# TODO Remove this exit(0)
|
|
||||||
# exit(0)
|
|
||||||
|
|
||||||
# Hashes the contents of media folder to easily check for changes.
|
# Hashes the contents of media folder to easily check for changes.
|
||||||
def directoryChecksum():
|
def directoryChecksum():
|
||||||
|
|||||||
13
client/package.json
Normal file
13
client/package.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"name": "seasoned",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"repository": "https://github.com/KevinMidboe/seasonedShows",
|
||||||
|
"author": "Kevin Midboe",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"path": "^0.12.7",
|
||||||
|
"webpack": "^2.6.1",
|
||||||
|
"webpack-dev-server": "^2.4.5"
|
||||||
|
}
|
||||||
|
}
|
||||||
2269
client/yarn.lock
Normal file
2269
client/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@
|
|||||||
"request": "^2.81.0",
|
"request": "^2.81.0",
|
||||||
"python-shell": "^0.4.0",
|
"python-shell": "^0.4.0",
|
||||||
"moviedb": "^0.2.7",
|
"moviedb": "^0.2.7",
|
||||||
"node-cache": "^4.1.1"
|
"node-cache": "^4.1.1",
|
||||||
|
"request-promise": "^4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
seasoned.md
Normal file
1
seasoned.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
So to get people to sign up for a account could be to have them sign up for shows that they can be alerted when are added. They can choose by SMS, twitter, email or maybe newsletter.
|
||||||
@@ -27,7 +27,7 @@ $("#searchForm").submit(function(e) {
|
|||||||
url: url,
|
url: url,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
Materialize.toast('Verification successfully sent!', 4000);
|
Materialize.toast('Episode successfully verified and moved!', 4000);
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
Materialize.toast(data.responseJSON.error, 4000);
|
Materialize.toast(data.responseJSON.error, 4000);
|
||||||
|
|||||||
Reference in New Issue
Block a user