NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Wishlist v
1 2 3 4 5 … 194 Next »
Consistent Genres

 
  • 0 Vote(s) - 0 Average
Consistent Genres
Schtele Bunzorz
Offline

Junior Member

USA
Posts: 12
Threads: 3
Joined: Jun 2025
#1
2025-08-23, 01:43 AM
Please add something like this for consistency. I license this as public domain, no IP rights claimed. Include this code, or something like it, with no attribution required, no source reference needed, no license whatever. Public domain.

private static string FixGenres(string? v)
{
var c = ';';

if (v == null)
return "";

if (v.Contains©)
{
string temp = String.Join(c, v.Split©.Order());
if (v != temp)
v = temp;
}
return v;
}
ElihuRozen
Offline

Senior Member

Massachusetts, USA
Posts: 516
Threads: 51
Joined: Apr 2006
#2
2025-08-23, 01:53 AM (This post was last modified: 2025-08-23, 01:54 AM by ElihuRozen.)
(2025-08-23, 01:43 AM)Schtele Bunzorz Wrote: Please add something like this for consistency.  I license this as public domain, no IP rights claimed.  Include this code, or something like it, with no attribution required, no source reference needed, no license whatever.  Public domain.

        private static string FixGenres(string? v)
        {
            var c = ';';

            if (v == null)
                return "";

            if (v.Contains©)
            {
                string temp = String.Join(c, v.Split©.Order());
                if (v != temp)
                    v = temp;
            }
            return v;
        }

Putting your code in a code block to have it display correctly
Code:
        private static string FixGenres(string? v)
        {
            var c = ';';

            if (v == null)
                return "";

            if (v.Contains(c))
            {
                string temp = String.Join(c, v.Split(c).Order());
                if (v != temp)
                    v = temp;
            }
            return v;
        }
Tuners: SD HDHR Prime (HDHR3-CC). SD HDHR Connect Quatro Tuner (HDHR5-4US) - only QAM.  EXVIST H.265 Encoder - capturing cable box.
Client: Odroid-N2 running knewc on KODI - connected via MoCA.
EPG: SchedulesDirect
Provider: Verizon Fios
Server: Dell XPS 8700 with Windows 10
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,986
Threads: 770
Joined: Nov 2003
#3
2025-08-23, 02:11 AM
What sort of strings genre are you getting? What EPG source are you using?
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,514
Threads: 963
Joined: May 2006
#4
2025-08-23, 02:14 AM
He seems to want genres that comes with a semi colon split but I don't know any source like that.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,986
Threads: 770
Joined: Nov 2003
#5
2025-08-23, 02:37 AM
No, me either. I'm guessing it's some iptv xml epg source.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Custom genres wodger 1 1,606 2009-03-19, 04:48 AM
Last Post: zehd
  Consistent time format in the logs gEd 10 3,284 2007-04-25, 01:14 AM
Last Post: bgowland

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode