Page 9 of 11

Posted: Wed 16 Dec 2009, 09:47
by zigbert
Version 1.1
See main post

changelog
- Removed decoration for navigation buttons.
- upgraded language handling
- asunder integration

Posted: Wed 16 Dec 2009, 15:34
by esmourguit
Bonjour à tous,
@ Zigbert,
pCD 1.1
I changed the french local file to fr-FR:french, but pCD starts in English only.
What's wrong?
Thanks in advance,
Cordialement ;)

Posted: Wed 16 Dec 2009, 16:20
by zigbert
fr-FR:french
....Oh no.....
fr_FR:french

Posted: Wed 16 Dec 2009, 18:21
by esmourguit
Bonjour à tous,
@ Zigbert,
Sorry, i renamed to fr_FR:french, and no french display anymore.
Cordialement ;)

Posted: Wed 16 Dec 2009, 21:46
by zigbert
Please try to download the package once more. I think it is fixed.


Sigmund

Posted: Thu 17 Dec 2009, 07:53
by esmourguit
Bonjour à tous,
@Zigbert,
Thank you very much, it works in french now.
Cordialement ;)

pcd - CD-audio player

Posted: Wed 30 Jun 2010, 14:51
by BobSongs
I'm using Puppy Linux 4.x on a RAM drive. I am using pcd (simple, sweet, effective) to listen to an audio CD. It pulled in the track names and all. Very nice!

This PC has two optical drives. pcd has no option to switch from one to the next. Is this feature added for puppy 5.x?

Thanks

Posted: Thu 01 Jul 2010, 04:35
by zigbert
BobSongs
Pcd always read the default CD-device (/dev/cdrom). You can change this by redefining your preferred device in the CD/DVD-wizard. See setup-menu.


Sigmund

Posted: Fri 20 Aug 2010, 20:45
by zigbert
Version 1.2
See main post

Changelog
- Progress bar
- 'Copy CD' goes directly to burn-options dialog in Pburn
- improved language detection (thanks to wow)
- Bugfix: Check internet connection when not using LANG=en_US (thanks to wow)
- Bugfix: 'Stop', 'next' and 'previous' button froze playing-song-info.
- Bugfix: Clear info when eject.

Important
Pmusic 1.3 includes playback (and simple ripping) of audio-CD. Pmusic will also show a complete progressbar, and give the possibility to jump forward/back in playback time. Pcd has a sweet and simple ui, but Pmusic will simulate pCD by using the -c switch. - 'pmusic -c' will read cd and start playing the first song. So why bother continue the development of pCD. The answer is simply system-usage. While pCD pipes the rip directly into the player (cdda2wav | aplay), pmusic first rip, then starts the universal converter that pipes the result into the player (cdda2wav; ffmpeg | aplay). This gives more use of both cpu and temporary storage / memory. The reason why doing it so complex in Pmusic is to achieve more flexibility of the output stream.


Sigmund

Posted: Tue 28 Sep 2010, 14:25
by Karl Godt
Hi zigbert !

like pfind I like pCD very much !

but I'd like to have pCD starting from menu without autoprobing for CD drives and contents.
so I made a little pCDmenustart.sh :
usr-local-bin

#!/bin/bash
## this is a shellscript to not search automatically for CD drives running pCD from the menu

export MENUSTART=1
exec pcd
exit

and added this to
usr-local-pcd-pcd

line 27+

if [ $MENUSTART = 1 ]; then
. $APPDIR/func -stop
else
. $APPDIR/func -probe
fi

but most annoying is the "Hickup" after finishing the last song.
so I added this to
usr-local-pcd-func
-play) line 125 +
lines 140+

Code: Select all

   TTR=`cat $WORKDIR/pcd-cddb | grep "total tracks:" | cut -f 5 -d " " | tr "," ":" | cut -f 2 -d ":" | tr -d ":"` #; echo $TTR
	WASPLAYING=`cat $WORKDIR/pcd-nr`
	if [ $TTR -gt $WASPLAYING ]; then  
	$APPDIR/func -next
	else
	$APPDIR/func -stop
	fi
	;;
I modified pCD Version=1.2 running Quirky 1.3 and posting from it now

Thank you again very much for your work!

Posted: Tue 28 Sep 2010, 16:02
by zigbert
Karl Godt
Great stuff!
I will look at it when I am back home from holiday


Sigmund

Posted: Thu 04 Nov 2010, 21:07
by Karl Godt
I should change the code to something like

echo forHELLved... > /tmp/pcd.menustart

instead of using export : I had to realize that export just works inside its shell and not even at a later opened terminal.

and accordingly

if test -f /tmp/pcd.menustart; then
. $APPDIR/func -stop
else
. $APPDIR/func -probe
fi

Posted: Sat 06 Nov 2010, 08:34
by zigbert
Version 1.3
See main post

changelog
- Set pCD to defaultcdplayer (thanks to BarryK)
- parameter -x skips disc to spin at startup. (thanks to Karl Godt)
- Bugfix: pCD tries to read next song after played the last song. (thanks to Karl Godt)

Posted: Sat 06 Nov 2010, 08:38
by zigbert
Karl Godt
I added your hickup fix, but used an alternative solution for the anti-spinup. Using parameters makes life easier if we later want more options.....


Thank you, and sorry for taking so long
Sigmund

Posted: Sat 06 Nov 2010, 10:44
by Karl Godt
NEXT : pcd-1.3 :

is working well on dpup-008
(I also kicked out confusing or buggy gnome-mplayer and replaced it with gxine from dpup-005 )

unfortunately 2 things to report :
/usr/share/applications/pcd.desktop
Exec=pcd
should be
Exec=pcd -x

/root/Downloads/pcd-1.3/pinstall.sh
the syntax seems to be confusing

Code: Select all

#!/bin/sh
#post-install script.
if [ "`pwd`" != "/" ];then
  echo '#!/bin/sh' > ./usr/local/bin/defaultcdplayer
  echo 'exec pcd' >> ./usr/local/bin/defaultcdplayer
  chmod 755 ./usr/local/bin/defaultcdplayer
fi
1.: if [ "`pwd`" != "/" ];then
can it be omitted ?

2.: ./usr/local/bin/defaultcdplayer
shouldn't it be just
/usr/local/bin/defaultcdplayer
without the dot ?

I would prefer
a whole
/pcd-1.3/usr/local/bin/defaultcdplayer
#!/bin/sh
exec pcd "$@"
inside the directory before doing dir2pet.

I am learning to create pets also and can only say that tgz2pet didn't worked properly for me
but dir2pet did.
To create pre- or post-install scripts that create a backup of the old defaultmediaplayer script I have just a misty imagination of
something like that :
if test -f /FILE; then
cp /FILE /FILE.PET.bak

pCD is the best CD player I know because gxine is very noisy on using the cd/dvd drive.

Posted: Sat 06 Nov 2010, 20:04
by zigbert
Karl Godt
I would like /usr/share/applications/pcd.desktop to execute pCD the normal way (with spin-up) by default. I think that this is the best solution for most users. You can manually edit the .desktop file, or make a symlink on your desktop to include the -x switch.

The pinstall script is not my code. Barry asked me to include it, and I don't mess with that guy, else I got very good reasons :D


Sigmund

Posted: Sat 06 Nov 2010, 23:14
by BarryK
Karl Godt wrote:/root/Downloads/pcd-1.3/pinstall.sh
the syntax seems to be confusing

Code: Select all

#!/bin/sh
#post-install script.
if [ "`pwd`" != "/" ];then
  echo '#!/bin/sh' > ./usr/local/bin/defaultcdplayer
  echo 'exec pcd' >> ./usr/local/bin/defaultcdplayer
  chmod 755 ./usr/local/bin/defaultcdplayer
fi
1.: if [ "`pwd`" != "/" ];then
can it be omitted ?
It is that way for very good reason. If a PET is to be installed when building a Puppy in Woof, the current-directory when 'pinstall.sh' is run is not '/', hence the '.' in front is essential (or just usr/localbin/defaultcdplayer).

The 'if' test is testing if installing in Woof. It depends what you want. If you only want to change the default CD player when installing in Woof, then need that test.

SED and DOUBLE QUOTES

Posted: Sun 07 Nov 2010, 10:42
by Karl Godt
Thanks for the clarification !

It seems that

Code: Select all

#!/bin/bash
# post-install script.
# if [ "`pwd`" != "/" ];then
if test -f /etc/xdg/templates/_root_.jwmrc ; then
cp /etc/xdg/templates/_root_.jwmrc /etc/xdg/templates/_root_.jwmrc.acpitool.bak
cp /etc/xdg/templates/_root_.jwmrc /tmp

S1=`cat -n /tmp/_root_.jwmrc | grep -n '<\!-- <Exit confirm="false" label="Exit to prompt" icon="prompt16.xpm" /> -->'`
S1LN=`echo $S1 | cut -f 1 -d ":"`
S9=`cat -n /tmp/_root_.jwmrc | grep -n '</JWM>'`
S9LLN=`echo $S9 | cut -f 1 -d ":"`
TP=`expr $S9LLN - $S1LN`
TAIL=`tail -n $TP /tmp/_root_.jwmrc`
HEAD=`head -n $S1LN /tmp/_root_.jwmrc`

NEWMENUP='  <Program label=\"Suspend to RAM -- light sleep\" icon=\"zz.png\">rxvt -e acpitool -s</Program>'

SEDINSL=`expr $S1LN + 1`

# sed '45i\newline' file | sed '45inewline' file 
# use -i to edit in place redirect using '> outfile' to copy it to another file.
# Also the backslash isn't necessary, I just put it there for clarity. 

sed -i "$SEDINSL i\ $NEWMENUP" /etc/xdg/templates/_root_.jwmrc 
# ' prevents sed from using Variables

fixmenus
`jwm -restart`
fi
exit
is working well for me !

It is a pet that contains 2 icons and the simple debian-squeeze acpitool binary.

It took me perhaps 24 hours to find out about the sed syntax to write a line somewhere into a file.
head and tail had been the first attempt of mine but echo $TAIL or $HEAD > FILE converted it to one string.

awk I was trying also , perhaps it also needed Double Quotes to use $VARIABLES.

Posted: Sun 07 Nov 2010, 15:24
by abushcrafter
In the pinstall.sh in the current package for pcd 1.3. You forgot to add ""$@"". So you should have this: "/usr/local/bin/defaultcdplayer":

Code: Select all

#!/bin/sh
exec pcd "$@"

tracks don't show in window

Posted: Sat 27 Nov 2010, 21:24
by don570
I'm not sure which version of pcd

Tested versions in wary 098 and luci 239

I launched pcd with no CD in tray
and got the message in window 'No disc inserted'

When I inserted Audio CD, then clicked 'Read CD'
then clicked play icon , the window still showed
'No disc inserted'. The entire CD did play to the end.

Note : I don't have internet access so it can't search
for names of tracks on the internet.