1. Guido Draheim
  2. trac-dvbcronrecording-plugin

Commits

Guido Draheim  committed 9391297

adding "Staffel" (season) and "Folge" (episode) automatically from "tvspielfilm"

  • Participants
  • Parent commits 313198a
  • Branches default

Comments (0)

Files changed (1)

File src/dvbcronrecording/htdocs/js/dvbcronrecording_tvspielfilm.user.js

View file
  • Ignore whitespace
 	var time = $(film_items.get(1)).text();
 	var channel = $(film_items.get(2)).text();
 	var title = $($("h1").get(0)).text();
+	var text = film_info.text();
+	var found = text.match(/Staffel \w+/);
+	if (found) {
+		for (var i=0; i<found.length; i++)
+			title += " " + found[i];
+	}
+	var found = text.match(/Folge \w+/);
+	if (found) {
+		for (var i=0; i<found.length; i++)
+			title += " " + found[i];
+	}
 	// alert("DATE:"+date+" TIME:"+time+" CHANNEL:"+channel+" TITLE:"+title);
 	save_send(date, time, channel, title);
 }