The officially official Devuan Forum!

You are not logged in.

#1 2021-02-28 00:50:39

nauved-rex
Member
From: USA
Registered: 2021-01-07
Posts: 24  

Creating a Media Source for Kodi Using SAMBA

This How-to assumes you have a computer running Devuan which can "host" media files for other computers on the network. The other computers will be running a Kodi client, which could even be a Kodi app installed from the Android play store. Sorry, I know nothing about Apple Store apps.

1. Preliminary steps:
a. Create a folder in your home directory called Media. (This will be referenced later)
b. Create 2 sub-folders in Media called Albums and Movies. Albums will hold music extracted from your CD's using asunder or some other CD ripping package in conjunction with picard (MusicBrainz) or some other music tagging software. Kodi prefers MusicBrainz tags. Movies will hold videos in the form Movie Name (yyyy).mp4. This can consist a series of flat files all inside Movies, or each movie can be in its own sub-folder. Kodi recommends the latter; however, it is your choice.

2. Install SAMBA. As root:

apt-get install samba

3. The samba package includes a rather complex configuration file /etc/samba.smb.conf. As root, move this out of the way:

cd /etc/samba
mv smb.conf smb.conf.bkp

4. Use an editor to create a new configuration file. For example, as root:

nano /etc/samba/smb.conf

5. You can copy and paste this configuration text for smb.conf:

[global]
workgroup = WORKGROUP
server string = hostname
mangled names = no

[Media]
path = /home/username/Media
guest ok = yes
guest only = yes
writable = no
browsable = yes

Note: Substitute the actual values for your hostname and username.

Note: The mangled names line prevents SAMBA from converting file names to an 8-character Windows-compatible format when they contain "special" characters such as colons, ampersands, commas, etc. It is preferable never to use special characters in movie names. For example, the file name "Jekyll and Hide (1990).mp4" will be properly "scraped" by Kodi even though the theatrical name is Jekyll & Hyde.

Note: The [Media] section label will appear in some clients. It is very useful to name this to be identical to the folder name containing the source files, which I named Media in step 1.

6. After creating the new configuration file, test it for correctness with

testconf

The above command need not be executed as root.

7. Finally, as root, restart SAMBA:

/etc/init.d/samba-ad-dc restart

Everything from here on out happens on the client side. From inside Kodi, add the SMB link/source and individually add Movies and Albums. Configuring Kodi is beyond the scope of this How-To.

SAMBA can seem overwhelming, so I merely wished to provide a simple configuration file, which I am using myself with great success. This How-To is based on a previous attempt to illustrate how to setup SAMBA, but contains more Kodi-specific instructions.

On the "host" computer, you can, of course, add photos and other media items inside the Media folder. Enjoy your media!

Last edited by nauved-rex (2021-02-28 01:32:43)

Offline

Board footer