Skip to content

Commit

Permalink
Add anitomy-node as submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
0x61726b committed Sep 26, 2016
1 parent ae0841b commit 691e167
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Expand Up @@ -2,3 +2,7 @@
path = vendor/media-detect
url = https://github.com/arkenthera/media-detect
branch = master
[submodule "vendor/anitomy-node"]
path = vendor/anitomy-node
url = https://github.com/arkenthera/anitomy-node
branch = master
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -9,9 +9,10 @@

#Running

Use NPM to build and run Chiika.You will be greeted with login screen,there you can login with your account.Your user info and lists will be retrieved upon login. Media detection only works on Windows *for now*.
Use NPM to build and run Chiika.You will be greeted with login screen,there you can login with your account.Your user info and lists will be retrieved upon login.

```
git submodule update --init --recursive
npm install -g gulp bower
npm install
bower install
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.coffee
Expand Up @@ -277,7 +277,7 @@ do Your_Application_will_ = () ->

gulp.task('build', ['html', 'compile:scripts', 'packageJson', 'copy:fonts', 'misc','copy:vendor'])
gulp.task('test', ['inject:css', 'compile:scripts:not:watch', 'compile:styles', 'misc','copy:vendor'])
gulp.task 'serve', ['inject:css', 'compile:scripts:watch', 'compile:styles', 'misc','copy:vendor'], () ->
gulp.task 'serve', ['inject:css', 'compile:scripts:watch', 'compile:styles', 'misc'], () ->
development = null
development = Object.create( process.env );
development.CHIIKA_ENV = 'debug';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -8,7 +8,7 @@
"start": "electron .serve/main_process/chiika.js",
"test": "exit 0",
"preparetesting": "./node_modules/.bin/gulp test",
"postinstall": "cd vendor/media-detect && npm install && npm run conf && npm run rebuild"
"postinstall": "cd vendor/media-detect && npm install && npm run conf && npm run rebuild && cd ../anitomy-node && git submodule update --recursive --init && npm install && npm run conf && npm run rebuild"
},
"keywords": [
"electron",
Expand Down
2 changes: 1 addition & 1 deletion scripts/media.coffee
Expand Up @@ -43,7 +43,7 @@ module.exports = class Media
@chiika = chiika

if process.platform == 'win32'
AnitomyNode = require "#{mainProcessHome}/../vendor/anitomy-node/AnitomyNode"
AnitomyNode = require "#{mainProcessHome}/../vendor/anitomy-node"
Recognition = require "#{mainProcessHome}/media-recognition"

@recognition = new Recognition()
Expand Down
2 changes: 1 addition & 1 deletion scripts/torrents.coffee
Expand Up @@ -26,7 +26,7 @@ moment = scriptRequire 'moment'
_when = scriptRequire 'when'
string = scriptRequire 'string'
Recognition = require "#{mainProcessHome}/media-recognition"
AnitomyNode = require "#{mainProcessHome}/../vendor/anitomy-node/AnitomyNode"
AnitomyNode = require "#{mainProcessHome}/../vendor/anitomy-node"

NyaaSource = "http://www.nyaa.se/?page=rss&cats=1_37&filter=2"

Expand Down
8 changes: 7 additions & 1 deletion src/main_process/browser-extension-manager.coffee
Expand Up @@ -19,15 +19,21 @@ _assign = require 'lodash.assign'
_find = require 'lodash/collection/find'
_remove = require 'lodash/array/remove'
StreamServices = require './stream-services'
AnitomyNode = require '../vendor/anitomy-node/AnitomyNode'


module.exports = class BrowserExtensionManager
tabs: []
constructor: ->
@streamServices = new StreamServices()

if chiika.devMode
AnitomyNode = require '../../vendor/anitomy-node'
else
AnitomyNode = require '../vendor/anitomy-node'

@anitomy = new AnitomyNode.Root()


#
#
#
Expand Down
11 changes: 8 additions & 3 deletions src/main_process/media-detect-win32-process.coffee
Expand Up @@ -24,7 +24,6 @@ moment = require 'moment'
string = require 'string'

mdPath = __dirname + '/../vendor/media-detect'
anitomyPath = '../vendor/anitomy-node/AnitomyNode'


class Win32MediaDetect
Expand All @@ -42,15 +41,21 @@ class Win32MediaDetect

try
@md = require(mdPath)
@anitomy = require(anitomyPath)
if process.env.DEV_MODE
AnitomyNode = require '../../vendor/anitomy-node'
@anitomy = AnitomyNode
else
AnitomyNode = require '../vendor/anitomy-node'
@anitomy = AnitomyNode
catch error
obj = {}
Error.captureStackTrace(obj)
process.send(obj.stack)
throw "Media Detect Win32 child process has crashed."

@md = @md.MediaDetect()
@anitomy = new @anitomy.Root()

@anitomy = new AnitomyNode.Root()

try
crazyLoop = =>
Expand Down
7 changes: 5 additions & 2 deletions src/main_process/media-library-process.coffee
Expand Up @@ -26,8 +26,6 @@ path = require 'path'
fs = require 'fs'
MediaRecognition = require './media-recognition'

AnitomyNode = require '../vendor/anitomy-node/AnitomyNode'

process.on 'exit', ->
process.send "Exit"

Expand All @@ -45,6 +43,11 @@ class LibraryScanner
@libraryPaths = JSON.parse(process.argv[2])
@fileTypes = ['.mkv','.mp4']
@videoFiles = []

if process.env.DEV_MODE
AnitomyNode = require '../../vendor/anitomy-node'
else
AnitomyNode = require '../vendor/anitomy-node'
@anitomy = new AnitomyNode.Root()

@recognition = new MediaRecognition()
Expand Down
1 change: 1 addition & 0 deletions vendor/anitomy-node
Submodule anitomy-node added at abaab3

0 comments on commit 691e167

Please sign in to comment.