Code Monkey home page Code Monkey logo

wrolpi's People

Contributors

dependabot[bot] avatar lrnselfreliance avatar raybb avatar struckcroissant 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

Watchers

 avatar  avatar  avatar

wrolpi's Issues

Config is saved in /opt/wrolpi

Config is saved to the WROLPi's system in /opt/wrolpi. This causes a problem if the WROLPi has to be recreated.

All configs should be moved to {MEDIA_DIRECTORY}/configs

Hotspot can be toggled

The WROLPi hotspot needs to be toggle-able in the UI. It should always turn on when the WROLPi reboots (in case the user cannot access a computer to log into the SSH interface).

This must be handled without WROLPi running as the root user!

WROLPi status page

A server status page is needed. The page should have the following data:

  • uptime
  • cpu temperature
  • cpu frequency
  • drives mounted
  • drive space usage
  • drive health (smart)

First iteration will not have any historical data. Only current data generated in-the-moment will be displayed.

Videos needs link to original URL

When a video is downloaded, it would be helpful if the user could click a link on the video's page to navigate to the source domain and video.

Per-channel YAML information file

Refreshing the videos collection can take a very long time and consume a lot of power. It would be better to write a wrolpi.yaml file to each channel's directory summarizing all videos in that directory.

  • Videos will be grouped by their ID
  • Video size is stored
  • This file will be updated after download and refresh.
  • Videos in YAML file will be compared to the directory's contents. Adding/removing as necessary to match the files in the directory.

Map Enhancements

  • select map layers such as topographical or street
  • print a map
  • save a pin

YT-DLP reports error with .cache

Downloading a video reports this error. Modify yt-dlp download params to use --no-cache-dir to disable caching.

api_1      | [2022-02-07 19:24:00,131] [modules.videos.downloader.youtube-dl] [WARNING] Writing cache to '/.cache/yt-dlp/youtube-nsig/0cd11746.json' failed: Traceback (most recent call last):
api_1      |   File "/usr/local/lib/python3.8/site-packages/yt_dlp/cache.py", line 49, in store
api_1      |     os.makedirs(os.path.dirname(fn))
api_1      |   File "/usr/local/lib/python3.8/os.py", line 213, in makedirs
api_1      |     makedirs(head, exist_ok=exist_ok)
api_1      |   File "/usr/local/lib/python3.8/os.py", line 213, in makedirs
api_1      |     makedirs(head, exist_ok=exist_ok)
api_1      |   File "/usr/local/lib/python3.8/os.py", line 223, in makedirs
api_1      |     mkdir(name, mode)
api_1      | PermissionError: [Errno 13] Permission denied: '/.cache'

Individual videos cannot be downloaded

Videos can only be downloaded from a channel/playlist. The user needs a way to download only a single video. The video files should be sorted by domain and channel.

Lower power mode

A new feature should be added to WROL Mode, a lower power mode. This should slow the CPU frequency to something usable, but lower wattage. Maybe this should be toggle-able separately by the user?

Install fails with Network Timeout

The install.sh script fails with this:

warning semantic-ui-react > react-popper > [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
[2/4] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.yarnpkg.com/date-fns/-/date-fns-2.28.0.tgz: ESOCKETTIMEDOUT".
info If you think this is a bug, please open a bug report with the information provided in "/opt/wrolpi/app/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...

This is an issue with yarn pulling packages.

Work Around

Run the installation script again. The install script can be run as many times as necessary.

Favorites don't work without a source_id

Favoriting a video does not work in the config when the video does not have a source id.

Alter the saving/importing of the channel config so that it supports the filename as well as the source_id.

Download Limiter

Videos are downloaded as fast as possible, this can cause throttling problems. We need a download limiter. The limiter should do the following:

  • Throttle download speed for all modules
  • Limit downloads per day
  • Schedule downloads within a specific window (download only at night?)
  • Randomize downloads

Global Download textarea sends single string

The download textarea in the home page sends then entire textarea contents as a single string to the Downloader.

  • Split the textarea into individual URLs
  • Send the array of URLs the API, change the API to accept these.

React UI has no dark theme

Dark theme would be useful to protect night vision. Could this be toggle in the settings of the server?

Video search only supports English

What languages does PostgreSQL 12 support? Can the video table handle multiple languages? Do we need to require the maintainer to select only one language?

Archive needs adblock

Many websites display a pay/subscribe full-page banner. Many websites display large amounts of ads which increases file size.

Can an ad-blocker be installed on a locally-run web browser (not in docker)?

If so, this needs to be installed in the install.sh script and used by default for all archiving.

Download fails

Downloading fails on a new system with this error:

api_1  | Traceback (most recent call last):
api_1  |   File "/opt/wrolpi/api/videos/downloader.py", line 116, in update_channels
api_1  |     update_channel(channel)
api_1  |   File "/opt/wrolpi/api/videos/downloader.py", line 59, in update_channel
api_1  |     channel['next_download'] = today() + timedelta(seconds=download_frequency)
api_1  | TypeError: unsupported type for timedelta seconds component: NoneType

Password Change

WROLPi uses an insecure password during development. Before release the maintainer should be able to change the wrolpi user's password, as well as set the WiFi Hotspot password.

Install.sh throws errors on fresh Ubuntu 20.04 with latest packages

When installing WROLPi on a fresh Ubuntu 20.04 install with the latest packages and upgrades installed, the install.sh script fails.

The first error is:

You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: libnode64 : Conflicts: nodejs-legacy nodejs : Conflicts: nodejs-doc yarn : Conflicts: cmdtest but 0.32.14.gcdfe14e-1 is to be installed

Removing Yarn and NodeJS from the install.sh script seems to at least bypass this problem.

The following error is this one:

`error: cannot perform the following tasks:

  • Setup snap "chromium" (1899) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
    udev output:
    Failed to send reload request: No such file or directory
    )
  • Setup snap "chromium" (1899) security profiles (cannot reload udev rules: exit status 1
    udev output:
    Failed to send reload request: No such file or directory
    )
  • Setup snap "chromium" (1899) security profiles for auto-connections (cannot reload udev rules: exit status 1
    udev output:
    Failed to send reload request: No such file or directory
    )
    dpkg: error processing archive /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu0.20.04.2_amd64.deb (--unpack):
    new chromium-browser package pre-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
    /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu0.20.04.2_amd64.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)`

Since I am pretty new at Linux I have no idea how to fix these issues. Maybe a script update is needed.

Hotspot QR Code

It would be helpful if a QR code could be printed by the maintainer so users can join the Hotspot easily.

#55 should be completed first so the password can be included in the QR code.

Ignore hotspot in docker containers

In main.py it attempts to turn on the hotspot, this is not supported in docker containers and should be ignored.

    if config.hotspot_on_startup:
        admin.enable_hotspot()
    if config.throttle_on_startup:
        admin.throttle_cpu_on()

Download fails if one channel fails

Downloading of all channels will fail if only one of them fails. The download should log the error, then continue with the rest of the channels.

Can the hotspot be a captive portal?

When joining the hotspot, a new user may not know where the WROLPi interface is located. Can we redirect them to it when they browse to any URL?

It may be that the maintainer does not want the users to be able to access their local network (LAN port) when connected to the hotspot. The hotspot should not have access to the LAN network.

Map Module

The Map module needs to be restored.

Requirements

  • user can view any part of the map while online, whatever is rendered can be viewed again while offline
  • maintainer can import packaged maps (pbf files)
  • supports viewing on mobile device

Extract video captions from file

WROLPi currently uses captions from the file "near" the video file. We need to also extract captions from a video file itself.

  • Detect videos with embedded captions
  • Extract captions from these videos when they do not have a caption file

Videos does not support signin

Many sites require a sign-in to access videos. WROLPi must support storing of encrypted passwords for the maintainer.

  • Passwords are only written to disk when encrypted by a master password
  • The master password is then required to unlock the passwords
  • Decrypted passwords are only in memory when needed
  • Passwords are never in logs

Videos cannot be deleted in bulk

A new page should be created which displays hundreds of videos and allows easy deletion. This could be a table with checkboxes near each video. Each video should have a much smaller thumbnail.

Files needs search and thumbnails

The Files module can be search for the React Keyed File Browser, but they don't support WROLPi's universal search.

Research: Can we generate thumbnails dynamically? We don't want to leave thumbnails for PDFs, Images, etc all over the media directory.

  • Create a File card in React which can display a file
  • Display a thumbnail for each file
  • Modify files search to support Cards as well as File Browser

Wikipedia Module

A Wiki module needs to be created.

Requirements

  • Download Wikipedia dumps
  • Search articles
  • Tag articles

Videos statistics fails when refresh isn't complete

When a Video refresh isn't yet complete, the statistics fails with:

Nov 02 18:47:44 ubuntu python[5551]: Traceback (most recent call last):
Nov 02 18:47:44 ubuntu python[5551]:   File "/opt/wrolpi/venv/lib/python3.8/site-packages/sanic/app.py", line 909, in handle_request
Nov 02 18:47:44 ubuntu python[5551]:     response = await response
Nov 02 18:47:44 ubuntu python[5551]:   File "/opt/wrolpi/wrolpi/schema.py", line 100, in wrapped
Nov 02 18:47:44 ubuntu python[5551]:     result = await result
Nov 02 18:47:44 ubuntu python[5551]:   File "/opt/wrolpi/modules/videos/api.py", line 159, in statistics
Nov 02 18:47:44 ubuntu python[5551]:     ret = await get_statistics()
Nov 02 18:47:44 ubuntu python[5551]:   File "/opt/wrolpi/modules/videos/lib.py", line 298, in get_statistics
Nov 02 18:47:44 ubuntu python[5551]:     historical_stats['average_size'] = (sum(i['size'] for i in monthly_videos) // len(monthly_videos)) \
Nov 02 18:47:44 ubuntu python[5551]: TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'

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.