Git Product home page Git Product logo

cooperdk / yapo-e-plus Goto Github PK

View Code? Open in Web Editor NEW
143.0 9.0 15.0 9.36 MB

YAPO e+ - Yet Another Porn Organizer (extended)

Home Page: https://github.com/cooperdk/YAPO-e-plus

License: GNU General Public License v3.0

Python 46.46% HTML 7.16% Dockerfile 0.03% Batchfile 0.01% Shell 0.11% JavaScript 42.55% CSS 3.33% Ruby 0.01% PowerShell 0.03% Less 0.16% CoffeeScript 0.16%
porn porn-organizer pornography actor-library video-library video-organizer video-tagging tagging actor-tagging video-hashing

yapo-e-plus's Introduction

YAPO e+

Yet Another Porn Organizer (extended plus)

The YAPO website is (still) coming soon, but look at how nice it looks at http://www.porn-organizer.org!

For information about updates, please refer to CHANGELOG

If you don't want to mess with Python and all the dependencies, there is an installer (Windows 10 64-bit) located here: https://github.com/cooperdk/YAPO-e-plus/releases. It may not include newer commits, please check the changelog and you can manually update the YAPO code after installation.

This is a heavily changed fork of the original YAPO on which originally planned features have been added, such as in-browser playback, actual scene scraping (plugged into API's), automatic website recognition and more actor discovery options. Find the original readme at the bottom (delimited with a line of "=" signs).

There is a setup available for an easy install. On the releases page, there is a "Getting Started" guide which also includes setup instructions.

There's also a Docker image which is described further down.

A copy of the setup with pre-registered actors, websites and tags (thousands of them) is available. It will be available on Patreon shortly. Until then, contact me here to gain access to it.

Requirements: FFMPEG, VLC (for out-of-browser playback, if you prefer that or if you have many .wmv videos, which the HTML5 player will not play) and Python 3.7+ installed. If you use the installer, nothing is needed since it will all be taken care of.

If something is not working, it is generally enough to make sure all dependencies are installed. Please consult step 3 and 4 under "Installation and upgrade instructions" below. If this doesn't work, register an issue.

I have a tool that will help you with flattening your porn clips directories down to main dirs. Check it out here.

Discuss and share on Discord: https://discord.gg/T6ybX4vs8u

NEW FEATURES:

(This list ceased to receive updates in August 2020. New functions are described above. For smaller additions and changes, please read the CHANGELOG)

  • Automatic scene discovery (with TpDB). This will automatically rename your scene titles if you allow it. Will also automatically connect actors to scenes (auto-addition of non-existing actors, websites and tags to come).

  • Streaming scene playback from within YAPO e+ (with working seek bar). There is no thumbnail based seek function (yet).

  • Working dockerfile

  • Contact sheets. These are generated in each scene's folder under videos/media/scenes. They can be displayed by clicking the appropriate button on the scene detail view.

  • Layout change. An update to Bootstrap and a new, darker design for YAPO. Bootstrap 4 will be implemented later.

  • Ready for focused actor photo searching (Google), feature to be added later.

  • Exclusions now available for scene tags, actor tags and websites. You can now enter any words that shouldn't trigger a website or actor tag, a website or it's aliases. For example, the word "floral" in the filename would trigger a tag named "oral" - by excluding "floral" you can prevent this). Another example is the fact that there is a website named "Stepsiblings Caught" and another one just named "Stepsiblings". By adding "Stepsiblings" in the exclusion list for "Stepsiblings Caught", the system will not incorrectly register the website "Stepsiblings" for a file that should only be registered to "Stepsiblings Caught".

  • Now supports the new Freeones site layout. The scraper now shows a progress bar for each actor scrape. Also, it is now based on XPATHs and therefore easier to update.

  • As mentioned, YAPO now offers website/producer logos in the website view, if the website and logo has been scraped.

  • New Python module requirements, it may be necessary to upgrade your modules.

  • On startup, the total disk usage for the video collection and other information is reported. Also, the database is backed up and your actor collection is exported to a text file in the main YAPO dir.

  • YAPO e+ will now strip the measurements field for a bra cup size, tag the actor with the cup size, and also tag with a breast size grouping (fx large or huge). It will also tag an actor based on height. Actors of normal height (161-178 cm) won't be tagged.

  • Tatto information shows up in the actor details, and a group tag for tattoo amounts is added.

  • A field has been added to register information about piercings. In addition, typical types of piercings are sent to the actor tags.

  • YAPO e+ scrapes actor information from IMDB first (best biographies), then from TMDB (next best profiles and best profile pictures) and then from Freeones (best all-round information). If there's a photo in the system and it's taken from TMDB or added by the user, the system no longer downloads a new one, even if you force scrape to update the actor. This also ensures that your manually added photos won't be overwritten. A button will be added later, so you can delete the profile photo.

  • YAPO e+ hashes all scenes and adds the hash to the scenes table. This will make it easier and faster to discover scenes with TpDB, when they start supporting it. When requested in settings, it will perform a dupe check after confirmation, and delete all duplicates so only one copy remains.

  • A lot of uninteresting console log text has been silenced.

COMING NEXT:

  • Soon: Automated importing of Trizkat's actor photo library
  • More scrapers
  • Experimental scene scraping

PLANNED:

  • Photo gallery section
  • DVD section
  • Additional actor photos (up to 5)
  • Function to move all videos belonging to a website or actor so that they reside in the same folder and an ability to set this automatically
  • An API for videohashes, tags and actors to avoid hundreds of people re-inventing the wheel

Maintenance/management parameters (both for Github and compiled)

For the compiled version of YAPO, you must run these with "yapo-maintenance " instead of "python manage.py ".

get-clean-titles

This will get clean scene titles from TpDB, which are needed for the scene filename renamer (may consume some time).

mark-scenes

This command will update scenes with TpDB registrations by setting a field in the database to True.

convert-tags

This converts the old YAPO TpDB tags (TpDB: Scanned: True, TpDB, Match: Good, etc) by setting fields in the database (this is time consuming, 0.5-1 seconds per scene).

makemigrations and migrate

These commands, which are built into Django, are required to update the database schema. You will use it often, unless you use the compiled version of YAPO in which these functions are run by starting a separate program ("yapo-maintenance" without any parameters). The commands are no longer needed to initialize a new database - YAPO will do that for you.

shell

If you know what you're doing, this parameter will start a Python shell with the Django environment set up. You can import the database models and work directly with them, but you should know what you're doing.

Installation and upgrade instructions

Local install

If you don't know much about Python or getting this kind of stuff to work, you may want to turn to my compiled version of YAPO instead. Look under "releases" here on Github, or visit http://www.porn-organizer.org for the latest release.

  1. Get a copy of YAPO onto your computer. Either by downloading the zip, by getting the docker image, or by cloning from git. The docker image will require some work to setup, since every video folder must be mounted in the container.

  2. Clone the git branch of your choice - master or develop. Do this by doing:

    git branch -b <master or develop>

    git clone -b https://github.com/cooperdk/YAPO-e-plus.git <install dir>

    The install dir should preferrably be in the root of a drive, e.g. \YAPO (Windows) or /YAPO (Linux).

    You can also just download the branch of your choice by selecting that branch on the Github page, and pressing the green "Clone" button and then clicking "Download zip".

    • Linux specific:

      Install FFMPEG using your package manager, or compile it. It should be as complete as possible, with H.264/H.265, AAC, MP3 etc. Personally, I compile it myself but you can use this package (John makes it available for all platforms, even ARM). After following the directions on the page, just do apt-get install ffmpeg and you have a copy with all the libraries you're ever going to need.

    • Windows specific:

      YAPO will download a copy of FFMPEG if you don't have one in the videos/ffmpeg folder. Or you can compile it yourself or download a copy here (or compile it yourself) and move ffmpeg.exe, ffplay.exe and ffprobe.exe in the archive's bin/ folder to the subfolder videos/ffmpeg in the YAPO e+ root folder. On Windows, YAPO looks for them there and only there. This binary includes everything needed by YAPO. I advise you to update it regularly, Zeranoe builds new versions all the time.

  3. Install all Python dependencies by executing:

    pip install -r requirements.txt

    from the main YAPO e+ folder. This installs Django and all of the other required libraries in their minimum required versions.

  4. Since the YAPO e+ models occasionally change, it may be necessary to migrate.

    1. Prepare database migration:

      python manage.py makemigrations

      These commands will look over the new code and create scripts to make the adjustments to the database.

    2. Execute the database migration scripts:

      python manage.py migrate

      This will actually make the adjustments to the database it took note of in the previous step.

  5. You can now start YAPO.

    python manage.py

    if you have configured a hostname/IP and port in settings.yml (or in the Settings tab in the UI), or

    python manage.py runserver <ip>:<port> --noreload

    if you wish to have control over the IP and port you want outside of the configuration settings.

    If you have configured an IP and port in settings, YAPO will start in a new browser tab. If you want to avoid this, set the IP/port to "no" or something similar.


Runtime issues and installation problems

If you get this error when you're done:

"You are trying to add a non-nullable field 'date_added' to folder without a default; we can't do that (the database needs something to populate existing rows)."

When asked to select a fix, select option 1 and type in datetime.datetime.now() and press enter.

If you need more help installing the software, first look towards the end of this document (the old author's README), there's a section named "Installation". Only if you really have difficulties, register an issue on Github. I will offer installation help, by mail or through Teamviewer, for a coffee donation.

If you get errors other that any of the above, try to do:

python manage.py migrate --fake

(or yapo-maintenance migrate --fake for the compiled release)

or, replace fake with fake-initial if you don't have a db.sqlite3 database file in your main YAPO e+ folder

You can secure a copy of your database with the command:

python manage.py dumpdata --indent=4 > database.json

Which will export your database tables to json format. You can then import it after executing step 1 and 2 above to generate a new database with the command:

python manage.py loaddata database.json --ignorenonexistent

Once again, replace python manage.py with yapo-maintenance for the compiled build.

If you have any issues with this, I will fix your database for a small donation. There are sometimes problems due to Django's way of updating databases. Typically, it is due to primary keys in built-in tables.

Running YAPO in a Docker environment

Note: I am looking for help in setting this up for ARM and for generally making it work as intended. I am getting somewhere, but the Docker image available may not be current, due to occasional issues.

To do this, you will need a working Docker installation (on Windows, only Docker Desktop is supported, since I had no luck in connecting to my Docker Toolbox environment).

Get the release by doing:

docker pull cooperdk/yapo-eplus

And run it with:

docker run -i -t -p 8000 cooperdk/yapo-eplus

The -i argument is needed if YAPO needs to ask you a question, and the -t argument makes sure that you have TTY abilities for your session. The Docker image is defaulted to serve on port 8000, which is why it has to be opened with the -p argument. To change the port, you need to first setup YAPO in your container, and then edit the config/settings.yml file (which should now be where you've configured it on your host) and edit the "yapo_url" variable. DO NOT CHANGE THE SPACING in settings.yml as YAML is very particular about this. After that, you can run Docker with the port argument that you want.

The database should be setup the first time you run the environment. After that you should be able to run it in headless, but a terminal output is still recommended while YAPO is in development, as much feedback is only given in the terminal at this point.

Adding directories as volumes

After the above command, you can add the parameter -v "":

The directory on your computer must be quoted if there's a space in it. Windows directories should be typed with forward slashes instead of backslashes. I recommend that you configure the database, the data folder and the config folder as a volume on your host, and your media directories within the Docker container in a subdirectory named "clips", so for example (on Windows):

docker run -i -t -p 8000 cooperdk/yapo-eplus -v "(host-yapo-dir)/database":/YAPO/database -v "(host-yapo-dir)/data":/YAPO/data \-v "(host-yapo-dir)/config":/YAPO/config -v "/d/shared videos/porn/2020":/clips/2020

Note that your D:/ drive becomes /d/ in Docker.

This might be easier to setup with a docker-compose file. I will provide one ASAP.

Within YAPO, you then register the /clips/2020 directory as your clips directory (and so on, for each directory with clips).

You can add as many volume arguments as you need.

The docker image is built on a Debian system. Please read up on the above if you're not sure what I mean. If you need support for this, I offer my help for a donation.

Enjoy!

For visual help setting up your YAPO system, I am preparing guides and tips. You can find a (not necessarily current) "getting started" guide on the releases page.

This concludes this document. Below you'll find the document created by the author of YAPO redux, which was forked from the original YAPO.


YAPO

YAPO - Yet Another Porn Organizer

Greetings fellow pervs!

YAPO is a software I made to organize and manage porn collections. It's not finished yet, but if you want to try it anyway, at the bottom of the page there are videos that will have you running YAPO in less than 15 minutes. There are also screenshots at the bottom of the page as well.

Demo/Tutorial video of YAPO usage:

IMAGE ALT TEXT HERE

Background

About a year ago an EMP (Empornium) user named ''julesx'' created an app called Pornganizer. It's basically a cataloging software fine tuned for cataloging porn. It has actors, tags, websites etc. I thought it was a wonderful idea, because in my mind, the first and most limiting factor in any collection is the extent to which the collector is aware of it.

For example: Let's say you may have a collection of 300 clips but you don't really remember or are not aware of what each one contains. So let's say you want to watch a clip with a redhead, your collection may have 50 clips with redheads in them, but you are limited only to the clips that you remember having redheads in them which is a fraction of that number. So effectively you don't have a collection of 300 clips, you only have a collection of the clips you are aware of, unless you actively go though your clips each time you want to watch something OR if you use a cataloging software like Pornganizer.

If you do use a cataloging software, you can just tag all the 'redhead' clips with the appropriate tag and whenever you want to watch a redhead clip, you just click that tag and you have all of the clips that contain redheads, immediately.

Of course the benefits of cataloging and tagging don't end there, you can have multiple tags on multiple actors and multiple categories so your queries could become extremely specific like: "redheads who have green eyes and were born after 1990 and are taller than 160 cm".

Another benefit of such a software is that it stores all the entries in a database and not in a folder structure. Imagine that you have 2 folders, one for Stoya and one for James Deen. It's entirely possible that there are scenes in the Stoya folder that have both Stoya and James Deen in them but are missing from the James Deen folder, so when you go to the James Deen folder, you miss out on all those scenes. In a cataloging software on the other hand, when you search for Stoya, you get all the scenes that are tagged with her name, across all folders and drives.

There are more benefits to cataloging, but I think you can get the picture.

So I started to use Pornganizer and it was great, but I had a few issues with it. The most pressing one for me as a software student was that its code was closed source for some reason. So every time I had an idea of how to improve it, instead of downloading the code and making modifications I had to try and convince the developer to add those changes. Another thing, is that Pornganizer is for Windows only.

So I decided that I'll make my own Pornganizer, with Blackjack and hookers.

What is YAPO?

Basically YAPO is a product of me wanting to learn Python and wanting to create a cataloging software similar to Pornganizer. Two birds, one stone... I thought. Ironically enough, as of writing this YAPO can't do any of the things I wanted ''julesx'' to put in Pornganizer, YET.

I chose to implement the whole thing as a web app that runs on a local server. My vision was it being a kind of a Netflix thing. So I used Python's Django as the server and AngularJS as the client.

I hope some people who know Python, HTML, AngularJS and CSS will find it interesting enough to add some code of their own to this. I'm really crap at CSS and styling that is why YAPO's interface leaves a lot to be desired. But the good thing is that the interface is just CSS and HTML and anyone with even the most rudimentary CSS/HTML knowledge can add something, and make it better.

What can YAPO do as of now?

  • It can import scenes to it's database and create screenshots for them (later I want to make an option to create a screenshot contact sheet like we have on EMP (Empornium) for each torrent, and for the user to be able to open the video at the specific time where he/she clicks on the contact sheet).

  • It can optionally create a sample video for the imported scenes, a sample is about 10MB in size and is between 30 and 90 seconds long. For now the length and the number of segments of the sample videos are extrapolated from the source duration, but eventually the user will be able to make their own sample videos.

  • It can tag actors, websites and tags for the scenes, and for actors.

  • It can navigate folders (the folders that were added to the database)

  • It can scrape actor information from TMDb and freeones.com

  • And other things I don't remember or can't articulate...

What are the limitations of YAPO?

Due to the limitation of web-apps it's currently impossible to play the videos inside the browser window (though it will be possible in the future using ffmpeg to transcode the video, exactly in the way Emby Media Center does it). Right now YAPO can only show the sample videos inside the browser window and relies on an external player (VLC) to play the full scenes, (just like Pornganizer).

What is YAPO's potential in the future?
  • Well, because it's a local server, it can do neat things. For instance it can be accessed from your phone over the local network. Actually not only phones, anything with a browser. Though my main goal right now is not making YAPO mobile-friendly, but because the client side is built with AngularJS and HTML bootstrap it's kind of mobile-friendly already.

  • Again, because it's a client-server thing, in the future it will be possible to cast video streams to other devices. It can even be possible over the Internet, not only on the local network. Kind of like your own personal Pornhub.

  • Though the reliance on VLC is a drawback for now, it's possible to do pretty nifty things with the VLC player, for example it's possible to create a video wall, programmatically opening up 4 VLC players simultaneously.

  • I want to also add support for image sets.

Screenshots:

Scene Detail view:

alt text

Actor List view (all the meta-data you see here like height, nationality and so on is tagged automatically from TMDb and Freeones without manual input):

alt text

Actor Detail view (an example of adding an actor tag, all the red fields are editable and can be changed by the user):

alt text alt text alt text

Folder view:

alt text

Currently YAPO is under heavy development and as far as I see it, it's not anywhere near being ready for end user distribution mainly because of the slightly tedious installation process. In the end I want it to be 1 portable .EXE for Windows and whatever executable Linux and Mac OS use. But for now if you want to try it, there are a few hoops you need to jump through, namely install the dependencies and download the code from GitHub. It's not as hard as it seems and it takes less than 15 minutes to set everything up, though I understand if people find it intimidating.

Installation:

I made a few videos that describe exactly what you need to do if you want to try YAPO out:

YAPO's dependencies:

IMAGE ALT TEXT HERE

YAPO's dependencies are:

YAPO installation:

IMAGE ALT TEXT HERE

(Watch the video above for a walkthrough of the installation.)

  1. Create a virtual environment for YAPO's installation.
  2. With the virtual environment activated, create a folder for YAPO and pull it from Git: C:\YAPO\> git clone https://github.com/cooperdk/YAPO-e-plus.git
  3. Install YAPO dependencies: pip install -r requirements.txt
  4. Install Node.js & npm and use it to install bower: npm install -g bower
  5. Navigate to C:\YAPO\videos\static\bower and install JS dependencies by running: bower install
  6. Create YAPO database from C:\yapo\YAPO run: python manage.py migrate
  7. Prepare ffmpeg
    1. (On Windows) Place ffmpeg.exe and ffprobe.exe in the C:\YAPO\videos\ffmpeg folder
    2. (On Debian-based Linux distros) Install ffmpeg using package manager: sudo apt update && sudo apt install ffmpeg
  8. Start the server from C:\YAPO run: python manage.py runserver 127.0.0.1:8000

PS: A few words about non-Windows OSes. YAPO is made using Python and JavaScript, both are OS agnostic. That being said, I only tested it on Windows and even though it should work on Linux and Mac, I think minor changes to the code needs to be made for it work just as well as on Windows. Specifically changes to functions using VLC and FFMPEG. I would be very happy if people running Linux or Mac would test it out and report back.

Update instructions:

YAPO is a WIP (work in progress) and as such the code will change often, to sync with the latest changes on Git this is what you have to do:

(py3virtualenv) C:\YAPO\> git pull This will pull the latest updates for YAPO from the Git repository.

(py3virtualenv) C:\YAPO\> python manage.py makemigrations This will look over the new code and take note of the adjustments that needs to be made to the database.

(py3virtualenv) C:\YAPO\> python manage.py migrate This will actually make the adjustments to the database it took note of in the previous step.

(In this case py3virtualenv is the name of your virtual environment and C:\YAPO is your YAPO install dir )

Notes:

When updating YAPO, if you get the following error:

> You are trying to add a non-nullable field **'date_added'** to folder without a default; we can't do that (the database needs  something to populate existing rows).

> Please select a fix:
 1) Provide a one-off default now (will be set on all existing rows)
 2) Quit, and let me add a default in models.py
 Select an option:

You should select option 1 and type in datetime.datetime.now() and press enter.


yapo-e-plus's People

Contributors

bikkmakk86 avatar cooperdk avatar curtwagner1984 avatar dependabot[bot] avatar sjclayton avatar team-yapo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

yapo-e-plus's Issues

Videos in Subfolders

Please add function for scan not only videos in one folder but search all videos with subfolders in selected folders.

Contact Sheet generation fails

Getting an error when scanning:

"Generating Contact Sheet (1024 px wide, grid: 4x4...
Processing M:\Alice Bell - gush.iscreamgirls.14.08.06.alice.bell.mp4...
[ERROR] Could not find 'ffprobe' executable. Please make sure ffmpeg/ffprobe is installed and is in your PATH.
Error creating contact sheet!"

ffprobe.exe exists in C:\YAPO\videos\ffmpeg and lauches correctly from the command line (without any errors, i mean)

Parsing certain website names before scanning (addScenes.py)

Some websites use abbreviations which result in bad parsing.
For example, FF#### was used for Facial Fest and bb#### are used by Bang Bus.

These website abbreviations naturally cause a lot of bad parse results where any scene with "ff" or "bb" in the scene title result in a false positive for these websites.
It is possibly only if another website is not already found for scenes.

Still, it's necessary to parse website where this isssue is known to arise.

It's already possible by adding exclusions, but then the site won't be attached to the website it's supposed to.

Describe the solution you'd like

A parser that handles all known problematic abbreviations, They are probably already available in the PhoenixAdult code.

400 Error When Scraping TPDB

Whenever I try to scan a scene using the TPDB the following appears -

[WARN!] api.metadataapi.net returns an unexpected reply code: 400

  • and the scan does not take place.

Freeones scraper broken

The Freeones scraper is currently broken.

Steps to reproduce the behavior:

  1. Go to an actor or perform a full actor scrape from the Settings
  2. No actor information will be found on Freeones.

The scrape should be performed, but Freeones.com just updated their website layout. For this reason. YAPO e+ will not scrape any information from Freeones until this is fixed.

A fix is on the way and expected to be pushed to Git on Monday 18th May in the evening CET.

FFMPEG download fails on initial run

I can only assume this is because you are redoing your website, but the initial run tries to pull FFMPEG and fails.

error:

"I am going to install a copy of FFPMEG (4.3.1 static, YAPO build).
It will be placed at C:\YAPO\videos\ffmpeg
Press enter to acknowledge... >
Getting https://porn-organizer.org/dl/ffmpeg-latest.zip...
Downloading...
Copying ffmpegC:\YAPO\videos\ffmpeg\https:\porn-organizer.org\dl\ffmpeg-latest\bin\ffmpeg.exe
An error occured, please download FFMPEG manually from the above link
and place it in C:\YAPO\videos\ffmpeg
YAPO will exit now. Press enter to acknowledge... >"

Sort order goes back to "Name Ascending" when reloading page.

When navigation to or reloading a page (whether that's scenes, actors etc.) the sort order resets to "Name Ascending" but the drop down list will still display your last sort option.

For example, if I sort my scenes by "Date Added Descending" and then click on the actors tab and then go back to the scenes tab, the sort setting dropdown will still say "Date Added Descending" but it's actually sorting by "Name Ascending". In order to re-sort by "Date Added Descending" I have to choose a different option in the dropdown then change it right back.

[Feature Request] Open Folder also selects the file in explorer

I use a fairly flat folder structure for a large collection of movies. Opening a scene straight from YAPO in VLC is functional, but I prefer the freedom to chose other players that are already available in Explorer’s Context Menu. The Open Folder button in the scene opens the flat folder, and then I have to manually find the file. I don’t use the rename feature, but I imagine if I did, I may also even have a hard time finding the file.

It would be preferable to bring the file for the referenced scene to focus. Chrome’s “View in folder” feature for downloaded files is a great example. The folder is opened in explorer and the file is pre-selected, which brings it into view even in a folder with a lot of files.

Website logo not being registered in the DB

When scanning for website information and a logo is downloaded, the logo is not added to the videos_website table in the DB.

To Reproduce
Simply run a website scan in settings

Expected behavior
The website should be added to the db and shown on the website's page. This used to work.

A fix is imminent.

Starting second time does nothing

Describe the bug
Starting the program the second time it would give me the first 2 lines of the program (static files dir and media files dir) start and then the window just closes again.
running it in a static cli window throws an importerror: no module named _thread see screenshot.

For some reason it tries to run with my Python 2.7 installation and not with Python 3.6+ so I'm guessing the code isn't update to start with python3 by default.

To Reproduce

  1. Start Yapo
  2. Stop the process (seemingly can only be done in the task manager)
  3. Start Yapo again

Expected behavior
That Yapo would start like it would the first time

Screenshots
http://tinyimg.io/i/OYOcW9G.png

Desktop (please complete the following information):

  • OS: Win10

where do i set tpdb api?

Describe the bug
api.metadataapi.net returns an unexpected reply code: 400

To Reproduce
Steps to reproduce the behavior:

  1. install from yapo-eplus.exe
  2. add the folder
  3. check yapo terminal

Expected behavior
we should be able to set our own tpdb api key, so the error doesnt occur

Screenshots
image

Python version:
using the automated installer.

RunYAPO.exe closes unexpectedly

When running RunYAPO.exe, a modal displays stating the location of the static and media files, then shuts down. No GUI launches.
Yapo E+

[Feature Request] Extend video information detection, add a tag category and automatic tagging

I have files of all kinds of resolutions, framerates, extensions, and bitrates in stereo 3D, VR and typical 2D files. I may have some duplicates across types that I want to keep, and some low-resolution duplicates that I might opt to remove.

Some information regarding the video files are already detected. Ideally, this information can be used to generate tags for a new category. I think this information is sufficiently different than the current categories of Actors, Website, and Tags to warrant a new category of tags.

Captured information should minimally include the resolution, framerate, duration, and file size.
Other highly useful information: video bitrate, codec, container/extension, display aspect ratio
Interesting, less broadly useful information: encoder profile/quality information, color space

Ideally a user can adjust automatic tagging based on the detects. I might want 1280x720p and 1920x1080p files to be tagged as HD, whereas another use might want the 1280x720p file tagged as “HD” and the 1920x1080p file as “FHD.”

Most users probably only care about files that have a framerate above the normal 30FPS tagged as “HFR”, but others may want 23.976 and 24 FPS files tagged as “24p”, 30 FPS files tagged “30p”, etc.

Display aspect ratio can help indicate a VR file, as the video stream resolution isn’t generally atypical.

The other video stream and file characteristics are primarily useful for sorting, understanding the content from the scene page, and duplicate detection and distinction.

Manual tagging in this category can be useful to distinguish other types of information that isn’t necessarily a great fit in with the rest of the tags.

Being able to search and sort the Scene list with all of this information, in addition to sites, actors (actresses) and tags would be very powerful. Perhaps a checkbox to enable viewing the whole category (could be disabled by default) to the scene page would be ideal.

Scan TpDB for video info

Provide a feature so YAPO will scan each video title with TpDB and add matching data to the scene, as well as add or update actor information

Password protection

Would be nice if you include some information on how to set up a password on the app , I mean you can't have the kids accidentally stumble upon 2TB of homework. I tried reading the Django documentation and I talked with ChatGPT for hours and at this point it seems like this is too complicated for my simple mind , so i just have the server locally at 127.0.0.1 instead of it being accessible by the whole network. I know its probably like 2 lines of code , but I just can't figure it all , I'm sure a lot of people feel the same way.

Docker pull fails

Describe the bug
I can't pull docker image

To Reproduce
Steps to reproduce the behavior:
docker pull cooperdk/yapo-eplus Using default tag: latest Error response from daemon: manifest for cooperdk/yapo-eplus:latest not found: manifest unknown: manifest unknown

Expected behavior
A docker image should be pulled

manage.py AttributeError: module 'memcache' has no attribute 'Client' error during startup

Describe the bug
first start of yapo server, i receive error AttributeError: module 'memcache' has no attribute 'Client'
version downloaded using git: 0.7.6.4 (bugfix build 2) running under Ubuntu VERSION="18.04.6 LTS (Bionic Beaver)"

full error:
Performing system checks...

Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 910, in run
self._target(*self._args, **self._kwargs)
File "/home/alfl/.local/lib/python3.9/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/management/commands/runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/checks/caches.py", line 63, in check_file_based_cache_is_absolute
cache = caches[alias]
File "/home/alfl/.local/lib/python3.9/site-packages/django/utils/connection.py", line 62, in getitem
conn = self.create_connection(alias)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/cache/init.py", line 44, in create_connection
return backend_cls(location, params)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/cache/backends/memcached.py", line 182, in init
super().init(server, params, library=memcache, value_not_found_exception=ValueError)
File "/home/alfl/.local/lib/python3.9/site-packages/django/core/cache/backends/memcached.py", line 28, in init
self._class = library.Client
AttributeError: module 'memcache' has no attribute 'Client'

To Reproduce
Steps to reproduce the behavior:
1 - create folder ~/projects
2 - cd into folder ~/projects and clone git repo
3 - run pip install -r requirements.txt ( no capital -R as described in readme as this doesn't work )
4 - open firewall port using: sudo ufw allow 8000/tcp
5 - start yapo using command: python manage.py runserver 127.0.0.1:8000

error received: AttributeError: module 'memcache' has no attribute 'Client'

Expected behavior
start of the yapo webserver

Screenshots
image

Python version:
Python 3.9.7 running under Ubuntu VERSION="18.04.6 LTS (Bionic Beaver)"

Additional context
tried to start with and without sudo rights ( so as std user or as root ). Error is the same

Find scenes that are missing actors.

Sometimes I get lazy when adding scenes and forget to tag actors right away. I'd like to be able to search all scenes that are missing actors so I can make sure I tag them properly.

Actor's birthday wrong

Describe the bug
If an actor is born fx 22 September 1999 (Ella Cruz), she is reported as 21 years old already on 1 January 2020.

To Reproduce
Steps to reproduce the behavior:
Simply look at the actor in her view.

Expected behavior
The actor shouldn't be 21 years old until the day after the date of her birthday.

Show relative directory in list view

Currently only the file name shows next to each thumbnail.

Since directory names can contain useful information for tagging, it would be nice to see it displayed.

Also instead of the full path it is probably enough to display only the part relative to the root of the directory. Eg: for a video located in C:\videos\blonds\sitename\video.mp4 display blonds\sitename

Support seeking by thumbnail in the HTML5 player

Feature:
Add support for seeking by clicking a certain thumbnail in a preview set.
FX, have 12 thumbnails tagged or named by location in the video's duration, and clicking that will jump to that location in the video. (video.mp4#t=00:20:30 will move to minute 20, second 30 of the video)

Importance:
Nice to have.

Duplicate function deletes non-duplicates

Describe the bug
I think the software is checking duplicates wrong or in a wrong order in certain constellations. When it deletes the files from the drive, there is no other version of this file left.

To Reproduce
Steps to reproduce the behavior:

  1. Add for example the whole drive "D:\" -> done
  2. Delete D:\ from software without cleaning database.
    2.1. Moving some files around.
  3. Add Sub-folder of D:\ instead of whole drive, because more flexible, e.g. "D\sorted".
  4. Run duplicate check

Expected behavior
The software recognizes the new added scenes as "duplicates", deleting either the new ones or the old ones, but leaving none in the process, resulting in a data loss.

Recommendation besides looking into the feature again: Safety measure: moving to trash bin instead of deleting them completely.

Here a screenshot of my now empty folder for the lulz. :D

image

Move to yaml

In the future, YAPO will make use of YAML for other purposes. For this reason, we want to move the current configuration file from JSON to YAML.

  • A function to convert the old configuration file to YAML
  • A function to write configuration values by name and value
  • A function to read configuration values by name

IndexError: list index out of range

Describe the bug
YAPO e+ stops adding files after some (a lot) of files.

EDIT: It continues adding files after restarting YAPO and re-adding the folder.

Scanning...   --> A result was returned using method 1. Parsing JSON...
Internal Server Error: /add-items/
Traceback (most recent call last):
  File "django\core\handlers\exception.py", line 34, in inner
    response = get_response(request)
  File "django\core\handlers\base.py", line 115, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "django\core\handlers\base.py", line 113, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "django\views\decorators\csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "django\views\generic\base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "rest_framework\views.py", line 505, in dispatch
  File "rest_framework\views.py", line 465, in handle_exception
  File "rest_framework\views.py", line 476, in raise_uncaught_exception
  File "rest_framework\views.py", line 502, in dispatch
  File "views.py", line 1329, in get
  File "addScenes.py", line 64, in get_files
  File "addScenes.py", line 262, in create_scene
  File "scrapers\scanners.py", line 148, in tpdb
IndexError: list index out of range
"GET /add-items/?actorsToAdd=&createSampleVideo=false&folderToAddPath=D:%5C%5C&sceneTagsToAdd=&websitesToAdd= HTTP/1.1" 500 15555

[Feature Request] Manage/Organize filenames and paths based on existing filenames and tags

I have a fairly large selection of content. I have manually renamed most of my content so that it’s fairly comprehensible. There are site-to-site inconsistencies with filename schemes, and some sites re-release or distribute to another site. Not only is manually managing file names a PITA, it’s also hard to find duplicates of the content as different files may have different resolutions, file sizes, encodings, or dating. This is further complicated by the fact that sometimes alternates are sometimes desirable (e.g. I may want to keep a VR version and non-VR version of the same scene, or a 5K version and a lower resolution version).

I would prefer to an automatic file managing scheme that I can adjust based on tags, to fit the renaming to my specific preferences.

I have files that are released by a particular site that I would generally like to use one filename scheme: <site> - <yy>.<mm>.<dd> - <optional scene name> - <actress1>, <actress2>, & <actress3>.ext
.\VR\<site> - <yy>.<mm>.<dd> - <optional scene name> - <actress1>, <actress2>, & <actress3>.ext

Whereas some other content that are movies with just a Title, that I would like to add information to the filename: .\Movies\<Title> (<YYYY>) - <actress1>, <actress2>, & <actress3>.ext

Ideally, the organizer could look at a specific folder to find content to organize into my library, and be triggered manually or watch the folder and work completely automatically.

On windows, adding two paths in different cases will add multiple copies of the same files.

Describe the bug
Windows paths are case insensitive. If one was to add "e:\my_videos" and then "E:\MY_VIDEOS". YAPO-e will add a duplicate entry for each one that is already added from the previous path. The more critical problem is that 'cleaning the database' removes the duplicates, but it also physically deletes the files from the disk.

To Reproduce
Steps to reproduce the behavior:
On windows, add two identical paths with a different case. Then clean the library.

Expected behavior
Files from the same path should not be added twice.

Python version:
3.7

Additional context
Probably should check on insertion whether the OS is windows. And if it is should check in a case insensitive manner if the path already in the database.

Issue with the Freeones actor scraper (measurements)

Operation breaks if an actor's measurements only include the first part, for example "32A".
For some reason, the parser I wrote fails to recognize if only parts of the measurement field are available.

This issue breaks operation if a new folder is added, and it makes it impossible to re-add the folder because I introduced a feature to not allow a user to add the same folder twice.
The only way to remedy this is to manually edit the database.

Therefore, KEEP BACKUPS for now.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Add Folders/Actors/Tags'
  2. Add a new folder
  3. Let YAPO work through the directory structure, allowing it to add new actors.
  4. At some point, you may get this error:

03:07:35 [ERROR] local variable 'measurements' referenced before assignment while trying to add (folder) to folder list

Expected behavior
The measurements data should be parsed correctly, and only the first part added if that's the only part available. This worked earlier, but stopped working after I modified the scraper to work with XPATHs.

As this is a bug that will potentially make it impossible to re-add the same folder (without renaming it), this is a priority issue and will be fixed very soon.

Docker - Cannot find web browser

Is there any way to stop the automatic opening of a web browser when using docker?

When run, the following error appears and the container exits-

yapo | Traceback (most recent call last):
yapo | File "./yapo.py", line 74, in
yapo | startup.startup_sequence()
yapo | File "/YAPO/videos/startup.py", line 284, in startup_sequence
yapo | webbrowser.get().open_new_tab(site)
yapo | File "/usr/local/lib/python3.8/webbrowser.py", line 65, in get
yapo | raise Error("could not locate runnable browser")
yapo | webbrowser.Error: could not locate runnable browser

Startup Error

Run the program, seems to setup fine.

When first run the following error appears on web page -

Internal Server Error

The server encountered an unexpected internal server error

(generated by waitress)

Error appears on console

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.8 from "C:\YAPO\yapo-eplus.exe"
  • The NumPy version is: "1.20.1"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

ERROR:waitress:Exception while serving /favicon.ico
Traceback (most recent call last):
File "numpy\core_init_.py", line 22, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "numpy\core\multiarray.py", line 12, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "numpy\core\overrides.py", line 7, in
ImportError: DLL load failed while importing _multiarray_umath: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "django\core\handlers\exception.py", line 47, in inner
response = get_response(request)
File "django\utils\deprecation.py", line 113, in call
response = self.process_request(request)
File "django\middleware\common.py", line 53, in process_request
if self.should_redirect_with_slash(request):
File "django\middleware\common.py", line 71, in should_redirect_with_slash
not is_valid_path(request.path_info, urlconf) and
File "django\urls\base.py", line 154, in is_valid_path
resolve(path, urlconf)
File "django\urls\base.py", line 25, in resolve
return get_resolver(urlconf).resolve(path)
File "django\urls\resolvers.py", line 545, in resolve
for pattern in self.url_patterns:
File "django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "django\urls\resolvers.py", line 589, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "django\utils\functional.py", line 48, in get
res = instance.dict[self.name] = self.func(instance)
File "django\urls\resolvers.py", line 582, in urlconf_module
return import_module(self.urlconf_name)
File "importlib_init_.py", line 127, in import_module
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "urls.py", line 27, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "views.py", line 10, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "addScenes.py", line 8, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "videosheet.py", line 49, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "numpy_init
.py", line 145, in
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "numpy\core_init
.py", line 48, in
ImportError:

Rename filename based on metadata

There is no guarantee of nicely formed filenames right now... But as we build correct metadata, renaming the original filename to include correct metadata to at least allow reidentification if needed makes sense.

Scraping already tries to use filename information like title, studio, stars or date if available. Extra title info is often a problem in scraping. Adjusting the title to be the correct metadata standardizes this.

At a minimum, renaming files to something with the major elements (studio/title/date/stars) in a fixed order would be great.

Allowing a flexible renaming (templated?) with all of those (and other scraped/collected info like resolution, duration, etc, and perhaps tags?) would allow edge case uses as well. Consider it a stretch goal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.