Skip to content

Commit

Permalink
More copyright notices...
Browse files Browse the repository at this point in the history
  • Loading branch information
mherger committed Mar 28, 2024
1 parent de9f83a commit cb7deb0
Show file tree
Hide file tree
Showing 53 changed files with 681 additions and 633 deletions.
3 changes: 2 additions & 1 deletion Slim/Buttons/XMLBrowser.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Buttons::XMLBrowser;

# Logitech Media Server Copyright 2005-2020 Logitech.
# Logitech Media Server Copyright 2005-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
2 changes: 1 addition & 1 deletion Slim/Control/Jive.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package Slim::Control::Jive;

# Logitech Media Server Copyright 2001-2024 Logitech
# Logitech Media Server Copyright 2001-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
3 changes: 2 additions & 1 deletion Slim/Control/XMLBrowser.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Control::XMLBrowser;

# Logitech Media Server Copyright 2005-2020 Logitech.
# Logitech Media Server Copyright 2005-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
3 changes: 2 additions & 1 deletion Slim/Formats/XML.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Formats::XML;

# Logitech Media Server Copyright 2006-2020 Logitech.
# Logitech Media Server Copyright 2006-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
3 changes: 2 additions & 1 deletion Slim/Hardware/BacklightLED.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Hardware::BacklightLED;

# Logitech Media Server Copyright (c) 2001-2020 Logitech.
# Logitech Media Server Copyright (c) 2001-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/Async.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Slim::Networking::Async;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/Async/DNS.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Slim::Networking::Async::DNS;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/Async/HTTP.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Slim::Networking::Async::HTTP;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
9 changes: 5 additions & 4 deletions Slim/Networking/Async/Socket.pm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package Slim::Networking::Async::Socket;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# modify it under the terms of the GNU General Public License,
# version 2.

# A base class for all sockets
Expand All @@ -13,14 +14,14 @@ use strict;
# store data within the socket
sub set {
my ( $self, $key, $val ) = @_;

${*$self}{$key} = $val;
}

# pull data out of the socket
sub get {
my ( $self, $key ) = @_;

return ${*$self}{$key};
}

Expand Down
13 changes: 7 additions & 6 deletions Slim/Networking/Async/Socket/HTTP.pm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package Slim::Networking::Async::Socket::HTTP;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# modify it under the terms of the GNU General Public License,
# version 2.

# This class contains the socket we use for async HTTP communication
Expand All @@ -17,7 +18,7 @@ sub import {}

use Socket qw(pack_sockaddr_in sockaddr_in);

# IO::Socket::INET's connect method blocks, so we use our own connect method
# IO::Socket::INET's connect method blocks, so we use our own connect method
# which is non-blocking. Based on: http://www.perlmonks.org/?node_id=66135
sub connect {
@_ == 2 || @_ == 3 or
Expand All @@ -37,7 +38,7 @@ sub connect {
# which usually handles timeouts, blocking
# and error handling.
connect($sock, $addr);

# Workaround for an issue in Net::HTTP::Methods where peerport is not yet
# available during an async connection
${*$sock}{'AsyncPeerPort'} = (sockaddr_in($addr))[0];
Expand All @@ -46,7 +47,7 @@ sub connect {
return 1;
}

# Net::HTTP::Methods doesn't get the right peerport since we are making an
# Net::HTTP::Methods doesn't get the right peerport since we are making an
# async connection, so we store it ourselves
sub peerport {
my $self = shift;
Expand All @@ -71,7 +72,7 @@ sub sysread {
if ( ${*$self}{'httpnb_save'} =~ /^(HTTP|ICY)/ ) {
my $icy = ${*$self}{'httpnb_save'} =~ s/^ICY/HTTP\/1.0/;
${*$self}{'parsed_status_line'} = 1;

if ( $icy ) {
$n += 5;
$_[1] =~ s/^ICY/HTTP\/1.0/;
Expand Down
5 changes: 3 additions & 2 deletions Slim/Networking/Async/Socket/HTTPS.pm
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package Slim::Networking::Async::Socket::HTTPS;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# modify it under the terms of the GNU General Public License,
# version 2.

use strict;
Expand Down
31 changes: 16 additions & 15 deletions Slim/Networking/Async/Socket/UDP.pm
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package Slim::Networking::Async::Socket::UDP;

# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# modify it under the terms of the GNU General Public License,
# version 2.

# This class contains the socket we use for async multicast UDP communication
Expand All @@ -19,7 +20,7 @@ use Slim::Utils::Log;

sub new {
my $class = shift;

return $class->SUPER::new(
Proto => 'udp',
@_,
Expand All @@ -29,37 +30,37 @@ sub new {
# send a multicast UDP packet
sub mcast_send {
my ( $self, $msg, $host ) = @_;

my ( $addr, $port ) = split /:/, $host;

my $dest_addr = sockaddr_in( $port, inet_aton( $addr ) );
send( $self, $msg, 0, $dest_addr );
}

# configure a socket for multicast
sub mcast_add {
my ( $self, $mcast_host, $if_addr ) = @_;

$if_addr ||= '0.0.0.0';

my ($mcast_addr) = split /:/, $mcast_host;

# Tell the kernel that we want multicast messages on this interface
setsockopt(
$self,
getprotobyname('ip') || 0,
_constant('IP_ADD_MEMBERSHIP'),
inet_aton($mcast_addr) . inet_aton($if_addr)
) || logError("While adding multicast membership, UPnP may not work properly: $!");

# Configure outgoing multicast messages to use the desired interface
setsockopt(
$self,
getprotobyname('ip') || 0,
_constant('IP_MULTICAST_IF'),
inet_aton($if_addr)
) || logError("While setting IP_MULTICAST_IF, UPnP may not work properly: $!");

# Allow our multicast packets to be routed with TTL 4
setsockopt(
$self,
Expand All @@ -71,14 +72,14 @@ sub mcast_add {

sub _constant {
my $name = shift;

my %names = (
'IP_MULTICAST_TTL' => 0,
'IP_ADD_MEMBERSHIP' => 1,
'IP_MULTICAST_IF' => 2,
'PACK_TEMPLATE' => 3,
);

my %constants = (
'MSWin32' => [10,12,9,'I'],
'cygwin' => [3,5,2,'I'],
Expand All @@ -87,11 +88,11 @@ sub _constant {
'solaris' => [17,19,16,'C'],
'default' => [33,35,32,'I'],
);

my $index = $names{$name};

my $ref = $constants{ $^O } || $constants{default};

return $ref->[ $index ];
}

Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/IO/Select.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Slim::Networking::IO::Select;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/Select.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package Slim::Networking::Select;


# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/SimpleAsyncHTTP.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Networking::SimpleAsyncHTTP;

# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/SimpleHTTP/Base.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Networking::SimpleHTTP::Base;

# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Networking/SimpleSyncHTTP.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Networking::SimpleSyncHTTP;

# Logitech Media Server Copyright 2003-2020 Logitech.
# Logitech Media Server Copyright 2003-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
3 changes: 2 additions & 1 deletion Slim/Plugin/Favorites/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ package Slim::Plugin::Favorites::Plugin;

# This code is derived from code with the following copyright message:
#
# Logitech Media Server Copyright 2005-2020 Logitech.
# Logitech Media Server Copyright 2005-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
2 changes: 1 addition & 1 deletion Slim/Plugin/MusicMagic/Common.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Slim::Plugin::MusicMagic::Common;


# Logitech Media Server Copyright 2001-2024 Logitech
# Logitech Media Server Copyright 2001-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
2 changes: 1 addition & 1 deletion Slim/Plugin/MusicMagic/Importer.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Slim::Plugin::MusicMagic::Importer;


# Logitech Media Server Copyright 2001-2024 Logitech
# Logitech Media Server Copyright 2001-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
2 changes: 1 addition & 1 deletion Slim/Plugin/MusicMagic/Plugin.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Slim::Plugin::MusicMagic::Plugin;


# Logitech Media Server Copyright 2001-2024 Logitech
# Logitech Media Server Copyright 2001-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand Down
3 changes: 2 additions & 1 deletion Slim/Plugin/NetTest/Plugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

# This code is derived from code with the following copyright message:
#
# Logitech Media Server Copyright 2005-2020 Logitech.
# Logitech Media Server Copyright 2005-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
# version 2.
Expand Down
11 changes: 6 additions & 5 deletions Slim/Plugin/Podcast/GPodder.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package Slim::Plugin::Podcast::GPodder;

# Logitech Media Server Copyright 2005-2021 Logitech.
# Logitech Media Server Copyright 2005-2024 Logitech.
# Lyrion Music Server Copyright 2024 Lyrion Community.

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License,
Expand All @@ -11,22 +12,22 @@ use base qw(Slim::Plugin::Podcast::Provider);
sub getFeedsIterator {
my ($self, $feeds) = @_;
my $index;

# iterator on feeds
return sub {
my $feed = $feeds->[$index++];
return unless $feed;

my ($image) = grep { $feed->{$_} } qw(scaled_logo_url logo_url);

return {
name => $feed->{title},
url => $feed->{url},
image => $feed->{$image},
description => $feed->{description},
author => $feed->{author},
};
};
};
}

sub getSearchParams {
Expand Down
Loading

0 comments on commit cb7deb0

Please sign in to comment.