<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C# on Christian Martínez De La Rosa</title><link>https://christt105.github.io/tags/c%23/</link><description>Recent content in C# on Christian Martínez De La Rosa</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Fri, 27 Mar 2026 00:00:00 +0100</lastBuildDate><atom:link href="https://christt105.github.io/tags/c%23/index.xml" rel="self" type="application/rss+xml"/><item><title>Pokétch</title><link>https://christt105.github.io/projects/poketch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://christt105.github.io/projects/poketch/</guid><enclosure url="https://christt105.github.io/projects/poketch/Poketch.webp" length="2768" type="image/webp"/><description>&lt;p&gt;Pokétch Unity is a recreation of the Pokétch device from Pokémon Platinum, developed in Unity with all the original functionalities plus new features. This project is focused on delivering a smooth experience on Android devices.&lt;/p&gt;</description></item><item><title>mnamer Telegram Bot</title><link>https://christt105.github.io/projects/mnamer-telegram-bot/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://christt105.github.io/projects/mnamer-telegram-bot/</guid><enclosure url="https://christt105.github.io/projects/mnamer-telegram-bot/cover.png" length="45421" type="image/png"/><description>&lt;p&gt;&lt;code&gt;mnamer-telegram&lt;/code&gt; is a self-hosted Telegram bot for managing automatic renaming and moving of downloaded media into a Jellyfin library using &lt;code&gt;mnamer&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Key features:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;File watcher detects new downloads and generates proposed filenames using &lt;code&gt;mnamer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Bot sends a Telegram message with rename suggestions and external links for verification (TMDB / TheTVDB).&lt;/li&gt;
&lt;li&gt;Accept or correct suggestions via reply and control when media is moved to the target library.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The workflow is focused on converting manual &lt;code&gt;mnamer&lt;/code&gt; CLI operations into a streamlined chat-driven pipeline on mobile devices.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Example" class="gallery-image" data-flex-basis="160px" data-flex-grow="66" height="833" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://christt105.github.io/projects/mnamer-telegram-bot/example.png" width="556"&gt;&lt;/p&gt;</description></item><item><title>Automating my Jellyfin library with mnamer and a Telegram bot</title><link>https://christt105.github.io/blog/mnamer-telegram-bot/</link><pubDate>Fri, 27 Mar 2026 00:00:00 +0100</pubDate><guid>https://christt105.github.io/blog/mnamer-telegram-bot/</guid><enclosure url="https://christt105.github.io/blog/mnamer-telegram-bot/cover.png" length="45421" type="image/png"/><description>&lt;p&gt;Hello again!&lt;/p&gt;
&lt;p&gt;This time I bring you a project that had been dormant for months. I&amp;rsquo;m trying to clear my backlog of paused projects to give myself some peace of mind. We&amp;rsquo;re continuing with the self-hosting theme, this time with a Telegram bot.&lt;/p&gt;
&lt;h2 id="the-problem"&gt;The Problem
&lt;/h2&gt;&lt;p&gt;The idea came about when I started using a P2P downloader, commonly known as &amp;ldquo;the mule&amp;rdquo;, on my mini PC. When a download finished, I had no way of knowing, and I had to manually go in, create the folder with the correct name in my Jellyfin library, and paste the file there, renaming it manually.&lt;/p&gt;
&lt;h2 id="prelude"&gt;Prelude
&lt;/h2&gt;&lt;p&gt;Shortly after, I tried &lt;a class="link" href="https://www.tinymediamanager.org/" target="_blank" rel="noopener"
 &gt;tinyMediaManager&lt;/a&gt; on Docker, but it was practically unusable from a mobile phone, which is my usual device for managing these things.&lt;/p&gt;
&lt;p&gt;A bit later, I looked for other options and found &lt;a class="link" href="https://github.com/jkwill87/mnamer" target="_blank" rel="noopener"
 &gt;mnamer&lt;/a&gt;, a command-line program that renames movies and TV shows. It was exactly what I was looking for. It uses &lt;a class="link" href="https://www.themoviedb.org/" target="_blank" rel="noopener"
 &gt;TMDB&lt;/a&gt; for movies and &lt;a class="link" href="https://thetvdb.com/" target="_blank" rel="noopener"
 &gt;TheTVDB&lt;/a&gt; for shows (which I prefer because it has better rules for some anime). With a few commands, you can make it read all the video files in a folder, rename them, and place them in the appropriate folders of your library.&lt;/p&gt;
&lt;p&gt;I used mnamer for a while; when a download finished, I would open the command line via SSH and run an alias I had created.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Path to the mnamer docker-compose&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;MNAMER_COMPOSE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;/home/christian/Server/70-79_Media/74_gestion_media/mnamer/docker-compose.yml&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Run generic mnamer&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; &lt;span class="nv"&gt;mnamer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;docker compose -f &lt;/span&gt;&lt;span class="nv"&gt;$MNAMER_COMPOSE&lt;/span&gt;&lt;span class="s2"&gt; run --rm mnamer&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Run in test mode (doesn&amp;#39;t move anything, just shows)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; mnamer-test&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;#34;docker compose -f &lt;/span&gt;&lt;span class="nv"&gt;$MNAMER_COMPOSE&lt;/span&gt;&lt;span class="s2"&gt; run --rm mnamer --test -r /data/Descargas&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="c1"&gt;# Run in real mode (moves from Downloads to destination)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; mnamer-run&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;docker compose -f $MNAMER_COMPOSE run --rm mnamer -r /data/Descargas&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; mnamer-tmdb&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;docker compose -f $MNAMER_COMPOSE run --rm mnamer -r /data/Descargas --id-tmdb&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; mnamer-tvdb&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;docker compose -f $MNAMER_COMPOSE run --rm mnamer -r /data/Descargas --id-tvdb&amp;#39;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;I had mnamer running in a Docker container and created some commands to make it work without typing too much. With &lt;code&gt;mnamer-test&lt;/code&gt; I could check if everything was going to be renamed correctly. If it didn&amp;rsquo;t catch something properly, I&amp;rsquo;d run &lt;code&gt;mnamer-tmdb&lt;/code&gt; or &lt;code&gt;mnamer-tvdb&lt;/code&gt; and pass it the ID I&amp;rsquo;d look up in the browser. If everything was fine, I simply ran &lt;code&gt;mnamer-run --batch&lt;/code&gt; so it would do it all at once. As you can see, it was still quite manual; there was plenty of room for improvement.&lt;/p&gt;
&lt;p&gt;A few months prior, I had been tinkering with Telegram bots. I tried to create one with Python, but I ended up getting overwhelmed and switched to C# using &lt;a class="link" href="https://github.com/wiz0u/WTelegramBot" target="_blank" rel="noopener"
 &gt;WTelegramBot&lt;/a&gt;, an exquisite API for creating bots with a ton of features and in a language I felt more comfortable with. That bot is currently on pause—just another project on the never-ending list.&lt;/p&gt;
&lt;h2 id="the-bots-journey"&gt;The Bot&amp;rsquo;s Journey
&lt;/h2&gt;&lt;p&gt;With clear ideas in mind, towards the end of last year I spent a few days working on the bot. The main idea was that every time a file appeared in a folder, the bot would send a message with mnamer&amp;rsquo;s suggestion and a link to TMDB or TheTVDB so I could verify it was correct. Once verified, pressing a button would send it to the library.&lt;/p&gt;
&lt;p&gt;I made something very basic to check for files, send a message with mnamer&amp;rsquo;s suggestion, and include an accept button. If mnamer was wrong, I had to manually go to the hard drive, rename the file, and try again, which didn&amp;rsquo;t happen often but was genuinely annoying.&lt;/p&gt;
&lt;p&gt;I left it like that for a few months until February, when I decided to continue. I added the File Watcher and the ability to reply with an ID to correct the match. I also tried to fix the file permission issues, and now the container runs on the 1000:1000 user by default; although it works for me, I think it&amp;rsquo;s not entirely well implemented yet.&lt;/p&gt;
&lt;p&gt;I put it aside again because it was working quite well for me, until just a few days ago when I decided to fix a couple of things and write all the documentation so others could try it out. I configured GitHub Actions to generate a Docker image every time I created a tag, and I made the repository public.&lt;/p&gt;
&lt;p&gt;And that&amp;rsquo;s its current state. I imagine I&amp;rsquo;ll improve it little by little if people use it, just like what recently happened when a friend sent me a PR fixing the user IDs; it&amp;rsquo;s the most rewarding part of programming. I think it&amp;rsquo;s somewhat complex to set up, but until more people give it a try, I don&amp;rsquo;t know how to make it better.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Example of the bot renaming" class="gallery-image" data-flex-basis="160px" data-flex-grow="66" height="833" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://christt105.github.io/blog/mnamer-telegram-bot/example.png" width="556"&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re interested in the project&amp;rsquo;s source code or the installation instructions, you can find it on my GitHub account:&lt;/p&gt;
&lt;a class="github-repo-card" href="https://github.com/christt105/mnamer-telegram" target="_blank" rel="noopener"&gt;
 &lt;img src="https://avatars.githubusercontent.com/u/36189169?v=4" alt="christt105 avatar" class="repo-avatar"&gt;
 &lt;h3&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-github" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"&gt;
 &lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;
 &lt;path d="M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5" /&gt;
&lt;/svg&gt;


 christt105/mnamer-telegram&lt;/h3&gt;
 &lt;p&gt;Telegram bot that automates media library organization using mnamer with interactive approval workflows.&lt;/p&gt;
 &lt;div class="repo-stats"&gt;
 &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" class="icon icon-tabler icons-tabler-filled icon-tabler-star"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z" /&gt;&lt;/svg&gt; 2&lt;/span&gt;
 &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-git-fork"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M10 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M5 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M15 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" /&gt;&lt;path d="M7 8v2a2 2 0 0 0 2 2h6a2 2 0 0 0 2 -2v-2" /&gt;&lt;path d="M12 12l0 4" /&gt;&lt;/svg&gt; 1&lt;/span&gt;
 &lt;span&gt;&lt;svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="icon icon-tabler icons-tabler-outline icon-tabler-calendar-event"&gt;&lt;path stroke="none" d="M0 0h24v24H0z" fill="none"/&gt;&lt;path d="M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12" /&gt;&lt;path d="M16 3l0 4" /&gt;&lt;path d="M8 3l0 4" /&gt;&lt;path d="M4 11l16 0" /&gt;&lt;path d="M8 15h2v2h-2l0 -2" /&gt;&lt;/svg&gt; 2026-03-28&lt;/span&gt;
 &lt;/div&gt;
 &lt;/a&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;This is the first time I&amp;rsquo;ve built a program directly in C#; my experience with C# has almost always been within the Unity environment. I know there are many things that are wrong and can be improved upon, but I&amp;rsquo;m enjoying learning new ways to program.&lt;/p&gt;
&lt;p&gt;Another fairly small project I can cross off my to-do list and move on to something else. If you have a similar setup and want to try the bot, I encourage you to do so and leave a star on &lt;a class="link" href="https://github.com/christt105/mnamer-telegram" target="_blank" rel="noopener"
 &gt;the repository&lt;/a&gt;. I have published my example of how I have it set up here: &lt;a class="link" href="https://github.com/christt105/mnamer-telegram/discussions/2" target="_blank" rel="noopener"
 &gt;https://github.com/christt105/mnamer-telegram/discussions/2&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;See you in the next post!&lt;/p&gt;</description></item><item><title>Boxing AR</title><link>https://christt105.github.io/projects/boxingar/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://christt105.github.io/projects/boxingar/</guid><enclosure url="https://christt105.github.io/projects/boxingar/roboboxing.webp" length="14842" type="image/webp"/><description>&lt;p&gt;Control a boxing robot and achieve the RoboBoxing glory!&lt;/p&gt;</description></item><item><title>Empty Universe</title><link>https://christt105.github.io/projects/emptyuniverse/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://christt105.github.io/projects/emptyuniverse/</guid><enclosure url="https://christt105.github.io/projects/emptyuniverse/emptyuniverse.webp" length="42266" type="image/webp"/><description>&lt;p&gt;Empty Universe is an exhaustic adventure where you will have to defend the ship of enemies. You will have three types of astronauts in your control. Each astronaut has his own job in order to get all ship needs covered.&lt;/p&gt;
&lt;p&gt;Survive five days and nights to win. Don&amp;rsquo;t let the enemies kill your astronauts and manage your resources well.&lt;/p&gt;</description></item><item><title>Fishing Trash</title><link>https://christt105.github.io/projects/fishingtrash/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://christt105.github.io/projects/fishingtrash/</guid><enclosure url="https://christt105.github.io/projects/fishingtrash/fishing-trash.webp" length="28690" type="image/webp"/><description>&lt;p&gt;A GameJam with &amp;lsquo;sea&amp;rsquo; and &amp;lsquo;garbage&amp;rsquo; as the theme.&lt;/p&gt;</description></item></channel></rss>