Code Monkey home page Code Monkey logo

ownfoil's People

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  avatar  avatar  avatar  avatar

ownfoil's Issues

No games visible, only the two .toml files?

I'm running the Ownfoil container in Docker Desktop on Win10 with WSL2. The container runs and if I visit the localhost:8000 url in my browser or in Tinfoil, I only see the two .toml files, and there are no games in "New Games" on the left in Tinfoil. Clearly I've done something wrong, but if anyone might know what that something is, I'd appreciate any help you can offer.

Permission Issues

Starting with a clean games directory (no shop* files), if you start the docker, it generates the .json and .tlf. These are owned by app:users with a permission of 640 (no rw for others). If I log into Tinfoil, I do not see any games and Ownfoil/nginx shows a 403. Setting o+r fixes this issue. Must be that nginx is not running as either app or users?

Collaborations open?

Hey, I've been using this project for several weeks now to have my own shop locally, and really like the project. Also been testing the v2 and the new UI looks very promising.

Been looking the code and trying to understand how the backend side works and I wanted to know if I could contact you @a1ex4 and help you with anything I can with this project, I love supporting and helping Open Source projects, and what a better way to return what you gave us with some help.

I'm a frontend engineer and I could help you with anything related to the frontend and with a little bit of time and onboarding, can also try to help you with the backend, not sure if you have some other people helping you or if you do accept support from other people, but really would like to :)

Thanks in advance!

Ownfoil V2 testing

Hi, I have tried your V2 of ownfoil and it's simple but nice ! Keep going :)
I'm a pro developer, I might help if you need.

Currently testing your V2 on a RPI 4B with HomeAssistant OS, it works like a charm !

Prod.keys doesn't work

Hi,
I'm running ownfoil v2 using docker-compose without problems but when I try to upload prod.keys from the website everything crashes and I can't reach the site anymore. The only way to reach again the shop is to stop the container, delete the folder config and run again the container.

Step to reproduce

From the settings page of the site I upload my prod.keys

index.html error

2023/01/11 18:06:46 [error] 9#9: *11 "/games/index.html" is not found (2: No such file or directory)

I keep getting this message in my logs whenever I try and connect from tinfoil. I have no idea what index.html even is.

full host URL missing in *.json and *.tfl

Hi, thanks for this tool. Very useful.
I have an issue with the docker version and generating the urls for both the JSON and TFL files.

The content of the TFL is for example:

            {
                "url": "/games/THIS_IS_A_HOMEBREW_GAME.nsp",
                "size": 175**
            },

Which doesn't work with tinfoil if I add the following URL in it : http://my_docker_host_server_ip:port
(I don't do port forwarding as I want to stay in the local network)

For the shop to work, I have to edit the shop.tfl and do some regex replacement(replacing the value games with http://my_docker_host_server_ip:port :

%s/\/games/http:\/\/my_docker_host_server_ip:port/g

Obviously this seems overkill, and it only works for 5 min until the cronjob overwrites the modifications.

Is this an issue, or a misunderstanding from my behalf of the configuration to do?
I looked at the python script and couldn't see where the host url would be added to the URL.

Cheers!

Synology DS1522+

is it possible to get this setup and running from a NAS drive, running DSM 7.2+

Saves Manager fails to backup files and attempts to reconnect indefinitely

Saves Manager fails to backup files and attempts to reconnect indefinitely.

I've traced the issue to it assuming that all the save files are in a 1 level folder, where most of them - in my experience - are nested in other folders.

I'm already working on a PR to fix.

For example, the following save folder structure:

JKSV/
└── Bayonetta 3/
    ├── Profile1 - 2023.09.18 @ 16.26.21/
    │   ├── GameData.dat
    │   └── SlotData_0.dat
    └── Profile2 - 2023.09.18 @ 16.26.21/
        ├── GameData.dat
        └── SlotData_0.dat

Retrieves the following to my volume:

JKSV/
└── Bayonetta 3/
    └── Profile1 - 2023.09.18 @ 16.26.21      <-- this should be a folder, but it's a file

and then on the logs:

2023-09-20 16:54:22,577 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[0:10:00], next run at: 2023-09-20 16:54:22 UTC)" (scheduled at 2023-09-20 16:54:22.551818+00:00)
2023-09-20 16:54:22,620 - INFO save_manager: Successfully connected to Switch device on host 192.168.1.9.
2023-09-20 16:54:22,620 - INFO save_manager: Retrieving saves from /switch/DBI/saves to /games/Saves/Xance/DBI
2023-09-20 16:54:22,709 - INFO save_manager: Retrieving saves from /JKSV to /games/Saves/Xance/JKSV
2023-09-20 16:54:22,794 - INFO save_manager: Scanning /JKSV/Bayonetta 3
2023-09-20 16:54:22,886 - INFO save_manager: Lost connection, attempting reconnect in 10s...
2023-09-20 16:54:32,918 - INFO save_manager: Lost connection, attempting reconnect in 10s...
2023-09-20 16:54:42,950 - INFO save_manager: Lost connection, attempting reconnect in 10s...
2023-09-20 16:54:52,986 - INFO save_manager: Lost connection, attempting reconnect in 10s...

And for another example, this heavy nested folder structure:

JKSV/
└── Hades/
    └── Profile1/
        ├── Data Dumps/
        │   └── .
        ├── Data Records/
        │   └── .
        ├── Saved Games/
        │   └── Hades/
        │       ├── ActiveProfile
        │       ├── Profile1.ctrls
        │       ├── Profile1.sav
        │       ├── Profile1.sjson
        │       ├── Profile1.v.sav
        │       └── Profile1_Temp.sav
        ├── Screenshots/
        │   └── .
        └── Temp/
            └── .

Retrieves:

JKSV/
└── Hades/
    └── .     <-- empty folder

And on the logs:

2023-09-20 17:35:49,670 - INFO apscheduler.scheduler: Added job "Backup saves" to job store "default"
2023-09-20 17:35:49,670 - INFO apscheduler.scheduler: Scheduler started
2023-09-20 17:35:49,675 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[0:10:00], next run at: 2023-09-20 17:35:49 UTC)" (scheduled at 2023-09-20 17:35:49.657216+00:00)
2023-09-20 17:35:49,834 - INFO save_manager: Successfully connected to Switch device on host 192.168.1.9.
2023-09-20 17:35:49,834 - INFO save_manager: Retrieving saves from /JKSV/Hades to /games/Saves/Xance/JKSV/Hades
2023-09-20 17:35:49,926 - INFO apscheduler.executors.default: Job "Backup saves (trigger: interval[0:10:00], next run at: 2023-09-20 17:45:49 UTC)" executed successfully

[BUG] Scanned files limit ?

When i reach 580 files scanned the server stop show listing on Tinfoil app, its a Tinfoil bug or Ownfoil bug ?

Ownfoil doesn't see the games?

I never used any shop before and since pixel closed their doors. I directly went to Ownfoil. So i'm new and don't understand it all, sorry. The store setup was easy on my QNAP and is running smooth.

So I figured out you need to insert the tinfoil id in the name otherwise there is an loading error in the console log. and a version.
So my folder + games setup looks like this:
Gametitle
/Base/Gametitle [[tinfoil-game-id][v0].nsp
/Updates/Gametitle [[tinfoil-game-id][v1423].nsp
/DLC/Gametitle DLCNAME[tinfoil-game-id][v0].nsp

However, I think when im installing in most cases it's just the update i install since i get the "You need the software" message. And in other cases I see that the game is version 1.0 so I can't play or update it?

I'm totally new so, sorry if these are stupid questions, am i doing something wrong?

More Permission Issues

docker logs ownfoil

Creating group app with GID 1000
Creating user app with UID 1000
Setting up authentification for user dark.
Adding password for user dark
Starting ownfoil
2023-03-09 06:48:57,702 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-03-09 06:48:57,706 - INFO apscheduler.scheduler: Added job "Generate shop" to job store "default"
2023-03-09 06:48:57,706 - INFO apscheduler.scheduler: Scheduler started
2023-03-09 06:48:57,707 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2023-03-09 06:48:57 UTC)" (scheduled at 2023-03-09 06:48:57.587910+00:00)
2023-03-09 06:48:57,711 - INFO gen_shop: Found 0 directories, 3 game/save files
2023-03-09 06:48:57,711 - ERROR gen_shop: Failed to write /games/shop.json, error was:
[Errno 13] Permission denied: '/games/shop.json'
2023-03-09 06:48:57,712 - ERROR gen_shop: Failed to write /games/shop.tfl, error was:
[Errno 13] Permission denied: '/games/shop.tfl'
2023-03-09 06:48:57,712 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-03-09 06:53:57 UTC)" executed successfully

How to configure so I can see the games in the left menu

Hello everyone, I managed to install this image in my local NAS server, I can connect to it through Tinfoil and see the nsp files through the File browser, but I was wondering how I can configure this so I can see the games in the left navigation menu(as teknik or pixel shop), with the game picture and so, for more friendly UI, not sure if this is not implemented for that and only for navigating through the file browser, I've read all the issues and the readme file but can't find how to do it. Thanks for all the work

Folders are shown as empty files - New games and Recommended are not shown in Tinfoil

Background: Mariko Switch. Tinfoil version 17.0. Atmosphere version 1.5.4|E

Problem: Out of the blue my self hosted Ownfoil shop stopped working. I haven't touched anything, I just opened it to install a game and the 'New Games' and 'Recommended' tabs are no more. However, I can access the folder and see 'Files' which are actually the individual folders in which the NSPs are stored. I can 'Open' these and see them as Hex. I click on 'Install All' and I get the error.

What I tried: Fix the date and time of the Switch using QuickNTP. Restart the switch, the docker container, the server. Remove the folder and re-add it. Double check the network settings of docker, my router, the server, the switch. Play with the container settings. Play with the shop configuration json files.

What I have't tried: Update Atmosphere. Update Tinfoil.

I have all auto updates disabled, so no update has been carried out that could break my setup, including the unraid server. Uptime is close to 30 days, and the shop worked a few days ago when I last opened Tinfoil.

Adding password for user [REDACTED]
2024-01-21 16:19:17,827 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2024-01-21 16:19:17,827 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2024-01-21 16:19:17,829 - INFO apscheduler.scheduler: Added job "Generate shop" to job store "default"
2024-01-21 16:19:17,829 - INFO apscheduler.scheduler: Added job "Backup saves" to job store "default"
2024-01-21 16:19:17,829 - INFO apscheduler.scheduler: Scheduler started
2024-01-21 16:19:17,829 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:19:17 UTC)" (scheduled at 2024-01-21 16:19:17.826631+00:00)
2024-01-21 16:19:17,829 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[1:00:00], next run at: 2024-01-21 16:19:17 UTC)" (scheduled at 2024-01-21 16:19:17.827100+00:00)
2024-01-21 16:19:17,949 - INFO save_manager: Successfully connected to Switch device on host 10.0.0.34.
2024-01-21 16:19:17,950 - INFO save_manager: Retrieving saves from from /switch/tinfoil/saves/common to Saves/Tinfoil
2024-01-21 16:19:18,014 - INFO gen_shop: Found 149 directories, 779 game/save files
2024-01-21 16:19:18,122 - INFO gen_shop: Successfully wrote /games/shop.json
2024-01-21 16:19:18,128 - INFO gen_shop: Successfully wrote /games/shop.tfl
2024-01-21 16:19:18,128 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:24:17 UTC)" executed successfully
2024-01-21 16:19:26,802 - INFO save_manager: Retrieved 11 saves in 8.852s - from /switch/tinfoil/saves/common to Saves/Tinfoil
2024-01-21 16:19:26,802 - INFO save_manager: Retrieving saves from from /JKSV to Saves/JKSV
2024-01-21 16:19:27,152 - ERROR apscheduler.executors.default: Job "Backup saves (trigger: interval[1:00:00], next run at: 2024-01-21 17:19:17 UTC)" raised an exception
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
retval = job.func(*job.args, **job.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backup_saves.py", line 201, in backup_saves
r = switch_ftp.retrieve_saves(config['root_dir'] + '/' + folder['local'], folder['remote'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backup_saves.py", line 109, in retrieve_saves
children = self.get_files(file)
^^^^^^^^^^^^^^^^^^^^
File "/app/backup_saves.py", line 94, in get_files
files = self.ftp.nlst(path)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ftplib.py", line 553, in nlst
self.retrlines(cmd, files.append)
File "/usr/local/lib/python3.11/ftplib.py", line 461, in retrlines
resp = self.sendcmd('TYPE A')
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/ftplib.py", line 280, in sendcmd
self.putcmd(cmd)
File "/usr/local/lib/python3.11/ftplib.py", line 207, in putcmd
self.putline(line)
File "/usr/local/lib/python3.11/ftplib.py", line 202, in putline
self.sock.sendall(line.encode(self.encoding))
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sendall'
2024-01-21 16:24:17,827 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:29:17 UTC)" (scheduled at 2024-01-21 16:24:17.826631+00:00)
2024-01-21 16:24:18,007 - INFO gen_shop: Found 149 directories, 779 game/save files
2024-01-21 16:24:18,117 - INFO gen_shop: Successfully wrote /games/shop.json
2024-01-21 16:24:18,122 - INFO gen_shop: Successfully wrote /games/shop.tfl
2024-01-21 16:24:18,122 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:29:17 UTC)" executed successfully
Creating group app with GID 1000
Creating user app with UID 1000
Setting up authentification for user [REDACTED].
Starting ownfoil
[REDACTED] - [REDACTED] [21/Jan/2024:16:20:20 +0000] "GET / HTTP/1.1" 200 15758 "-" "-" "-"
[REDACTED] - [REDACTED] [21/Jan/2024:16:20:34 +0000] "GET / HTTP/1.1" 200 15758 "-" "-" "-"
[REDACTED] - [REDACTED] [21/Jan/2024:16:28:59 +0000] "GET / HTTP/1.1" 200 15758 "-" "-" "-"
2024-01-21 16:29:17,827 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:34:17 UTC)" (scheduled at 2024-01-21 16:29:17.826631+00:00)
2024-01-21 16:29:18,013 - INFO gen_shop: Found 149 directories, 779 game/save files
2024-01-21 16:29:18,135 - INFO gen_shop: Successfully wrote /games/shop.json
2024-01-21 16:29:18,141 - INFO gen_shop: Successfully wrote /games/shop.tfl
2024-01-21 16:29:18,141 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-21 16:34:17 UTC)" executed successfully

Tinfoil1
Tinfoil2
Tinfoil3
Tinfoil4
Tinfoil5

Save manager error

Hi, I saw that a few weeks ago you upload a fix in save manager (#42) but for me is still failing.
Thanks in advance!

2023-11-06 16:33:45,494 - INFO save_manager: Retrieving saves from from /JKSV to Saves
2023-11-06 16:33:46,193 - INFO gen_shop: Found 1352 directories, 724 game/save files
2023-11-06 16:33:46,242 - INFO gen_shop: Successfully wrote /games/shop.json
2023-11-06 16:33:46,261 - INFO gen_shop: Successfully wrote /games/shop.tfl
2023-11-06 16:33:46,261 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-11-06 16:38:45 CET)" executed successfully
2023-11-06 16:33:58,904 - ERROR apscheduler.executors.default: Job "Backup saves (trigger: interval[0:10:00], next run at: 2023-11-06 16:43:45 CET)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 201, in backup_saves
    r = switch_ftp.retrieve_saves(config['root_dir'] + '/' + folder['local'], folder['remote'])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 109, in retrieve_saves
    children = self.get_files(file)
               ^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 94, in get_files
    files = self.ftp.nlst(path)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 553, in nlst
    self.retrlines(cmd, files.append)
  File "/usr/local/lib/python3.11/ftplib.py", line 461, in retrlines
    resp = self.sendcmd('TYPE A')
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 280, in sendcmd
    self.putcmd(cmd)
  File "/usr/local/lib/python3.11/ftplib.py", line 207, in putcmd
    self.putline(line)
  File "/usr/local/lib/python3.11/ftplib.py", line 202, in putline
    self.sock.sendall(line.encode(self.encoding))
    ^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'sendall'

Permission Error

Permission Error occurs despite setting the PUID and PGID. I changed PUID and PGID to 0, but the same error occurs.

Setting up authentification for user USER1
Adding password for user USER1
Starting ownfoil
Traceback (most recent call last):
  File "/app/app.py", line 24, in <module>
    config = read_config(config_path)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/utils.py", line 22, in read_config
    with open(toml_file, mode="rb") as fp:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/games/shop_config.toml'

This is my docker-compose

version: "3"

services:
  ownfoil:
    container_name: ownfoil
    image: a1ex4/ownfoil
    environment:
      # For write permission in /games directory
      - PUID=1000
      - PGID=1000
      # Setup auth
      - USERNAME=USER1
      - PASSWORD=USER1
      # - ROOT_DIR=/games
    volumes:
      - /volume1/Waclan/게임/스위치:/games
    ports:
      - "268:80"

Ownfoil GUI vs Tinfoil

Currently on V2.

Here is my docker compose

version: "3"

services:
ownfoil:
container_name: ownfoil
image: a1ex4/ownfoil:v2
environment:
# For write permission in /games directory
- PUID=1000
- PGID=100
# Setup auth
- USERNAME=admin
- PASSWORD=admin
- ROOT_DIR=/games
- SAVE_ENABLED=true
volumes:
- /volume1/docker/ownfoil/config:/app/config
- /volume1/docker/ownfoil/games:/games
ports:
- "8465:8465"

Game Folder:
image
4 games total (base)

Ownfoil Gui:
image
3 games showing
How to correct this?

Tinfoil (16.0):
Shows XCI on the left w/ only 2 game files displaying
SMBW.xci
MGSMC.xci

I do not see the .nsz or .nsp in Tinfoil - but I can search and find them.
They are just not showing up on its on .nsz or .nsp tab (left)
How to correct this?

Feature request:
Is there a way to populate tabs for each .extension or be able to create a tab in the config folder that shows all games within the /games directory

save_manager: Lost connection

The save manager successfully grabs one save from the switch and then loses connection and fails to grab saves for the other titles.

2023-02-22 10:18:42,655 - INFO save_manager: Successfully connected to Switch device on host 192.168.86.93.
2023-02-22 10:18:42,655 - INFO save_manager: Retrieving saves from /switch/tinfoil/saves to /games/Saves/Tinfoil
2023-02-22 10:18:42,749 - INFO save_manager: Scanning /switch/tinfoil/saves/
2023-02-22 10:18:42,860 - INFO save_manager: Lost connection, attempting reconnect in 10s...

Permission Error in logs and WebUI

I've deployed v2 on Docker on my Synology but I keep seeing the errors below in the logs:

warning: unable to access '/root/.config/git/ignore': Permission denied
warning: unable to access '/root/.config/git/attributes': Permission denied

When I load the WebUI, it gives permission errors there too. See below for more details of those.

I'm running this with the PGID and PUID of 1000, when I've tried my own PGID and PUID it just crashes the container and won't start. I've checked the folder permissions for "Games" on the Synology NAS and they seem fine. I've tried a chown 1000:1000 and can see that this is the owner of the folders now. There are read and write permissions for all users and groups too. Unless I'm wrong, Linux isn't my strong point!

PermissionError: [Errno 13] Permission denied: '/games'

`Traceback (most recent call last)

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1478, in __call__

return self.wsgi_app(environ, start_response)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [Open an interactive python shell in this frame] 

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1458, in wsgi_app

response = self.handle_exception(e)
           ^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app

response = self.full_dispatch_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request

rv = self.handle_user_exception(e)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request

rv = self.dispatch_request()
     ^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request

return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/app/app.py", line 67, in index

scan_library()
^^^^^^^^^^^^^^

File "/app/app.py", line 181, in scan_library

_, files = getDirsAndFiles(library)
           ^^^^^^^^^^^^^^^^^^^^^^^^

File "/app/titles.py", line 32, in getDirsAndFiles

entries = os.listdir(path)
          ^^^^^^^^^^^^^^^^

PermissionError: [Errno 13] Permission denied: '/games'

`

Automatic Save Backup Issue

I'm having issues getting with the connection to the switch getting dropped:

2023-03-13 15:03:04 2023-03-13 07:03:04,196 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:06 /app/run.sh: line 19: [: app:x:1000:1000:Linux: unary operator expected 2023-03-13 15:03:06 adduser: user 'app' in use 2023-03-13 15:03:06 Group app with GID 1000 already exists, skip creation 2023-03-13 15:03:06 Creating user app with UID 1000 2023-03-13 15:03:06 USERNAME and PASSWORD environment variables not set, skipping authentification setup. 2023-03-13 15:03:06 Starting ownfoil 2023-03-13 15:03:07 2023-03-13 07:03:07,118 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts 2023-03-13 15:03:07 2023-03-13 07:03:07,119 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts 2023-03-13 15:03:07 2023-03-13 07:03:07,123 - INFO apscheduler.scheduler: Added job "Generate shop" to job store "default" 2023-03-13 15:03:07 2023-03-13 07:03:07,123 - INFO apscheduler.scheduler: Added job "Backup saves" to job store "default" 2023-03-13 15:03:07 2023-03-13 07:03:07,123 - INFO apscheduler.scheduler: Scheduler started 2023-03-13 15:03:07 2023-03-13 07:03:07,124 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2023-03-13 07:03:07 UTC)" (scheduled at 2023-03-13 07:03:07.052705+00:00) 2023-03-13 15:03:07 2023-03-13 07:03:07,126 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[0:01:00], next run at: 2023-03-13 07:03:07 UTC)" (scheduled at 2023-03-13 07:03:07.118936+00:00) 2023-03-13 15:03:07 2023-03-13 07:03:07,133 - INFO gen_shop: Found 4 directories, 2 game/save files 2023-03-13 15:03:07 2023-03-13 07:03:07,135 - INFO gen_shop: Successfully wrote /games/shop.json 2023-03-13 15:03:07 2023-03-13 07:03:07,137 - INFO gen_shop: Successfully wrote /games/shop.tfl 2023-03-13 15:03:07 2023-03-13 07:03:07,137 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-03-13 07:08:07 UTC)" executed successfully 2023-03-13 15:03:07 2023-03-13 07:03:07,269 - INFO save_manager: Successfully connected to 2023-03-13 15:06:07 2023-03-13 07:06:07,122 - WARNING apscheduler.scheduler: Execution of job "Backup saves (trigger: interval[0:01:00], next run at: 2023-03-13 07:06:07 UTC)" skipped: maximum number of running instances reached (1)Switch device on host 192.168.00.000. 2023-03-13 15:03:07 2023-03-13 07:03:07,269 - INFO save_manager: Retrieving saves from /switch/tinfoil/saves to /games/Saves/Tinfoil 2023-03-13 15:03:07 2023-03-13 07:03:07,356 - INFO save_manager: Scanning /switch/tinfoil/saves/4519B5A28F810010877931A9754B64CE 2023-03-13 15:03:07 2023-03-13 07:03:07,446 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:17 2023-03-13 07:03:17,603 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:27 2023-03-13 07:03:27,740 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:37 2023-03-13 07:03:37,881 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:48 2023-03-13 07:03:48,020 - INFO save_manager: Lost connection, attempting reconnect in 10s... 2023-03-13 15:03:58 2023-03-13 07:03:58,163 - INFO save_manager: Lost connection, attempting reconnect in 10s...

Then when the apsceduler tries to run backup saves again, it throws this repeatedly:

2023-03-1315:06:07 2023-03-13 07:06:07,122 - WARNING apscheduler.scheduler: Execution of job "Backup saves (trigger: interval[0:01:00], next run at: 2023-03-13 07:06:07 UTC)" skipped: maximum number of running instances reached (1)

I know I've got the interval set to 1 min for testing purposes. I can see the blue light on the switch blinking every 10s when it is trying to connect. Also, normal ftp to the swtich through Filezilla works fine with no such issues. I'm not sure why it is loosing the connection. I've tried it right after a restart of the switch and then same outcome. Here is the config:

'root_dir = "/games"

[shop]
# Scan interval, in minutes
scan_interval = 5

# Files with these extensions will be added to the shop
valid_ext = [
    'nsp',
    'nsz',
    'xci',
    'zip'
]

template = "shop_template.toml"

[saves]
# Enable or disable automatic saves backup
enabled = true

# Interval to retrieve saves, in minutes.
interval = 1

# Switches configuration for save retrieval.
# If user and pass are not specified, use anonymous connection
# OLED
[[saves.switches]]
host = "192.168.00.000"
port = "5000"
user = ""
password = ""
folders = [
    {local = "Saves/Tinfoil", remote = "/switch/tinfoil/saves"},
    {local = "Saves/JKSV", remote = "/JKSV"}
]
# Erista
[[saves.switches]]
host = "192.168.00.001"
port = "5000"
user = "switch"
password = "switch"
folders = [
    {local = "Saves/Tinfoil", remote = "/switch/tinfoil/saves"},
    {local = "Saves/JKSV", remote = "/JKSV"}
]

# Another Switch
# [[saves.switches]]
# host = "192.168.1.150"
# port = "5002"
# user = "username"

it also does not attempt to access the second switch, but I'm not sure if this is because the first one is failing.
# pass = "password"
# folders = [
#     {"local": "Saves/Mac/Tinfoil", "remote": "/switch/tinfoil/saves/common"},
# ]'

V2 AttributeError

Good Morning

i got now this error since last update i think

AttributeError

AttributeError: 'NoneType' object has no attribute 'lower'
Traceback (most recent call last)

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2213, in __call__

return self.wsgi_app(environ, start_response)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2193, in wsgi_app

response = self.handle_exception(e)
           ^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app

response = self.full_dispatch_request()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request

rv = self.handle_user_exception(e)
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request

rv = self.dispatch_request()
     ^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request

return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/app/app.py", line 60, in index

scan_library()
^^^^^^^^^^^^^^

File "/app/app.py", line 174, in scan_library

file_info = identify_file(filepath)
            ^^^^^^^^^^^^^^^^^^^^^^^

File "/app/titles.py", line 133, in identify_file

title_id, app_type = identify_appId(app_id)
                     ^^^^^^^^^^^^^^^^^^^^^^

File "/app/titles.py", line 60, in identify_appId

app_id = app_id.lower()
         ^^^^^^^^^^^^

AttributeError: 'NoneType' object has no attribute 'lower'

ownfoil doesn't work with reverse proxy

Hi and at first thanks for this great docker container :D

It is working so far on my LAN but i want to set it up via dyndns with nginx as reverse proxy but with this the data won't load at all in tinfoil.

When i open up the dyndns like https://switch.my.dyndns.name with the login credentials i see the .nsp and all like it should be but when i add it to tinfoil with https and host and all nothing happend. . .

Does anyone has set up something similar with an reverse proxy?

Transfer stops in the middle

Hi :),

First, great work!!! thank you very much!
I will try to contribute to this great work very soon (I'm an android dev)

So, I'm running the shop and everything is great, I can see the games, I can see "New Games", "DLC" sections, (I can't see UPDATE section yet, but maybe it's my issue related..)
When I'm trying to install a game, xci or other, it's stops in the middle of the downloading and I can't install it because it's not fully downloading it. there is no logs for that container on that operation. First, I though it was cutting 2GB+ but it occures also for 16GB files somewhere in the middle of it.

Is there anything I can do in order to solve this?

Thanks !

Separate config drectory

Maybe this feature already exists but it would be great if there was a way to separate the config directory from the games directory. So that all the configs don't show up in your games list in tinfoil or via a web browser.

Something like the following:

/games
/config

[request] Gdrive/Drop Box implementation

Hello, I would like it to be implemented in the code, if possible, integration with gdrive or dropbox, this would be very good for those people who have a slow internet connection.
thank you very much

ownfoil:v2 Unable to read json file

I updated to version 2 that came out yesterday, but I'm now getting this erroI was was working fine on the older version 2


Traceback (most recent call last):
File "/app/app.py", line 174, in
init()
File "/app/app.py", line 15, in init
update_titledb(app_settings)
File "/app/titles.py", line 173, in update_titledb
load_titledb(app_settings)
File "/app/titles.py", line 82, in load_titledb
cnmts_db = json.load(f)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1115346 column 14 (char 37282819)
warning: The following paths are not up to date and were left despite sparse patterns:
US.en.json

After fixing the above paths, you may want to run git sparse-checkout reapply.
Traceback (most recent call last):
File "/app/app.py", line 174, in
init()
File "/app/app.py", line 15, in init
update_titledb(app_settings)
File "/app/titles.py", line 173, in update_titledb
load_titledb(app_settings)
File "/app/titles.py", line 82, in load_titledb
cnmts_db = json.load(f)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1115346 column 14 (char 37282819)
warning: The following paths are not up to date and were left despite sparse patterns:
US.en.json

After fixing the above paths, you may want to run git sparse-checkout reapply.
Traceback (most recent call last):
File "/app/app.py", line 174, in
init()
File "/app/app.py", line 15, in init
update_titledb(app_settings)
File "/app/titles.py", line 173, in update_titledb
load_titledb(app_settings)
File "/app/titles.py", line 82, in load_titledb
cnmts_db = json.load(f)
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
^^^^^^^^^^^^^^^^^^^^^^
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1115346 column 14 (char 37282819)
users:x:100:games
Starting ownfoil
users:x:100:games,ownfoil
ownfoil:x:99:100:Linux User,,,:/home/ownfoil:/sbin/nologin
Starting ownfoil
reading conf file
users:x:100:games,ownfoil
ownfoil:x:99:100:Linux User,,,:/home/ownfoil:/sbin/nologin
Starting ownfoil
reading conf file

/games/index.html is not found

Hello I just did a clean install of ownfoil on docker. The whole log when starting and trying to connect to the shop is shown in the following:

2024/01/05 01:16:51 [error] 27#27: *1 "/games/index.html" is not found (2: No such file or directory), client: 192.168.8.143, server: , request: "GET / HTTP/1.1", host: "192.168.8.223:8001"
Adding password for user abcxyz
Creating group app with GID 1000
2024-01-05 01:18:19,251 - INFO apscheduler.executors.default: Job "Backup saves (trigger: interval[1:00:00], next run at: 2024-01-05 02:16:08 UTC)" executed successfully
2024-01-05 01:16:08,705 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
Creating user app with UID 1000
Setting up authentification for user abcxyz.
Starting ownfoil
2024-01-05 01:16:08,704 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2024-01-05 01:16:08,706 - INFO apscheduler.scheduler: Added job "Generate shop" to job store "default"
2024-01-05 01:16:08,706 - INFO apscheduler.scheduler: Added job "Backup saves" to job store "default"
2024-01-05 01:16:08,706 - INFO apscheduler.scheduler: Scheduler started
2024-01-05 01:16:08,707 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-05 01:16:08 UTC)" (scheduled at 2024-01-05 01:16:08.704452+00:00)
2024-01-05 01:16:08,707 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[1:00:00], next run at: 2024-01-05 01:16:08 UTC)" (scheduled at 2024-01-05 01:16:08.704922+00:00)
2024-01-05 01:16:08,724 - INFO gen_shop: Found 146 directories, 190 game/save files
2024-01-05 01:16:08,726 - INFO gen_shop: Successfully wrote /games/shop.json
2024-01-05 01:16:08,728 - INFO gen_shop: Successfully wrote /games/shop.tfl
2024-01-05 01:16:08,728 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2024-01-05 01:21:08 UTC)" executed successfully
192.168.8.143 - abcxyz [05/Jan/2024:01:16:51 +0000] "GET / HTTP/1.1" 404 146 "-" "-" "-"
2024-01-05 01:18:19,250 - INFO save_manager: Device 192.168.1.200 is unavailable, aborting.

All of my files are picked up and stored inside of shop.json but I cannot connect to the shop for the life of me. I have reread the instructions over and over again and I cannot figure out what I missed. Thanks in advance.

V2 ERR_EMPTY_RESPONSE

I can run v1 no problem. When i switch my compose to the :v2, i cant see the webpage and get error
image

Heres my file
image

Empty filenames

Hi,
I have my switch library organized by folders, when I access the shop all my games filenames are empty.
Also, If I open a random game, it just opens a html page for that game.

Something like this, If I open the empty filename of game1 or game2 it just displays the html page.
Game3 that is in the root dir shows with the correct filename and opens fine.
/games/:

  • shop_config.toml
  • shop_template.toml
  • game1/game1.nsp
  • game2/game2.nsp
  • game3.nsp

Is this a known issue?
Any fix possible?
Thanks

Gdrive file recognition in shop.tfl

I was wondering if this application supports gdrive. I have added the API token to shop_config.toml and I'm struggling to add a gdrive file to the shop.tfl. Do you happen to know how to define a gdrive file in the files key? Or are there plans to add gdrive options to the setup tab?

thanks for the port solution earlier too. Worked perfectly

Permission issues

There is no clear indication on how to change permissions.

2023-08-08 16:51:35 2023-08-08 20:51:35,679 - INFO gen_shop: Found 0 directories, 0 game/save files
2023-08-08 16:51:35 2023-08-08 20:51:35,679 - ERROR gen_shop: Failed to write /games/shop.json, error was:
2023-08-08 16:51:35 [Errno 13] Permission denied: '/games/shop.json'
2023-08-08 16:51:35 2023-08-08 20:51:35,680 - ERROR gen_shop: Failed to write /games/shop.tfl, error was:
2023-08-08 16:51:35 [Errno 13] Permission denied: '/games/shop.tfl'
2023-08-08 16:51:35 2023-08-08 20:51:35,680 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-08-08 20:56:35 UTC)" executed successfully

cant find any directions to change permissions.

V2 can´t start ownfoil container

Starting ownfoil
ownfoil:x:1000:ownfoil
ownfoil:x:1000:1000:Linux User,,,:/home/ownfoil:/sbin/nologin
Starting ownfoil
warning: The following paths are not up to date and were left despite sparse patterns:
DE.de.json
After fixing the above paths, you may want to run git sparse-checkout reapply.

HTTPS / SSL native configuration

Feature request:
Could you possibly make the docker(-compose) with options for HTTPS/SSL with a configuration towards a certificate and port?

I don't like reverse proxy's. I would rather prefer it to be directly into the docker image.

ftplib.error_perm: 550 No such file or directory

Hi, first of all thanks for sharing this amazing project. I'm having an issue trying to get my saves from the switch.

FTP server is running smoothly so no issues on that matter. It seems like an error when trying to run the backup script.

Starting ownfoil
2023-05-04 17:49:28,368 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-05-04 17:49:28,368 - INFO apscheduler.scheduler: Adding job tentatively -- it will be properly scheduled when the scheduler starts
2023-05-04 17:49:28,377 - INFO apscheduler.scheduler: Added job "Generate shop" to job store "default"
2023-05-04 17:49:28,377 - INFO apscheduler.scheduler: Added job "Backup saves" to job store "default"
2023-05-04 17:49:28,377 - INFO apscheduler.scheduler: Scheduler started
2023-05-04 17:49:28,379 - INFO apscheduler.executors.default: Running job "Generate shop (trigger: interval[0:05:00], next run at: 2023-05-04 17:49:28 UTC)" (scheduled at 2023-05-04 17:49:28.078178+00:00)
2023-05-04 17:49:28,380 - INFO apscheduler.executors.default: Running job "Backup saves (trigger: interval[0:05:00], next run at: 2023-05-04 17:54:28 UTC)" (scheduled at 2023-05-04 17:49:28.368518+00:00)
2023-05-04 17:49:28,383 - INFO gen_shop: Found 0 directories, 0 game/save files
2023-05-04 17:49:28,389 - INFO gen_shop: Successfully wrote /games/shop.json
2023-05-04 17:49:28,390 - INFO gen_shop: Successfully wrote /games/shop.tfl
2023-05-04 17:49:28,391 - INFO apscheduler.executors.default: Job "Generate shop (trigger: interval[0:05:00], next run at: 2023-05-04 17:54:28 UTC)" executed successfully
2023-05-04 17:49:28,421 - INFO save_manager: Successfully connected to Switch device on host 192.168.0.105.
2023-05-04 17:49:28,421 - INFO save_manager: Retrieving saves from /switch/tinfoil/saves/common to /games/Saves/Tinfoil
2023-05-04 17:49:28,461 - ERROR apscheduler.executors.default: Job "Backup saves (trigger: interval[0:05:00], next run at: 2023-05-04 17:54:28 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/apscheduler/executors/base.py", line 125, in run_job
    retval = job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 195, in backup_saves
    switch_ftp.retrieve_saves(config['root_dir'] + '/' + folder['local'], folder['remote'])
  File "/app/backup_saves.py", line 106, in retrieve_saves
    dirs = self.get_dirs(remote_folder)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/backup_saves.py", line 94, in get_dirs
    res = self.ftp.retrlines(f'NLST {path}', lambda x: dirs.append(x))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 462, in retrlines
    with self.transfercmd(cmd) as conn, \
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 393, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 359, in ntransfercmd
    resp = self.sendcmd(cmd)
           ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 281, in sendcmd
    return self.getresp()
           ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ftplib.py", line 254, in getresp
    raise error_perm(resp)
ftplib.error_perm: 550 No such file or directory

Attaching my docker compose. PUID & PGID are ok

Screen Shot 2023-05-04 at 14 56 02

split nsp files

In tinfoil the ownfoil shop does not recognise split nsp's within folders generated by nx dump. Is there any way to use this to install split nsp?

Docker just breaks windows

I went to install docker, and when it's down installing it tells me to restart. So I clicked restart now, but when my computer started up it couldn't boot into the OS, and the recovery screen comes up. After a bunch of fiddling, I got my my computer working again, but I deleted everything related to docker. So how can I use this if I can't install docker?

[version 2] the new game not show on list

I installed successfully version 2 on Synology Nas

I tried copy new release game (NSP type) to the games folder but it not show on the list or tinfoil new game. old game still work perfect can you help me or give me some guide 🫡 . Thanks

cannot install anything above 1GB

Hi, The shop is working great, no complaints except that any NSP file above 1.0 GB starts to download then stops at 75% of the download progress bar and when I check the tinfoil console it says:

"network error 18: transfer closed with bytes remaining to read. code = 206"

No Games in "New Games"

Hi

After operating ownfoil for more than 6 months now (great job btw!) I decided to cleanup some other shops that were inactive and no longer necessary.
However after doing so, nothing appears from my local ownfoil. Browsing to the instance shows many 0b folders with no name, with the shop.json and shop.tfl files appearing in the root directory.

New Games appears empty while before deleting the other sources everything was ok.

How could this affect ownfoil? I have deleted & re-added, restarted the docker container but with the same result.

Thanks

Release v2.0.0

Ownfoil v2 is a complete rewrite of the project, using a web framework that allows much more flexibility. Instead of generating a static shop file (custom .tfl index) and serving it with Nginx, the shop is now directly served with an HTTP API when Tinfoil connects. It is far from completed, but should address all the main issues with the current implementation. It's available in the v2 branch.

The main advantages of the v2 are:

  • Library is scanned each time the shop is accessed
  • The shop is served with an HTTP API endpoint, no more writing to a file in the library, hence no permission issue
  • Settings and user creation is all done through a Web UI
  • The library can be viewed from the Web UI

Roadmap to release

In no particular order, things left to do before releasing Ownfoil v2:

  • Shop generation and Tinfoil access working
  • App settings saved and read from a file in /config/settings.yaml
  • Auth: setup user based permissions (Shop Access, Backup Access, Admin Access)
  • Library: download titledb files on first run (git clone)
  • Dockerize it
  • Github actions
  • Auth: Private / public shop
  • Auth: add warning if no Admin user exists
  • Library scan: use console keys to decrypt and identify files
  • Upload and validate console keys through the UI
  • Auth: Private / public library view
  • Auth: finish login page
  • Auth: admin user has all rights, not just "admin"
  • Backend: fork updated NSC_builder and include as a submodule / publish on pypi
  • Library view: add dropdown with select filters (up to date, out of date, base, dlc)
  • Library view: add DLC update status
  • Library view: add missing DLC status
  • Server: add server port as an app setting
  • Server: try running behind reverse proxy with HTTPS
  • Auth: ability to change user password/permissions
  • Library: regularly update titledb
  • Library: implement titles.json generation from all files
  • Library: rename files according to template
  • Library access: use random uid instead of db index
  • Library scan: add file watcher on the library path to update the db each change (added/renamed/deleted)
  • Library scan: support multiple library paths
  • Library view: build games list on the frontend
  • Library view: add pagination
  • Library view: add list view
  • Library view: add icon view
  • Shop generation: encrypted shop toggle
  • Add toast notification for every API call
  • Include js/css in static files
  • Write Setup page to guide users on how to access the shop on Tinfoil, DBI... (http adress, port, auth...)
  • Add logging everywhere
  • Refactor and clean code structure
  • Use a Bootstrap theme, with dark/light detection like flatly

How to test

To report issues and/or discuss about v2, see the discussion: #52
Use v2 tag, built every commit pushed to the v2 branch:

version: "3"

services:
  ownfoil:
    container_name: ownfoil
    image: a1ex4/ownfoil:v2
    environment:
      # For write permission in config directory
      - PUID=1000
      - PGID=1000
    volumes:
      - /your/game/directory:/games
      - ./config:/app/config
    ports:
      - "8465:8465"

Console error

Not initialize, Console error:

sudo: unknown user python
sudo: error initializing audit plugin sudoers_audit

Python: Can't Open File

I just updated to the latest version. After starting the container, it stops right away. These are the only 3 lines in my log:

USERNAME and PASSWORD environment variables not set, skipping authentification setup.
Starting ownfoil
python: can't open file '/app/ownfoil.py': [Errno 2] No such file or directory

I wiped out all images/volumes related to ownfoil and tried again, but the same thing happened again.

Here is my docker-compose:

ownfoil: 
    container_name: ownfoil
    image: a1ex4/ownfoil
    restart: unless-stopped
    environment:
      - ROOT_DIR=/games
    network_mode: bridge
    ports:
      - 9080:80/tcp
    volumes:
      - '/mnt/Roms/Switch:/games'

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.