Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More errors when running run.sh #4

Open
topchyan opened this issue Mar 22, 2024 · 6 comments
Open

More errors when running run.sh #4

topchyan opened this issue Mar 22, 2024 · 6 comments

Comments

@topchyan
Copy link

Getting a few more issues here as I'm trying to use the app:

avetik@lobya:~/python-apps/oceaneyes
$ sh run.sh 
run.sh: 17: [[: not found
[i] Running App from within ... /home/avetik/python-apps/oceaneyes
[i] Radio @192.168.1.1 status: Offline
Traceback (most recent call last):
  File "/home/avetik/python-apps/oceaneyes/app/main.py", line 222, in <module>
    main()
  File "/home/avetik/python-apps/oceaneyes/app/main.py", line 103, in main
    fav_remaining  = oe.get_remaining("fav")
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/avetik/python-apps/oceaneyes/app/oceaneyes.py", line 542, in get_remaining
    f = int(get_total("fav"))
            ^^^^^^^^^^^^^^^^
  File "/home/avetik/python-apps/oceaneyes/app/oceaneyes.py", line 534, in get_total
    f = c[2].split(",")
        ~^^^
IndexError: list index out of range
INFO:root:[i] FastAPI available
INFO:root:[i] Starting FastAPI as background task
sh: 1: kill: Illegal number: 0.0
INFO:     Started server process [4901]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://192.168.1.237:1929 (Press CTRL+C to quit)
@duracell80
Copy link
Owner

duracell80 commented Mar 22, 2024

That's an odd one as 1.1 is normally a gateway.

What's the output of:
cat ~/python-apps/oceaneyes/app/settings.db

It basically is trying to contact your radio at the wrong ipaddr. Try adding the ipaddr of your radio manually with nano for device 1

nano ~/python-apps/oceaneyes/app/settings.db
{"_default": {"1": {"ipaddress": "192.168.1.250", ...

@topchyan
Copy link
Author

That's an odd one as 1.1 is normally a gateway.

What's the output of: cat ~/python-apps/oceaneyes/app/settings.db

$ cat ~/python-apps/oceaneyes/app/settings.db
{"_default": {"1": {"ipaddress": "192.168.1.1", "language": "English"}, "2": {"ipaddress": "192.168.1.250", "language": "English"}, "3": {"ipaddress": "0.0.0.0", "language": "English"}, "4": {"ipaddress": "0.0.0.0", "language": "English"}, "5": {"ipaddress": "0.0.0.0", "language": "English"}, "6": {"ipaddress": "0.0.0.0", "language": "English"}, "7": {"ipaddress": "0.0.0.0", "language": "English"}, "8": {"ipaddress": "0.0.0.0", "language": "English"}, "9": {"ipaddress": "0.0.0.0", "language": "English"}, "10": {"ipaddress": "0.0.0.0", "language": "English"}}}

@duracell80
Copy link
Owner

Try this

sed -i 's/192.168.1.1/192.168.1.250/' ~/python-apps/oceaneyes/app/settings.db

@topchyan
Copy link
Author

I think it worked okay.
I was able to use some of the API functions, such as mute/unmute.
Parameters for some may need to be clarified
Couldn't invoke backup function for some reason, not sure why it failed.

@duracell80
Copy link
Owner

duracell80 commented Mar 26, 2024

I appreciate the feedback!

Yes the backup, I got some of these exceptions too but only on one radio. The other one was ok. So their export is encrypted (http://192.168.1.250/php/saveFav.php) so I was trying to put together a plain text output and in the process trying to decode the country and genre codes (http://192.168.1.250/php/get_CG.php)

Make a backup of ~/python-apps/oceaneyes and update the base repo to get the latest. Try installing fresh. Things are working a lot better now for me too across both radios I have.

http://192.168.1.237:1929/v1/1/fav/backup

For the most part the JSON and CSV output here is decoding the country and genre codes:

http://192.168.1.237:1929/v1/1/fav/playlist/json
http://192.168.1.237:1929/v1/1/fav/playlist/csv

The M3U output might be the most useful for getting (non skytune) stations out. As for skytune managed stations they've obfuscated it behind some sort of indexing lookup

http://192.168.1.237:1929/v1/1/fav/playlist/m3u

@topchyan
Copy link
Author

It worked! Thank you for your work on these issues!

The only weird thing I see when loading the backup file is the same URL shared across many saved favorites
Radio Station name changes, but the URL is the same:

https://streaming.radio.co/s5c5da6a36/listen

I can't tell whether that's intentional or erroneous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants