@fredx181 maybe just the option to turn the crawl on or off
DogRadio updated, v2
Moderator: Forum moderators
- rockedge
- Site Admin
- Posts: 6481
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2693 times
- Been thanked: 2592 times
- Contact:
Re: DogRadio updated, v2
I also have ffmpeg -i ripping the stream,
ffmpeg -i $(cat /root/.dogradio2/tmp/nowurl) /root/$URL-$(date +%d-%m-%y).mp3
I saw this and wondered by you choose to record directly to mp3.
I am not sure how you would implement this but if you wanted no overhead you could try identify the audio codec used and then simply use the copy command eg
Code: Select all
ffmpeg -i <radio station url here>
that would identify the audio codec
then you could use ........... that is if is identified as AAC
Code: Select all
ffmpeg -i <radio station url here> -c copy <your filename>.aac
also, if you do find the volume too low for your recordings try this:
Code: Select all
ffmpeg -i <radio station url here> -af 'volume=2' -c copy <your filename>.aac
Just a working example ..... BBC Radio 5 Live is a talk station in the UK.
Code: Select all
ffmpeg -i http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_vlow/ak/bbc_radio_five_live.m3u8 -af 'volume=2' -c copy test.aac
ffmpeg -i http://a.files.bbci.co.uk/media/live/manifesto/audio/simulcast/hls/uk/sbr_vlow/ak/bbc_radio_five_live.m3u8 -c copy test.aac
- stemsee
- Posts: 759
- Joined: Sun Jul 26, 2020 8:11 am
- Location: lattitude 8
- Has thanked: 184 times
- Been thanked: 126 times
Re: DogRadio updated, v2
This algorithm complements DogRadio in that if you like me have lists of radio stations from yradio or snapp, then this converts them into DogRadio .desktop files. Put script in the directory with your playlist.* lists and double click.....There will be a lot of desktop files, so these are made in /root/my-documents ... manually copy to /root/.dogradio2/data
Code: Select all
#!/bin/bash
# by stemsee
for i in $(ls playlist.*)
do
cat "$i" | while read line
do
if [ ! -z "$line" ]; then
URL="$(echo $line | cut -f1 -d'|')"
if [ ! -z "$URL" ]; then
NAME="$(echo $line | cut -f2 -d'|')"
echo "[Desktop Entry]
#URL=$URL
Name=$NAME
Version=1.0
Comment=
Exec=/bin/bash -c \"export URL='"$URL"'; export NAME='"$NAME"'; export ICON='icons/search.png'; ./func\"
Icon=/root/.dogradio2/data/icons/search.png
StartupNotify=false
Terminal=false
Type=Application
" > /root/my-documents/"$NAME".desktop
fi
fi
done
done
-
- Posts: 3777
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1597 times
- Been thanked: 512 times
- rockedge
- Site Admin
- Posts: 6481
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2693 times
- Been thanked: 2592 times
- Contact:
- fredx181
- Posts: 2997
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 364 times
- Been thanked: 1272 times
- Contact:
Re: DogRadio updated, v2
Obviously spam, but different IMO from what we were used to. It seems that @stemsee's code in the above post has been analyzed and the link isn't really advertising I'd say.
Quoted:
This is a shell script written in the Bash scripting language. It is a simple script that reads in files with names starting with "playlist." from the current directory and creates a desktop entry for each line in the file. The desktop entries are saved in the /root/my-documents/ directory with a name based on the second field in each line of the file.
Here's what the script does in more detail of why does my cat lay on my clothes
The first line, "#!/bin/bash", is called a shebang and specifies that the script should be run using the Bash interpreter.
The "for" loop on the second line iterates over all the files in the current directory whose names start with "playlist.".
Inside the loop, the script reads each line of the current file using the "read" command.
If the line is not empty, the script uses the "cut" command to extract the first field (URL) and the second field (NAME) separated by the "|" character.
If the URL field is not empty, the script creates a desktop entry using the data obtained from the current line. It sets the name, URL, version, comment, icon, and other properties of the desktop entry using a here-document (the text enclosed in double quotes after the "echo" command). The desktop entry is saved to /root/my-documents/ directory with a name based on the NAME field obtained from the current line.
Finally, the "done" statement ends the "for" loop.
- fredx181
- Posts: 2997
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 364 times
- Been thanked: 1272 times
- Contact:
Re: DogRadio updated, v2
Posts crossed, it links to some website about cats, looks innocent to me (but that's just me )
EDIT: You do have cats, don't you ? It's for you !!
- Wiz57
- Moderator
- Posts: 562
- Joined: Fri Dec 13, 2019 3:54 pm
- Location: Chickasha, OK USA
- Has thanked: 77 times
- Been thanked: 113 times
Re: DogRadio updated, v2
Definitely spam, possibly AI generated. My first instinct is to delete it and ban the poster...
I'll leave it up to rockedge. (for now)
Wiz
Signature available upon request
- rockedge
- Site Admin
- Posts: 6481
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2693 times
- Been thanked: 2592 times
- Contact:
Re: DogRadio updated, v2
@Wiz57 It seems odd to me that there is such a link in a post about Bash scripting which makes it suspect. My instinct is to ban and delete.
We can always apologize if it is a mistake. There are enough options to contact the forum administration if needed. A kitten wiki????
- stemsee
- Posts: 759
- Joined: Sun Jul 26, 2020 8:11 am
- Location: lattitude 8
- Has thanked: 184 times
- Been thanked: 126 times
Re: DogRadio updated, v2
It's just like a chatgpt assessment of code I might submit to it! I thought it was a good commentary on my code except I didn't use heredocs. So I think someone actually submitted my code to chatgpt or another AI engine and asked for a description of it. Then they posted it here. What's the ip and mac address loookup show?
- mikewalsh
- Moderator
- Posts: 6115
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 779 times
- Been thanked: 1952 times
Re: DogRadio updated, v2
Well.....it's history. Gone....
As stated, it's easy enough to get in touch with Admin if needs be.....but I'll be damned surprised if we ever hear from this individual again. And if it WAS AI-generated, all the analysis would probably reveal would be a VPN to hide behind.
Pointless.
(*shrug*)
Mike.
- rockedge
- Site Admin
- Posts: 6481
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2693 times
- Been thanked: 2592 times
- Contact:
Re: DogRadio updated, v2
78.146.245.122
is the reported IP in the forum's logs. I can check the server logs if needed.
- fredx181
- Posts: 2997
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 364 times
- Been thanked: 1272 times
- Contact:
Re: DogRadio updated, v2
Well, yes, would be nice as it doesn't need restart with add/remove, but I wanted to keep compatibility with older yad versions (--monitor was added in v0.36).
EDIT: I will look at it, perhaps with a version check e.g. restart if version lower than 0.36, monitor if 0.36 or higher.
EDIT2: v2.5 attached at first post, add/remove works now without restarting the main GUI (by using the --monitor option, thanks @stemsee) , but only if yad version is 0.36 or higher (edit; otherwise will do a GUI restart).
- fredx181
- Posts: 2997
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 364 times
- Been thanked: 1272 times
- Contact:
Re: DogRadio updated, v2
Ok, probably that can be done, but what is exactly your goal by having icons full path ?
edit: and in which case (e.g. when adding custom radio station or from search or ...)
- stemsee
- Posts: 759
- Joined: Sun Jul 26, 2020 8:11 am
- Location: lattitude 8
- Has thanked: 184 times
- Been thanked: 126 times
Re: DogRadio updated, v2
From using dogradio2 it seems that when I add urls from search they all get the search.png...isn't that the case? And apart from those already setup with custom icons, all additions get the generic search.png, unless I missed something....if that's the case then in both cases it's the same outcome ... or . . ? Also are the URL= commented to prevent browser from opening the $URL?
Anyway I was converting desktop radio stations to self playing desktop files....but if not in dogradio2 the desktop files don't look as good in the file browser if full icon path is not given.
Code: Select all
echo "[Desktop Entry]
#URL=$URL
Name=$NAME
Version=1.0
Comment=
Exec=mpv $URL
Icon=/root/.dogradio2/data/icons/search.png
StartupNotify=false
Terminal=false
Type=Application
"
- fredx181
- Posts: 2997
- Joined: Tue Dec 03, 2019 1:49 pm
- Location: holland
- Has thanked: 364 times
- Been thanked: 1272 times
- Contact:
Re: DogRadio updated, v2
stemsee wrote:From using dogradio2 it seems that when I add urls from search they all get the search.png...isn't that the case?
Yes, from search always search.png. For adding from a category (playlist) it works in some cases to get the icon matching with , e.g. from category Rock or Blues or BBC it will show Rock.png or Blues.png or BBC.png .
And apart from those already setup with custom icons, all additions get the generic search.png, unless I missed something....if that's the case then in both cases it's the same outcome ... or . . ?
To show a different icon: Add/Remove > Edit and select custom icon (edit; but you probably know).
Also are the URL= commented to prevent browser from opening the $URL?
No, just a workaround to easy parse (in dogradio script) the URL from .desktop file when editing (Add/Remove > Edit), no other purpose.
edit: this: grep '#URL=' "$(cat radio)" | sed 's|#URL=||' >> edit
Here's dogradio script modified to add full icon path in new created (or edited through Add/Remove > Edit ) .desktop files.
To change to full icon path for the already existing items, you can simply do;
Add/Remove > Select item > Edit > Click OK . (not needed to select the icon, should automatically change to full icon path, from what I tested)
- stemsee
- Posts: 759
- Joined: Sun Jul 26, 2020 8:11 am
- Location: lattitude 8
- Has thanked: 184 times
- Been thanked: 126 times
- mikeslr
- Posts: 2944
- Joined: Mon Jul 13, 2020 11:08 pm
- Has thanked: 178 times
- Been thanked: 905 times
Re: DogRadio Jammypup64-9.8 -jq missing Solved
I'd like to run dogradio under Jammypup64-9.8, Grey's Puppy. It installs. But when run it reports:
"Package 'jp' is not installed. Please install it."
Any ideas?
- mikewalsh
- Moderator
- Posts: 6115
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 779 times
- Been thanked: 1952 times
Re: DogRadio updated, v2
@mikeslr :-
Which is it, Mike......."jq", or "jp"?
In Xenialpup64 ATM. Searching with pFind returns a bunch of "jp"s in /etc/X11/xkb/symbols, though I've no idea what package the message refers to, I'm afraid. The PPM is not very forthcoming on this!
@fredx181 is probably your best bet for this one, I guess.
T'other Mike.
- rockedge
- Site Admin
- Posts: 6481
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2693 times
- Been thanked: 2592 times
- Contact:
Re: DogRadio updated, v2
@mikewalsh jq is easy to install. Open PPM and search for "jq" them scroll down in the results.
- bigpup
- Moderator
- Posts: 6929
- Joined: Tue Jul 14, 2020 11:19 pm
- Location: Earth, South Eastern U.S.
- Has thanked: 895 times
- Been thanked: 1508 times
Re: DogRadio updated, v2
fossapup64 9.6 (F96-CE_4)
Installed the latest dogradio-2.5.0-noarch.pet
First run got the message about needing jq.
Used PPM doing a search for jq.
Found jq_1.6-1
Downloaded and installed jq with a few dependency items PPM also installed:
After installing the needed stuff.
Running OK for me.
.
.
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected