Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


anime fgts I gotta question (Solved)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam
View previous topic :: View next topic  
Author Message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Mon Jan 13, 2014 4:11 pm    Post subject: anime fgts I gotta question (Solved) Reply with quote

So, I love plex and want to use it more. However, I only really ever use it for anime. Now, plex is awesome in reading a file and grabbing all the proper metadata for your downloaded files. However, I absolutely hate downloading anime manually usually 1 episode at a time. Is there any way to automatically download anime for every existing episode, and every future episode? Kinda like sickbeard for usenet.

Note, if something like this exists, I'm not expecting it to be free.

The closest I found was lad1337's anime branch of sickbeard, but it doesn't work and hasn't been updated in ages

fuk u bitches, found mah solution

Back to top
View user's profile Send private message Send e-mail
puresick
Expert Cheater
Reputation: 3

Joined: 02 Jun 2008
Posts: 178

PostPosted: Wed Jan 15, 2014 2:59 am    Post subject: Reply with quote

So are you gonna tell us your solution?
_________________


Back to top
View user's profile Send private message
Fafaffy
Cheater
Reputation: 65

Joined: 12 Dec 2007
Posts: 28

PostPosted: Wed Jan 15, 2014 8:29 am    Post subject: Reply with quote

1. Get a usenet server
2. Get SABnzbd and set it up with your usenet server
3. Get a software called 'XDM' (made by lad1337)
3.5 Get Python 2.7.x
4. Open XDM, and on the plugins add these 2 repos:
- https://raw.github.com/groenlid/xdm-anime-plugin-repo/master/meta.json
- https://raw.github.com/lad1337/XDM-main-plugin-repo/develop/meta.json
5. With these 2 repos installed, install the following plugins:

Fanzub - indexer
Sabnzbd - Downloader
XEMNames - Search Term Filter
NZB - Download Type
Anime - Media Type Manager

Optional, but recommended:
Movie Quality - Download Filter
Episode Mover - Post Processor
Plex Notifier - Notifier



Once everything is all set up, go shut down XDM (there's a link at the bottom allowing you to do this), and go to your XDM folder.
From the XDM folder, navigate to:
Code:
plugins\PostProcessor\Episode-Mover-de_lad1337_tv_simplemover-0_5


You will see EpisodeMover.py and EpisodeMover.pyc

Delete EpisodeMover.pyc, and open up EpisodeMover.py

Replace whatever's inside your file with my code:
Code:
# Author: Dennis Lutter <[email protected]>
# URL: https://github.com/lad1337/XDM-main-plugin-repo/
#
# This file is part of a XDM plugin.
#
# XDM plugin.
# Copyright (C) 2013  Dennis Lutter
#
# This plugin is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This plugin is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see http://www.gnu.org/licenses/.

from xdm.plugins import *
from xdm import helper
import time
import fnmatch
import re
import shutil
import os
import errno

# http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python
def mkdir_p(path):
    try:
        os.makedirs(path)
    except OSError as exc: # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else: raise

class EpisodeMover(PostProcessor):
    identifier = 'de.lad1337.tv.simplemover'
    version = "0.5"
    types = ["de.uranime.anime"]
    _config = {'show_parent_path': "",
               'name_format': '{show_name}/Season {s#:0>2}/{show_name} - s{s#:0>2}e{e#:0>2} - {title}',
               }

    elementConfig = {'show_parent_path': 'show_parent_path',
                     'name_format': 'name_format'}

    screenName = 'Episode Mover'
    addMediaTypeOptions = False
    config_meta = {'plugin_desc': 'This will move the episode based on a format string, format string syntax http://docs.python.org/2/library/string.html#formatspec',
                   'name_format': {'desc': '{show_name}: the show name, {s#}: season number, {e#}: episode number, {title}: episode title'}
                   }

    _allowed_extensions = ('.avi', '.mkv', '.iso', '.mp4')

    def postProcessPath(self, element, filePath):
        self.e.getConfigsFor(element)
        if not self.e.show_parent_path:
            msg = "Destination path for %s is not set. Stopping PP." % element
            log.warning(msg)
            return (False, msg)
        # log of the whole process routine from here on except debug
        # this looks hacky: http://stackoverflow.com/questions/7935966/python-overwriting-variables-in-nested-functions
        processLog = [""]

        def processLogger(message):
            log.info(message)
            createdDate = time.strftime("%a %d %b %Y / %X", time.localtime()) + ": "
            processLog[0] = processLog[0] + createdDate + message + "\n"

        def fixName(name):
            return name.replace(":", " ")

        allEpisodeFileLocations = []
        if os.path.isdir(filePath):
            processLogger("Starting file scan on %s" % filePath)
            for root, dirnames, filenames in os.walk(filePath):
                processLogger("I can see the files %s" % filenames)
                for filename in filenames:
                    if filename.endswith(self._allowed_extensions):
                        if 'sample' in filename.lower():
                            continue
                        curFile = os.path.join(root, filename)
                        allEpisodeFileLocations.append(curFile)
                        processLogger("Found episode: %s" % curFile)
            if not allEpisodeFileLocations:
                processLogger("No files found!")
                return (False, processLog[0])
        else:
            allEpisodeFileLocations = [filePath]

        if len(allEpisodeFileLocations) > 1:
            processLogger("Sorry i found more then one file i don't know what to do...")
            return (False, processLog[0])

        processLogger("Renaming and moving episode")
        success = True

        curFile = allEpisodeFileLocations[0]
        processLogger("Processing episode: %s" % curFile)
        try:
            extension = os.path.splitext(curFile)[1]
            newFileRoute = u"%s%s" % (self._build_file_name(element), extension)
            processLogger("New Filename shall be: %s" % newFileRoute)

            dst = os.path.join(self.e.show_parent_path, newFileRoute)
            processLogger("Creating folders leading to %s" % dst)
            mkdir_p(os.path.dirname(dst))
            processLogger("Moving File from: %s to: %s" % (curFile, dst))
            shutil.move(curFile, dst)
        except Exception, msg:
            processLogger("Unable to rename and move episode: %s. Please process manually" % curFile)
            processLogger("given ERROR: %s" % msg)
            success = False

        processLogger("File processing done")
        # write process log
        logFileName = helper.fileNameClean(u"%s.log" % element.getName())
        logFilePath = os.path.join(filePath, logFileName)
        try:
            # This tries to open an existing file but creates a new file if necessary.
            logfile = open(logFilePath, "a")
            try:
                logfile.write(processLog[0])
            finally:
                logfile.close()
        except IOError:
            pass

        return (success, processLog[0])

    def _build_file_name(self, element):
        # '{show_name}/{s#}/{show_name} - s{s#}e{e#} - {title}'
        map = {"show_name": element.parent.title,
               "title": element.title,
               "s#": element.number,
               "e#": element.number,
               }
        name = self.e.name_format.format(**map)
        log.debug("build the name: %s with %s" % (name, map))
        return name


Next, go back to the XDM root folder and navigate to the:
Code:
xdm

folder. Inside, you'll see tasks.py and tasks.pyc, like before, delete tasks.pyc and open up tasks.py

Inside tasks.py, find:
Code:

def commentOnDownload(download):


Select everything below that line (up until the next def) and replace it with:

Code:
def commentOnDownload(download):
    for indexer in common.PM.I:
        if indexer.type != download.indexer or indexer.instance != download.indexer_instance:
            continue


There, now you're done. You'll have anime support with proper post-processing and auto-downloads new episodes.

_________________
Brillia wrote:
I FUCKING FUCK SEX
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Random spam All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites