Skip to content
Browse files

Merged WWW/YoutubeViewer/AuthToken.pm into WWW/YoutubeViewer.pm

Now, the new access token is saved into the authentication file right after it is recieved.
Removed the support for access_token and refresh_token configuration keys.
Removed the support for the very old config file style which consisted only of a HASH ref.
GTK Youtube Viewer has a new awesome icon. (thanks to posixru - http://zenway.ru/)
  • Loading branch information...
1 parent ab983c6 commit b1160a7e6847d5d3f51d35611ded218a87524c35 @trizen committed Nov 24, 2013
View
2 WWW-YoutubeViewer/MANIFEST
@@ -4,7 +4,6 @@ Build.PL
Changes
ignore.txt
lib/WWW/YoutubeViewer.pm
-lib/WWW/YoutubeViewer/AuthToken.pm
lib/WWW/YoutubeViewer/GetCaption.pm
lib/WWW/YoutubeViewer/Itags.pm
lib/WWW/YoutubeViewer/ParseXML.pm
@@ -17,7 +16,6 @@ META.yml
README
share/gtk-youtube-viewer.desktop
share/gtk-youtube-viewer.glade
-share/gtk-youtube-viewer.png
share/icons/default_thumb.jpg
share/icons/feed_icon.png
share/icons/gtk-youtube-viewer.png
View
14 WWW-YoutubeViewer/META.json
@@ -4,7 +4,7 @@
"Daniel \"Trizen\" Șuteu <trizenx@gmail.com>"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.4008, CPAN::Meta::Converter version 2.132830",
+ "generated_by" : "Module::Build version 0.42",
"license" : [
"perl_5"
],
@@ -15,6 +15,10 @@
"name" : "WWW-YoutubeViewer",
"prereqs" : {
"build" : {
+ "recommends" : {
+ "Term::ReadLine::Gnu::XS" : "0",
+ "XML::Fast" : "0"
+ },
"requires" : {
"Test::More" : "0"
}
@@ -25,10 +29,6 @@
}
},
"runtime" : {
- "recommends" : {
- "Term::ReadLine::Gnu::XS" : "0",
- "XML::Fast" : "0"
- },
"requires" : {
"Data::Dump" : "0",
"File::Path" : "0",
@@ -50,10 +50,6 @@
"file" : "lib/WWW/YoutubeViewer.pm",
"version" : "0.05"
},
- "WWW::YoutubeViewer::AuthToken" : {
- "file" : "lib/WWW/YoutubeViewer/AuthToken.pm",
- "version" : "0.01"
- },
"WWW::YoutubeViewer::GetCaption" : {
"file" : "lib/WWW/YoutubeViewer/GetCaption.pm",
"version" : "0.01"
View
8 WWW-YoutubeViewer/META.yml
@@ -7,7 +7,7 @@ build_requires:
configure_requires:
Module::Build: 0
dynamic_config: 1
-generated_by: 'Module::Build version 0.4008, CPAN::Meta::Converter version 2.132830'
+generated_by: 'Module::Build version 0.42, CPAN::Meta::Converter version 2.132830'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -17,9 +17,6 @@ provides:
WWW::YoutubeViewer:
file: lib/WWW/YoutubeViewer.pm
version: 0.05
- WWW::YoutubeViewer::AuthToken:
- file: lib/WWW/YoutubeViewer/AuthToken.pm
- version: 0.01
WWW::YoutubeViewer::GetCaption:
file: lib/WWW/YoutubeViewer/GetCaption.pm
version: 0.01
@@ -35,9 +32,6 @@ provides:
WWW::YoutubeViewer::Utils:
file: lib/WWW/YoutubeViewer/Utils.pm
version: 0.02
-recommends:
- Term::ReadLine::Gnu::XS: 0
- XML::Fast: 0
requires:
Data::Dump: 0
File::Path: 0
View
2 WWW-YoutubeViewer/Makefile.PL
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.4008
+# Note: this file was auto-generated by Module::Build::Compat version 0.4200
require 5.016;
use ExtUtils::MakeMaker;
WriteMakefile
View
62 WWW-YoutubeViewer/bin/gtk-youtube-viewer
@@ -56,9 +56,8 @@ my $xdg_config_home = $ENV{XDG_CONFIG_HOME}
# Configuration dir/file
my $config_dir = catdir($xdg_config_home, $execname);
my $config_file = catfile($config_dir, "$execname.conf");
-
my $yv_config_dir = catdir($xdg_config_home, 'youtube-viewer');
-my $auth_tokens_file = catfile($yv_config_dir, 'reg.dat');
+my $authentication_file = catfile($yv_config_dir, 'reg.dat');
foreach my $dir ($config_dir, $yv_config_dir) {
if (not -d $dir) {
@@ -345,38 +344,14 @@ use WWW::YoutubeViewer::RegularExpressions;
our $CONFIG;
require $config_file; # Load the configuration file
-{
- my $i = length $key;
- $key =~ s/(.{$i})(.)/$2$1/g while $i--;
-}
-
if (ref $CONFIG ne 'HASH') {
- $CONFIG = do($config_file) || warn "Can't load the configuration file: $!";
-}
-
-require WWW::YoutubeViewer::AuthToken;
-my $yv_token = WWW::YoutubeViewer::AuthToken->new(key => $key);
-
-my ($access_token, $refresh_token);
-if (defined $CONFIG->{access_token} and defined $CONFIG->{refresh_token}) {
-
- $access_token = $CONFIG->{access_token};
- $refresh_token = $CONFIG->{refresh_token};
-
- $yv_token->to_file($access_token, $refresh_token, $auth_tokens_file);
-}
-elsif (-e $auth_tokens_file) {
- ($access_token, $refresh_token) = $yv_token->from_file($auth_tokens_file);
+ die "ERROR: Invalid configuration file!\n\t\$CONFIG is not an HASH ref!";
}
my @valid_keys = grep { exists $CONFIG{$_} } keys %{$CONFIG};
@CONFIG{@valid_keys} = @{$CONFIG}{@valid_keys};
-if (ref $CONFIG ne 'HASH') {
- rename($config_file, $config_file . '.bak');
- dump_configuration();
-}
-elsif (not \%CONFIG ~~ $CONFIG) {
+if (not \%CONFIG ~~ $CONFIG) {
dump_configuration();
}
@@ -387,18 +362,22 @@ if (not defined $CONFIG{gcap}) {
}
}
+{
+ my $i = length $key;
+ $key =~ s/(.{$i})(.)/$2$1/g while $i--;
+}
+
# Locating youtube-viewer
$CONFIG{youtube_viewer} //= which_command('youtube-viewer') // 'youtube-viewer';
require WWW::YoutubeViewer;
my $yv_obj = WWW::YoutubeViewer->new(
- key => $key,
- app_name => $appname,
- app_version => $version,
- access_token => $access_token,
- refresh_token => $refresh_token,
- config_dir => $yv_config_dir,
- escape_utf8 => 1,
+ escape_utf8 => 1,
+ key => $key,
+ app_name => $appname,
+ app_version => $version,
+ config_dir => $yv_config_dir,
+ authentication_file => $authentication_file,
);
if (defined $yv_obj->get_access_token()) {
@@ -798,7 +777,7 @@ sub show_user_panel {
$yv_obj->set_refresh_token($info->{refresh_token}) // return;
if ($gui->get_object('login_check_button')->get_active) {
- $yv_token->to_file($yv_obj->get_access_token, $yv_obj->get_refresh_token, $auth_tokens_file)
+ $yv_obj->save_authentication_tokens()
or warn "Can't store the authentication tokens: $!";
}
@@ -1185,8 +1164,8 @@ sub save_usernames_to_file {
sub log_out {
change_subscription_page(0);
- unlink $auth_tokens_file
- or warn "Can't unlink: `$auth_tokens_file' -> $!";
+ unlink $authentication_file
+ or warn "Can't unlink: `$authentication_file' -> $!";
$yv_obj->set_access_token();
$yv_obj->set_refresh_token();
@@ -2121,13 +2100,6 @@ sub on_mainw_destroy {
# Save hpaned position
$CONFIG{hpaned_position} = $hbox2->get_position;
- my $new_token = $yv_obj->get_access_token();
-
- if (defined($new_token) && (!defined($access_token) || (defined($access_token) && $new_token ne $access_token))) {
- say "** Updating the access token...\n";
- $yv_token->to_file($new_token, $yv_obj->get_refresh_token(), $auth_tokens_file);
- }
-
get_main_window_size();
dump_configuration();
save_usernames_to_file();
View
69 WWW-YoutubeViewer/bin/youtube-viewer
@@ -140,8 +140,8 @@ my $xdg_config_home = $ENV{XDG_CONFIG_HOME}
# Configuration dir/file
my $config_dir = catdir($xdg_config_home, $execname);
-my $config_file = catfile($config_dir, "$execname.conf");
-my $auth_tokens_file = catfile($config_dir, 'reg.dat');
+my $config_file = catfile($config_dir, "$execname.conf");
+my $authentication_file = catfile($config_dir, 'reg.dat');
if (not -d $config_dir) {
require File::Path;
@@ -340,45 +340,21 @@ EOD
}
}
-if (not -e $config_file or $opt{reconfigure}) {
+if (not -e $config_file or -z _ or $opt{reconfigure}) {
dump_configuration();
}
our $CONFIG;
require $config_file; # Load the configuration file
-{
- my $i = length $key;
- $key =~ s/(.{$i})(.)/$2$1/g while $i--;
-}
-
if (ref $CONFIG ne 'HASH') {
- $CONFIG = do($config_file) || warn "Can't load the configuration file: $!";
-}
-
-require WWW::YoutubeViewer::AuthToken;
-my $yv_token = WWW::YoutubeViewer::AuthToken->new(key => $key);
-
-my ($access_token, $refresh_token);
-if (defined $CONFIG->{access_token} and defined $CONFIG->{refresh_token}) {
-
- $access_token = $CONFIG->{access_token};
- $refresh_token = $CONFIG->{refresh_token};
-
- $yv_token->to_file($access_token, $refresh_token, $auth_tokens_file);
-}
-elsif (-e $auth_tokens_file) {
- ($access_token, $refresh_token) = $yv_token->from_file($auth_tokens_file);
+ die "ERROR: Invalid configuration file!\n\t\$CONFIG is not an HASH ref!";
}
my @valid_keys = grep { exists $CONFIG{$_} } keys %{$CONFIG};
@CONFIG{@valid_keys} = @{$CONFIG}{@valid_keys};
-if (ref $CONFIG ne 'HASH') {
- rename($config_file, $config_file . '.bak');
- dump_configuration();
-}
-elsif (not \%CONFIG ~~ $CONFIG) {
+if (not \%CONFIG ~~ $CONFIG) {
dump_configuration();
}
@@ -392,15 +368,19 @@ if (not defined $CONFIG{gcap}) {
@opt{keys %CONFIG} = values(%CONFIG);
+{
+ my $i = length $key;
+ $key =~ s/(.{$i})(.)/$2$1/g while $i--;
+}
+
require WWW::YoutubeViewer;
my $yv_obj = WWW::YoutubeViewer->new(
- key => $key,
- access_token => $access_token,
- refresh_token => $refresh_token,
- app_name => $appname,
- app_version => $version,
- config_dir => $config_dir,
- escape_utf8 => 1,
+ key => $key,
+ app_name => $appname,
+ app_version => $version,
+ config_dir => $config_dir,
+ escape_utf8 => 1,
+ authentication_file => $authentication_file,
);
{
@@ -668,10 +648,6 @@ NOTE: Categories and region IDs are case sensitive!
But, what if we'd want to play the videos from the next pages too?
In this case, ':anp' is your friend. Use it wisely!
-8. It is recommended to close the application with the ':q' keyword.
- This option will update the access token (if needed) and closes
- the application with an appropriate exit-code.
-
** Closed-Captions
To get the closed-captions (subtitles) for videos, you need to install
the 'gcap' program. See: http://gcap.googlecode.com
@@ -1399,8 +1375,8 @@ sub get_user_input {
sub logout {
- unlink $auth_tokens_file
- or warn "Can't unlink: `$auth_tokens_file' -> $!";
+ unlink $authentication_file
+ or warn "Can't unlink: `$authentication_file' -> $!";
$yv_obj->set_access_token();
$yv_obj->set_refresh_token();
@@ -1436,7 +1412,7 @@ INFO
default => 'y',);
if ($remember_me) {
- $yv_token->to_file($yv_obj->get_access_token, $yv_obj->get_refresh_token, $auth_tokens_file)
+ $yv_obj->save_authentication_tokens()
or warn "Can't store the authentication tokens: $!";
}
@@ -3058,13 +3034,6 @@ sub press_enter_to_continue {
}
sub main_quit {
- my $new_token = $yv_obj->get_access_token();
-
- if (defined($new_token) && (!defined($access_token) || (defined($access_token) && $new_token ne $access_token))) {
- say "** Updating the access token...\n";
- $yv_token->to_file($new_token, $yv_obj->get_refresh_token(), $auth_tokens_file);
- }
-
exit $_[0];
}
View
169 WWW-YoutubeViewer/lib/WWW/YoutubeViewer.pm
@@ -63,26 +63,26 @@ my %valid_options = (
safe_search => {valid => [qw(strict moderate none)], default => undef},
# Others
- debug => {valid => [0 .. 2], default => 0},
- lwp_timeout => {valid => [qr/^\d+$/], default => 30},
- access_token => {valid => [qr/^.{5}/], default => undef},
- key => {valid => [qr/^.{5}/], default => undef},
- author => {valid => [qr{^[\-\w.]{2,64}\z}], default => undef},
- app_version => {valid => [qr/^v?\d/], default => $VERSION},
- app_name => {valid => [qr/^./], default => 'Youtube Viewer'},
- config_dir => {valid => [qr/^./], default => q{.}},
-
+ debug => {valid => [0 .. 2], default => 0},
+ lwp_timeout => {valid => [qr/^\d+$/], default => 30},
+ key => {valid => [qr/^.{5}/], default => undef},
+ author => {valid => [qr{^[\-\w.]{2,64}\z}], default => undef},
+ app_version => {valid => [qr/^v?\d/], default => $VERSION},
+ app_name => {valid => [qr/^./], default => 'Youtube Viewer'},
+ config_dir => {valid => [qr/^./], default => q{.}},
+
+ authentication_file => {valid => [qr/^./], default => undef},
categories_language => {valid => [qr/^[a-z]+-\w/], default => 'en-US'},
# Booleans
- lwp_keep_alive => {valid => [1, 0], default => 1},
- lwp_env_proxy => {valid => [1, 0], default => 1},
- escape_utf8 => {valid => [1, 0], default => 0},
+ lwp_env_proxy => {valid => [1, 0], default => 1},
+ escape_utf8 => {valid => [1, 0], default => 0},
# OAuth stuff
client_id => {valid => [qr/^.{5}/], default => undef},
client_secret => {valid => [qr/^.{5}/], default => undef},
redirect_uri => {valid => [qr/^.{5}/], default => undef},
+ access_token => {valid => [qr/^.{5}/], default => undef},
refresh_token => {valid => [qr/^.{5}/], default => undef},
# No input value alowed
@@ -148,6 +148,8 @@ sub new {
|| $self->get_start_index()
|| 1;
+ $self->load_authentication_tokens();
+
foreach my $invalid_key (keys %opts) {
warn "Invalid key: '${invalid_key}'";
}
@@ -175,6 +177,104 @@ sub set_prefer_https {
return $bool;
}
+sub __AUTH_EOL__() { "\0\0\0" }
+
+=head2 load_authentication_tokens()
+
+Will try to load the access and refresh tokens from I<authentication_file>.
+
+=cut
+
+sub load_authentication_tokens {
+ my ($self) = @_;
+
+ if (defined $self->get_access_token and defined $self->get_refresh_token) {
+ return 1;
+ }
+
+ if (defined(my $file = $self->get_authentication_file) and defined(my $key = $self->get_key)) {
+ if (-f $file) {
+ local $/ = __AUTH_EOL__;
+ open my $fh, '<:raw', $file or return;
+
+ my @tokens;
+ foreach my $i (0 .. 1) {
+ chomp(my $token = <$fh>);
+ $token =~ /\S/ || last;
+ push @tokens, $self->decode_token($token);
+ }
+
+ $self->set_access_token($tokens[0]) // return;
+ $self->set_refresh_token($tokens[1]) // return;
+
+ close $fh;
+ return 1;
+ }
+
+ }
+
+ return;
+}
+
+=head2 encode_token($token)
+
+Encode the token with the I<key> and return it.
+
+=cut
+
+sub encode_token {
+ my ($self, $token) = @_;
+
+ if (defined(my $key = $self->get_key)) {
+ require MIME::Base64;
+ return MIME::Base64::encode_base64($token ^ substr($key, -length($token)));
+ }
+
+ return;
+}
+
+=head2 decode_token($token)
+
+Decode the token with the I<key> and return it.
+
+=cut
+
+sub decode_token {
+ my ($self, $token) = @_;
+
+ if (defined(my $key = $self->get_key)) {
+ require MIME::Base64;
+ my $bin = MIME::Base64::decode_base64($token);
+ return $bin ^ substr($key, -length($bin));
+ }
+
+ return;
+}
+
+=head2 save_authentication_tokens()
+
+Encode and save the access and refresh into the I<authentication_file>.
+
+=cut
+
+sub save_authentication_tokens {
+ my ($self) = @_;
+
+ my $file = $self->get_authentication_file() // return;
+ my $access_token = $self->get_access_token() // return;
+ my $refresh_token = $self->get_refresh_token() // return;
+
+ if (open my $fh, '>:raw', $file) {
+ foreach my $token ($access_token, $refresh_token) {
+ print {$fh} $self->encode_token($token) . __AUTH_EOL__;
+ }
+ close $fh;
+ return 1;
+ }
+
+ return;
+}
+
=head2 get_prefer_https()
Will return the value of prefer_https.
@@ -281,9 +381,8 @@ sub set_lwp_useragent {
require LWP::UserAgent;
$self->{lwp} = 'LWP::UserAgent'->new(
- keep_alive => $self->get_lwp_keep_alive,
- env_proxy => (defined($self->get_http_proxy) ? 0 : $self->get_lwp_env_proxy),
- timeout => $self->get_lwp_timeout,
+ env_proxy => (defined($self->get_http_proxy) ? 0 : $self->get_lwp_env_proxy),
+ timeout => $self->get_lwp_timeout,
show_progress => $self->get_debug,
agent => $self->get_lwp_agent,
);
@@ -442,12 +541,13 @@ sub lwp_get {
my $new_resp = $self->{lwp}->get($url, $self->_get_lwp_header);
if ($new_resp->is_success) {
+ $self->save_authentication_tokens();
return $new_resp->decoded_content;
}
elsif ($new_resp->status_line() eq '401 Token invalid') {
$self->set_refresh_token(); # refresh token was invalid
$self->set_access_token(); # access token is also broken
- warn "[!] Can't refresh the access token! Logging out...\n";
+ warn "[!] Can't refresh the access token!\n";
}
else {
warn '[' . $new_resp->status_line . "] Error occured on URL: $url\n";
@@ -719,10 +819,9 @@ sub _xml2hash {
videoID => $gdata->{'media:group'}{'yt:videoid'},
title => $gdata->{'media:group'}{'media:title'}{'#text'},
author => (
- ref $gdata->{'media:group'}{'media:credit'} eq 'ARRAY'
- ? $gdata->{'media:group'}{'media:credit'}[0]{'#text'}
- : $gdata->{'media:group'}{'media:credit'}{'#text'}
- ),
+ ref $gdata->{'media:group'}{'media:credit'} eq 'ARRAY' ? $gdata->{'media:group'}{'media:credit'}[0]{'#text'}
+ : $gdata->{'media:group'}{'media:credit'}{'#text'}
+ ),
rating => $gdata->{'gd:rating'}{'-average'} || 0,
likes => $gdata->{'yt:rating'}{'-numLikes'} || 0,
dislikes => $gdata->{'yt:rating'}{'-numDislikes'} || 0,
@@ -1071,11 +1170,11 @@ sub _get_categories {
label => $cat->{'-label'},
term => $cat->{'-term'},
regions => (
- exists($cat->{'yt:browsable'})
- && ref $cat->{'yt:browsable'} eq 'ARRAY' && exists($cat->{'yt:browsable'}[0]{'-regions'})
- ? [split(q{ }, $cat->{'yt:browsable'}[0]{'-regions'})]
- : []
- ),
+ exists($cat->{'yt:browsable'})
+ && ref $cat->{'yt:browsable'} eq 'ARRAY' && exists($cat->{'yt:browsable'}[0]{'-regions'})
+ ? [split(q{ }, $cat->{'yt:browsable'}[0]{'-regions'})]
+ : []
+ ),
};
}
@@ -1806,6 +1905,18 @@ Set a configuration directory.
Get the configuration directory.
+=head2 set_authentication_file($filename)
+
+File from where to get and save the encoded authentication token everytime when is needed.
+
+=cut
+
+=head2 get_authentication_file()
+
+Returns the authentication file's name.
+
+=cut
+
=head2 set_escape_utf8($bool)
If true, it escapes the keywords using uri_escape_utf8.
@@ -1842,14 +1953,6 @@ Set the env_proxy value for LWP.
Returns the env_proxy value.
-=head2 set_lwp_keep_alive($bool)
-
-Set the keep_alive value for LWP.
-
-=head2 get_lwp_keep_alive()
-
-Returns the keep_alive value.
-
=head2 set_lwp_timeout($sec).
Set the timeout value for LWP, in seconds. Default: 60
View
176 WWW-YoutubeViewer/lib/WWW/YoutubeViewer/AuthToken.pm
@@ -1,176 +0,0 @@
-package WWW::YoutubeViewer::AuthToken;
-
-use 5.010;
-use strict;
-use warnings;
-
-=head1 NAME
-
-WWW::YoutubeViewer::AuthToken - Encode/decode the authentication tokens
-
-=head1 VERSION
-
-Version 0.01
-
-=cut
-
-our $VERSION = '0.01';
-
-=head1 SYNOPSIS
-
- use WWW::YoutubeViewer::AuthToken;
-
- my $yv_token = WWW::YoutubeViewer::AuthToken->new(key => "SOME_KEY");
-
- my $decoded = $yv_token->decode($token);
- my $encoded = $yv_token->encode($token);
-
- # Encode and store the tokens inside a file
- $yv_token->to_file($access_token, $refresh_token, $file);
-
- # Decode and return the tokens from a file
- my ($access_token, $refresh_token) = $yv_token->from_file($file);
-
-=head1 SUBROUTINES/METHODS
-
-=head2 new()
-
-Return the blessed object.
-
-=cut
-
-sub new {
- my $class = shift;
- bless {@_, EOL => "\0" x 3}, $class;
-}
-
-=head2 encode($token)
-
-Encode the token with a given key and return it.
-
-=cut
-
-sub encode {
- my ($self, $token) = @_;
-
- require MIME::Base64;
- MIME::Base64::encode_base64($token ^ substr($self->{key}, -length($token)));
-}
-
-=head2 decode($token)
-
-Decode the token with a given key and return it.
-
-=cut
-
-sub decode {
- my ($self, $token) = @_;
-
- require MIME::Base64;
- my $bin = MIME::Base64::decode_base64($token);
- $bin ^ substr($self->{key}, -length($bin));
-}
-
-=head2 to_file($acess_token, $refresh_token, $file)
-
-Encode and save the token in a file.
-
-=cut
-
-sub to_file {
- my ($self, $access_token, $refresh_token, $file) = @_;
-
- if (open my $fh, '>:raw', $file) {
- foreach my $token ($access_token, $refresh_token) {
- print {$fh} $self->encode($token) . $self->{EOL};
- }
- close $fh;
- return 1;
- }
-
- return;
-}
-
-=head2 from_file($file)
-
-Encode and save the token in a file.
-
-=cut
-
-sub from_file {
- my ($self, $file) = @_;
-
- if (-f $file) {
- local $/ = $self->{EOL};
- open my $fh, '<:raw', $file;
-
- my @tokens;
- foreach my $i (0 .. 1) {
- chomp(my $token = <$fh>);
- $token =~ /\S/ || last;
- push @tokens, $self->decode($token);
- }
-
- close $fh;
- return @tokens;
- }
-
- return;
-}
-
-=head1 AUTHOR
-
-Trizen, C<< <trizenx at gmail.com> >>
-
-
-=head1 SUPPORT
-
-You can find documentation for this module with the perldoc command.
-
- perldoc WWW::YoutubeViewer::AuthToken
-
-
-=head1 LICENSE AND COPYRIGHT
-
-Copyright 2013 Trizen.
-
-This program is free software; you can redistribute it and/or modify it
-under the terms of the the Artistic License (2.0). You may obtain a
-copy of the full license at:
-
-L<http://www.perlfoundation.org/artistic_license_2_0>
-
-Any use, modification, and distribution of the Standard or Modified
-Versions is governed by this Artistic License. By using, modifying or
-distributing the Package, you accept this license. Do not use, modify,
-or distribute the Package, if you do not accept this license.
-
-If your Modified Version has been derived from a Modified Version made
-by someone other than you, you are nevertheless required to ensure that
-your Modified Version complies with the requirements of this license.
-
-This license does not grant you the right to use any trademark, service
-mark, tradename, or logo of the Copyright Holder.
-
-This license includes the non-exclusive, worldwide, free-of-charge
-patent license to make, have made, use, offer to sell, sell, import and
-otherwise transfer the Package with respect to any patent claims
-licensable by the Copyright Holder that are necessarily infringed by the
-Package. If you institute patent litigation (including a cross-claim or
-counterclaim) against any party alleging that the Package constitutes
-direct or contributory patent infringement, then this Artistic License
-to you shall terminate on the date that such litigation is filed.
-
-Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER
-AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
-THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
-PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY
-YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR
-CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR
-CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-=cut
-
-1; # End of WWW::YoutubeViewer::AuthToken
View
34 WWW-YoutubeViewer/share/gtk-youtube-viewer.glade
@@ -1641,20 +1641,37 @@ When the specified resolution is not found, it falls down to a lower resolution.
<property name="window_position">center-on-parent</property>
<property name="type_hint">normal</property>
<property name="transient_for">__MAIN__</property>
- <property name="program_name">Glade</property>
+ <property name="program_name">GTK Youtube Viewer</property>
<property name="copyright" translatable="yes">Copyright © 2010-2013 by Trizen</property>
<property name="comments" translatable="yes">Written in Perl, Gtk2 and Glade under the GPLv3.</property>
<property name="website">http://trizen.googlecode.com</property>
- <property name="website_label" translatable="yes">Developer's website</property>
+ <property name="website_label" translatable="yes">Application's website</property>
+ <property name="license" translatable="yes">
+Copyright (C) 2010-2013 Trizen &lt;trizenx@gmail.com&gt;.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+</property>
<property name="authors">[+] Developer/Maintainer:
=&gt; Trizen (trizenx@gmail.com)
* Core
* GUI
-[+] Contributor:
+[+] Contributors:
=&gt; Ovidiu D. Nițan (nitanovidiu@gmail.com)
* Threads
* GUI fixes</property>
+ <property name="artists">PosixRU (main icon - http://zenway.ru/page/gtk-youtube-viewer)</property>
<signal name="destroy" handler="hide_about_window" swapped="no"/>
<signal name="delete-event" handler="hide_about_window" swapped="no"/>
<signal name="response" handler="hide_about_window" swapped="no"/>
@@ -1664,6 +1681,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
<child internal-child="action_area">
<object class="GtkHButtonBox" id="dialog-action_area3">
<property name="can_focus">False</property>
+ <property name="layout_style">end</property>
</object>
<packing>
<property name="expand">False</property>
@@ -2388,7 +2406,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
<object class="GtkLabel" id="label24">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Add a comment to video:&lt;/b&gt;</property>
+ <property name="label" translatable="yes">&lt;b&gt;Add a comment to this video:&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
</child>
@@ -2513,7 +2531,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
</child>
<child>
<object class="GtkButton" id="button23">
- <property name="label" translatable="yes">Subscribe user's channel</property>
+ <property name="label" translatable="yes">Subscribe to author's channel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2539,7 +2557,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="button20">
- <property name="label" translatable="yes">List videos from this user</property>
+ <property name="label" translatable="yes">More videos from this author</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2554,7 +2572,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
</child>
<child>
<object class="GtkButton" id="button13">
- <property name="label" translatable="yes">List user's favorited videos</property>
+ <property name="label" translatable="yes">Show author's favorited videos</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
@@ -2595,7 +2613,7 @@ When the specified resolution is not found, it falls down to a lower resolution.
</child>
<child>
<object class="GtkButton" id="button12">
- <property name="label" translatable="yes">List the user's playlists</property>
+ <property name="label" translatable="yes">Show author's plalyists</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
View
BIN WWW-YoutubeViewer/share/gtk-youtube-viewer.png
Deleted file not rendered
View
BIN WWW-YoutubeViewer/share/icons/gtk-youtube-viewer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b1160a7

Please sign in to comment.
Something went wrong with that request. Please try again.