Re: DogRadio updated, v2
@fredx181 maybe just the option to turn the crawl on or off
Discussion, talk and tips
https://forum.puppylinux.com/
@fredx181 maybe just the option to turn the crawl on or off
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
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
Hello @jecniken
Would you verify the link to the script in the above post?
This looks like AI used to spam in a link. Where does it link too??
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.
rockedge wrote: Thu May 11, 2023 8:33 pmThis looks like AI used to spam in a link. Where does it link too??
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 !!
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
@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????
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?
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.
78.146.245.122
is the reported IP in the forum's logs. I can check the server logs if needed.
Cheers ... here's what i found!
What's the reason you didn't use --monitor with your yad --icons --read-dir string?
stemsee wrote: Fri Jun 02, 2023 8:58 pmWhat's the reason you didn't use --monitor with your yad --icons --read-dir string?
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).
thanks fred
one request I have is that your radio station desktop files be created with full path to icons. cheers!
stemsee wrote: Sat Jun 03, 2023 5:49 pmthanks fred
one request I have is that your radio station desktop files be created with full path to icons. cheers!
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 ...)
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
"
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)
fredx181 wrote: Mon Jun 05, 2023 2:48 pmTo show a different icon: Add/Remove > Edit and select custom icon (edit; but you probably know).
Actually I never tried the Edit (mentally blocked even seeing it!)
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?
@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.
@mikewalsh jq is easy to install. Open PPM and search for "jq" them scroll down in the results.
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.
.
.
Thanks, rockedge & bigpup. Up & running