General discussion

Here you can discuss everything related to MOC which doesn't fit other subforum.

Change in minimum terminal size

Hi.

I used to run moc using a ~160x9/210x12 char terminal or so (160 columns, 9 lines), and this worked just fine.

Recently, I upgraded from Debian etch to testing (1:2.5.0~alpha3+svn20080629-2), and this "broke" moc, as it now complained about the terminal size being too small.

I tracked this down to the following commit fragment using rgrep and `svn blame`:

------------------------------------------------------------------------
r2062 | daper | 2008-02-10 17:00:29 +0200 (Sun, 10 Feb 2008) | 3 lines

Don't exit program if the terminal heught is below some limit, just print an
error message. (Niels Aan de Brugh)

------------------------------------------------------------------------
Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2061)
+++ interface_elements.c (revision 2062)
@@ -2252,10 +2273,9 @@
}

/* End the program if the terminal is too small. */
-static void check_term_size ()
+static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- if (COLS < 79 || LINES < 7)
- interface_fatal ("The terminal is too small after resizeing.");
+ mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
}

The commit message doesn't have any rationale for the change, and seems quite unrelated. Was this an inadvertent change, or was there some reason for raising the lines limit and lowering the columns limit?

In any case, mocp "breaks"/looks weird on a 59-column terminal now.

Find below a simple `svn diff` against trunk@r2150.

-- Tero Marttila

Index: interface_elements.c
===================================================================
--- interface_elements.c (revision 2150)
+++ interface_elements.c (working copy)
@@ -2356,7 +2356,7 @@
/* End the program if the terminal is too small. */
static void check_term_size (struct main_win *mw, struct info_win *iw)
{
- mw->too_small = iw->too_small = COLS < 59 || LINES < 17;
+ mw->too_small = iw->too_small = COLS < 79 || LINES < 7;
}

/* Update the title with the current fill. */

MOC and JACK aren't playing nicely

I was playing around with JACK, and then tried to start MOC.

Output:
Can't load plugin libmusepack_decoder: file not found
Running the server...
Trying JACK...

FATAL_ERROR: Can't create buffer thread

FATAL_ERROR: Server exited

Other JACK-enabled programs I tried (Ardour, Audacity, Mplayer, Hydrogen) work. MOCP is from Arch Linux repos, ie compiled with JACK, so it's not that. Should I try and grep the debug files for more info or am I missing something really simple here? :)

cant display greek characters

I'm using ubuntu 9.04 and have installed moc. But I cant find a way to display filenames with greek characters.Help?

Show filenames instead of using tags?

Hi there,

Is it possible to set the 'Playing...' part in the interface to only use filenames and not tags? There is an option in the config for setting filenames but it doesn't seem to apply to that bit.

I have played with the FormatString option but there seems to be no %f for filename there. Removing that option or just leaving the seperate parts blank does not work. If there are no ID3 tags for the track moc will just show you the filename so the functionality is there, I would just like to force it myself if possible. Maybe something I am missing?

Thanks

moc on kubuntu hardy with creative x-fi and oss, can't read from mixer

I've installed on 2 machines, and it works beautifully with alsa... last machine (with the best speakers of course) has a creative x-fi inside; it's using oss and is giving me trouble. moc will open and play audio no problem, but I can't see volume levels or adjust them; I'm simply told 'can't read from mixer.'

The following are the relevant settings:


SoundDriver = OSS
OSSDevice = /dev/dsp
OSSMixerDevice = /dev/mixer0
OSSMixerChannel = pcm
OSSMixerChannel2 = master

Any thoughts?

A lyrics script I coded in Perl

I coded this script today before I knew about the existence of moc-lyrics.pl

Oh well, here is my script if anyone wants it. It's my first complete, semi-functional perl script.


#!/usr/bin/perl
#This is a script for the MOC player that will fetch the lyrics of the currently
#playing song from metrolyrics.com. The lyrics change automatically when the song
#changes.
require LWP::UserAgent;
use HTTP::Request::Common;
use HTML::Entities;

my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
$ua->agent("Mozilla/8.0");

sub getCurrentSongArtist {
return `mocp -i | grep 'Artist:' | sed -e 's/^.*: //' | tr "\n" " "`;
}

sub getCurrentSongTitle {
return `mocp -i | grep 'SongTitle:' | sed -e 's/^.*: //' | tr "\n" " "`;
}

sub getCurrentSongLyrics {

$currentSongInfoSearch = $_[0];
$currentSongInfoSearch =~ s/ /\+/g;
#trying metro lyrics first
my $lyricsFoundList = $ua->request(POST 'http://www.metrolyrics.com/search.php', [search => $currentSongInfoSearch, category => "artisttitle", action=> "Search"]);

$currentSongLyricsSearch = $lyricsFoundList->decoded_content;
$currentSongLyricsSearch =~ s/\n/ /g;

if ($currentSongLyricsSearch =~m//){
$currentSongLyricsURL = $1;
}

my $lyricsFetchRequestFoundList = $ua->request(GET "http://www.metrolyrics.com/$currentSongLyricsURL");
$lyricsFetchRequestHTML = $lyricsFetchRequestFoundList->decoded_content;
$lyricsFetchRequestHTML =~s/\n/ /g;

if ($lyricsFetchRequestHTML =~/(.*?)/m){
$currentSongLyrics = $1;
}

$currentSongLyrics = decode_entities($currentSongLyrics);
$currentSongLyrics =~ s// /g;
return " $_[0] \n ------- \n $currentSongLyrics";
}

$active = true;
while ($active){
$currentSong = &getCurrentSongArtist . &getCurrentSongTitle;

if ($currentSong ne $currentSongCheck){
system("clear");
print &getCurrentSongLyrics($currentSong);
}

$currentSongCheck = &getCurrentSongArtist . &getCurrentSongTitle;

sleep(3);
}

Here's a screenshot of it in action:
http://i118.photobucket.com/albums/o120/robertgame/2009-05-03-015731_1680x1050_scrot.jpg

Problem with playing some FLAC files

I'm not seeing a link to a bug tracker, so I hope no one minds if I use the forum. Anyway, I get "Read error processing frame" when trying to play certain FLAC files, but Mplayer plays them without problems.

Linux version:
Linux larch 2.6.29-ARCH #1 SMP PREEMPT Wed Apr 8 12:47:56 UT
Intel(R) CPU 575 @ 2.00GHz GenuineIntel GNU/Linux

MOC version:
moc 2.4.4 Build: Mar 21 2009 06:20:27
Compiled with: OSS ALSA JACK DEBUG internet streams resample
(I didn't build it myself, it's from the Arch Linux repos.)

Any ideas?

Is it possible that moc can be a video playlist manager?

hi, I really like moc for its simplicity and usability. I'm already using it for listen musics, now I'm wondering if it can be used to play videoes: just manage the playlist like a music list, and call another program like mplayer to play video.
Does anyone know is that possible? thank you very much.

Pages

Subscribe to RSS - General discussion